NCryptFreeObject function

The NCryptFreeObject function frees a CNG key storage object.

Syntax


SECURITY_STATUS WINAPI NCryptFreeObject(
  _In_  NCRYPT_HANDLE hObject
);

Parameters

hObject [in]

The handle of the object to free. This can be either a provider handle (NCRYPT_PROV_HANDLE) or a key handle (NCRYPT_KEY_HANDLE).

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 codeDescription
ERROR_SUCCESS

The function was successful.

NTE_INVALID_HANDLE

The handle in the hObject parameter is not valid.

 

Remarks

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.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Ncrypt.h

Library

Ncrypt.lib

DLL

Ncrypt.dll

See also

NCryptOpenStorageProvider

 

 

Community Additions

ADD
Show:
© 2014 Microsoft