INapEnforcementClientBinding::Initialize method

Note

The Network Access Protection platform is not available starting with Windows 10

The INapEnforcementClientBinding::Initialize method starts up the NapAgent service automatically.

Syntax

HRESULT Initialize(
  [in] EnforcementEntityId           id,
  [in] INapEnforcementClientCallback *callback
);

Parameters

id [in]

An EnforcementEntityId that identifies the enforcement client and its version.

callback [in]

A COM pointer to an INapEnforcementClientCallback interface used by the NapAgent to callback the enforcement clients with notify/process. The NapAgent holds a reference to the object associated with this interface until INapEnforcementClientBinding::Uninitialize is called.

Return value

Other COM-specific error codes also may be returned.

Return code Description
S_OK
The operation is successful.
E_ACCESSDENIED
Permissions error, access denied.
E_OUTOFMEMORY
System resource limit, could not perform the operation.
HRESULT(ERROR_ALREADY_INITIALIZED)
If the enforcer has initialized previously, then this error code is returned.
NAP_E_NOT_REGISTERED
If the enforcer has not registered earlier, this error code is returned.

Remarks

The enforcement client must call the INapEnforcementClientBinding::Initialize method before calling any other method of the INapEnforcementClientBinding interface.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
NapEnforcementClient.h
IDL
NapEnforcementClient.idl
DLL
Qagent.dll

See also

INapEnforcementClientBinding

INapEnforcementClientBinding::Uninitialize