The CryptSetProvParam function lets applications customize the operations of a CSP.
BOOL CRYPTFUNC CryptSetProvParam(
HCRYPTPROV hProv, | |
DWORD dwParam, | |
BYTE *pbData, | |
DWORD dwFlags | |
); |
When this parameter is set to PP_CLIENT_HWND, the pbData buffer should
contain a DWORD value specifiying the window handle that the provider
is to use when interacting directly with the user. When setting this
parameter, applications should call the CryptSetProvParam function before
calling CryptAcquireContext. This is necessary because many CSPs will
display a user interface during the CryptAcquireContext function. Note
that CSPs that do not ever display a user interface will ignore the value of
this parameter.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To retrieve extended error information, use the GetLastError function.
The following table lists the error codes most commonly returned by the GetLastError function. The error codes prefaced by “NTE” are generated by the particular CSP you are using.
Error |
Description |
ERROR_INVALID_HANDLE |
One of the parameters specifies an invalid handle. |
ERROR_BUSY |
The CSP context is currently being used by another process. |
ERROR_INVALID_PARAMETER |
One of the parameters contains an invalid value. This is most often an illegal pointer. |
NTE_BAD_FLAGS |
The dwFlags parameter is nonzero or the pbData buffer contains an invalid value. |
NTE_BAD_TYPE |
The dwParam parameter specifies an unknown parameter. |
NTE_BAD_UID |
The CSP context that was specified when the hKey key was created cannot be found. |
NTE_FAIL |
The function failed in some unexpected way. |
CryptAcquireContext, CryptGetProvParam, CryptSetKeyParam
file: /Techref/os/win/api/win32/func/src/f12_18.htm, 5KB, , updated: 2000/4/7 11:19, local time: 2024/11/25 01:58,
18.218.71.21:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://techref.massmind.org/techref/os/win/api/win32/func/src/f12_18.htm"> CryptSetProvParam Release 2]</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to techref.massmind.org! |
.