BCryptRegisterConfigChangeNotify

The BCryptRegisterConfigChangeNotify function creates a CNG configuration change event handler.

NTSTATUS WINAPI BCryptRegisterConfigChangeNotify(
  HANDLE* phEvent
);

Parameters

  • phEvent
    [out]

    If this function is called from user mode, this parameter is the address of a HANDLE variable that receives the event handle. You use one of the Wait Functions, such as WaitForSingleObject, to determine when the event has been signaled. The event is unnamed and must be a manual-reset event. The event is signaled when any CNG configuration data has changed.

    If this function is called from kernel mode, this parameter is a pointer to a PRKEVENT variable that receives the pointer to the event dispatcher object. The handle returned in the variable pointed to by the phEvent parameter is treated as a PRKEVENT value. You use the kernel wait functions, such as KeWaitForSingleObject, to determine when the event has been signaled. The event is signaled when the CNG configuration has changed.

    This handle must be passed to the BCryptUnregisterConfigChangeNotify function to remove the event notification.

Return Value

Returns a status code that indicates the success or failure of the function.

Possible return codes include, but are not limited to, the following.

Return code Description
STATUS_SUCCESS The function was successful.
STATUS_INVALID_PARAMETER The phEvent parameter is not valid.
STATUS_NO_MEMORY A memory allocation failure occurred.

Remarks

The handle returned in the variable pointed to by the phEvent parameter will be signaled when a change to the CNG configuration occurs.

Requirements

Client Requires Windows Vista.
Server Requires Windows Server "Longhorn".
Header

Declared in Bcrypt.h.

Library

Use Bcrypt.lib.

DLL Requires Bcrypt.dll.

See Also

BCryptUnregisterConfigChangeNotify