KSC Open API  13.1
Kaspersky Security Center API description
wstring PolicyProfiles::AddProfile ( int  nPolicy,
wstring  szwName,
params  pAttrs,
int  nLifeTime 
)

Create a new profile.

Creates a new profile with the specified name. The method returns identifier of opened SsContents, that must be filled by the client.

Actually the profile is saved only after the returned SsContents is filled with one or more sections, and SsContents::Ss_Apply method is called. So, the SsContents::Ss_Apply method may also throw an exception if the profile is not unique.

Note:
Don't forget to fill returned SsContents, and call SsContents::Ss_Apply and SsContents::SS_Release methods
Parameters:
nPolicy(int) policy id
szwName(wstring) profile name, a non-empty string, up to 100 unicode characters
pAttrs(params) profile data, following attributes may be specified in the policy format
  • EXPRESSION (required)
  • KLSSPOL_PRF_ENABLED (optional, false by default)
nLifeTime(int) timeout in milliseconds to keep this SsContents object alive, zero means 'default value'
Returns:
(wstring) identifier of opened SsContents, must be closed with SsContents::SS_Release
See also: