The NCryptFinalizeKey function completes a CNG key storage key. The key cannot be used until this function has been called.
SECURITY_STATUS NCryptFinalizeKey( NCRYPT_KEY_HANDLE hKey, DWORD dwFlags );
The handle of the key to complete. This handle is obtained by calling the NCryptCreatePersistedKey function.
Flags that modify function behavior. This can be zero or 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 hKey parameter is 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 | UWP apps]|
|Minimum supported server||Windows Server 2008 [desktop apps | UWP apps]|