INapSystemHealthAgentBinding::Initialize method

Note

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

The INapSystemHealthAgentBinding::Initialize method initializes the system health agent (SHA) and binds the SHA to the NapAgent service. This method must be called before calling any other method on the INapSystemHealthAgentBinding2 interface.

Syntax

HRESULT Initialize(
  [in] SystemHealthEntityId          id,
  [in] INapSystemHealthAgentCallback *callback
);

Parameters

id [in]

A unique SystemHealthEntityId that contains the ID of the SHA being bound to the NapAgent service.

callback [in]

A COM pointer to an INapSystemHealthAgentCallback interface used by the NapAgent to callback the health agent with a notify/process. The NapAgent holds a reference to the object associated with this interface until Uninitialize is called.

Return value

Other COM-specific error codes also may be returned.

Return code Description
S_OK
Operation succeeded.
E_ACCESSDENIED
Permissions error, access denied.
E_OUTOFMEMORY
System resource limit, could not perform the operation.
ERROR_ALREADY_INITIALIZED
If the SHA has initialized previously, this error is returned.
NAP_E_NOT_REGISTERED
If the SHA has not registered earlier, this error is returned.
RPC_E_DISCONNECTED
The NapAgent has been stopped. This object will recover automatically and rebind to the NapAgent, once it restarts.

Remarks

The NapAgent does not trigger a SoH exchange as a result of initialization. A system health agent must call NotifySoHChange to request an exchange of SoH packets after initializing with the NapAgent.

Requirements

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

See also

INapSystemHealthAgentBinding