NCryptEnumStorageProviders function

The NCryptEnumStorageProviders function obtains the names of the registered key storage providers.

Syntax


SECURITY_STATUS WINAPI NCryptEnumStorageProviders(
  _Out_ DWORD              *pdwProviderCount,
  _Out_ NCryptProviderName **ppProviderList,
  _In_  DWORD              dwFlags
);

Parameters

pdwProviderCount [out]

The address of a DWORD to receive the number of elements in the ppProviderList array.

ppProviderList [out]

The address of an NCryptProviderName structure pointer to receive an array of the registered key storage provider names. The variable pointed to by the pdwProviderCount parameter receives the number of elements in this array.

When this memory is no longer needed, free it by passing this pointer to the NCryptFreeBuffer function.

dwFlags [in]

Flags that modify function behavior. This can be zero (0) or the following value.

ValueMeaning
NCRYPT_SILENT_FLAG

Requests that the key service provider (KSP) not display any user interface. If the provider must display the UI to operate, the call fails and the KSP should set the NTE_SILENT_CONTEXT error code as the last error.

 

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_BAD_FLAGS

The dwFlags parameter contains a value that is not valid.

NTE_INVALID_PARAMETER

One or more parameters are not valid.

NTE_NO_MEMORY

A memory allocation failure occurred.

 

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

NCryptFreeBuffer

 

 

Show: