NOTIFYINFO

The NOTIFYINFO structure, common to all notify functions, has the following form:

typedef struct _NOTIFYINFO { 
  DWORD cbStructure;      
  DWORD dwNotifyStatus;
  DWORD dwOperationStatus;
  LPVOID lpNPContext;
} NOTIFYINFO, *LPNOTIFYINFO;
 
cbStructure
The size of the NOTIFYINFO structure in bytes.
dwNotifyStatus
The status of the notification. The notification function should check this field to ensure that the notification is of a type that it is interested in, and always return WN_SUCCESS if not. Although in future versions other flags may be added to dwNotifyStatus, it will currently have one of the following flags set:
NOTIFY_PRE The notification is being done before an attempt to perform the operation (pre-notification). dwOperationStatus is undefined and does not contain a valid value.
NOTIFY_POST The notification is being done after an attempt to perform the operation (post-notification). dwOperationStatus contains a valid value.

dwOperationStatus
If dwNotifyStatus has the NOTIFY_POST flag set. dwOperationStatus contains the return status code of the operation being attempted after trying all requested providers. If dwNotifyStatus has the NOTIFY_PRE flag set. dwOperationStatus contains either WN_SUCCESS or WN_RETRY.
lpNPContext
This parameter is used by the NP to keep a context with respect to the operation across the several possible calls to the notification function that can be made. lpNPContext is passed in as a NULL pointer when the notification function is called for pre-notification of a particular operation. The notification function can return with lpNPContext still NULL, indicating that it is not interested in further notification for this specific operation, in which case the notification function will not be called again for post-notification of the operation. If the notification function returns a non-NULL value in lpNPContext, then when the notification function is called for post-notification of the same operation. lpNPContext will be the value returned from this call to the notification function.