Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
[BCryptCreateContext is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
The BCryptCreateContext function creates a new CNG configuration context.
Syntax
NTSTATUS BCryptCreateContext(
[in] ULONG dwTable,
[in] LPCWSTR pszContext,
[in, optional] PCRYPT_CONTEXT_CONFIG pConfig
);
Parameters
[in] dwTable
Identifies the configuration table to create the context in. This can be one of the following values.
| Value | Meaning |
|---|---|
|
Create the context in the local-machine configuration table. |
|
This value is not available for use. |
[in] pszContext
A pointer to a null-terminated Unicode string that contains the identifier of the context to create.
[in, optional] pConfig
A pointer to a CRYPT_CONTEXT_CONFIG structure that contains additional configuration data for the new context. This parameter can be NULL if it is not needed.
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 code | Description |
|---|---|
|
The function was successful. |
|
One or more parameters are not valid. |
|
A memory allocation failure occurred. |
Remarks
BCryptCreateContext can be called only in user mode.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista [desktop apps only] |
| Minimum supported server | Windows Server 2008 [desktop apps only] |
| Target Platform | Windows |
| Header | bcrypt.h |
| Library | Bcrypt.lib |
| DLL | Bcrypt.dll |