InitializeNapAgentNotifier Function

The InitializeNapAgentNotifier function subscribes the calling process to NapAgent state change notifications and quarantine state change notifications. These notifications are provided by the NapAgent service.

Syntax

C++
NAPAPI HRESULT WINAPI InitializeNapAgentNotifier(
  __in  NapNotifyType type,
  __in  HANDLE hNotifyEvent
);

Parameters

type [in]

A NapNotifyType value that specifies the type of service notifications to receive.

hNotifyEvent [in]

An event handle used for notification. The caller must pass an open handle to the hNotifyEvent parameter. The caller must also close the event handle when it is no longer needed.

Return Value

Return codeDescription
S_OK

Initialization completed successfully.

E_FAIL

Initialization failed.

ERROR_ALREADY_INITIALIZED

The process has already subscribed to NapAgent service notifications of the type specified.

E_INVALIDARG

An invalid argument was passed.

 

Remarks

This function is not thread safe.

Each process that requires a subscription to NapAgent service notifications of the specified type must call InitializeNapAgentNotifier to subscribe to notifications. If a process must subscribe to more than one type of notification, it must call InitializeNapAgentNotifier once for each type of notification.

Once a process does not require further notifications, the process must call UninitializeNapAgentNotifier for the specified type.

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderNapUtil.w, NapUtil.h
DLLQutil.dll

See Also

UninitializeNapAgentNotifier

Send comments about this topic to Microsoft

Build date: 11/12/2009

Tags :


Page view tracker