NCryptNotifyChangeKey function (ncrypt.h)
The NCryptNotifyChangeKey function creates or removes a key change notification.
[in] NCRYPT_PROV_HANDLE hProvider,
[in, out] HANDLE *phEvent,
[in] DWORD dwFlags
The handle of the key storage provider. This handle is obtained by using the NCryptOpenStorageProvider function.
[in, out] phEvent
The address of a HANDLE variable that either receives or contains the key change notification event handle. This is the same handle that is returned by the FindFirstChangeNotification function. For more information, see the dwFlags parameter description.
A set of flags that modify the behavior of this function. This parameter contains a combination of one or more of the following values.
Returns a status code that indicates the success or failure of the function.
Possible return codes include, but are not limited to, the following.
|The function was successful.
|The dwFlags parameter contains a value that is not valid.
|The hProvider parameter is not valid.
|One or more parameters are not valid.
A service must not call this function from its StartService Function. If a service calls this function from its StartService function, a deadlock can occur, and the service may stop responding.
|Minimum supported client
|Windows Vista [desktop apps only]
|Minimum supported server
|Windows Server 2008 [desktop apps only]