BCryptAddContextFunction function (bcrypt.h)
[BCryptAddContextFunction is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
The BCryptAddContextFunction function adds a cryptographic function to the list of functions that are supported by an existing CNG context.
NTSTATUS BCryptAddContextFunction( ULONG dwTable, LPCWSTR pszContext, ULONG dwInterface, LPCWSTR pszFunction, ULONG dwPosition );
Identifies the configuration table that the context exists in. This can be one of the following values.
||The context exists in the local-machine configuration table.|
||This value is not available for use.|
A pointer to a null-terminated Unicode string that contains the identifier of the context to add the function to.
Identifies the cryptographic interface to add the function to. This can be one of the following values.
A pointer to a null-terminated Unicode string that contains the identifier of the cryptographic function to add.
Specifies the position in the list at which to insert this function. The function is inserted at this position ahead of any existing functions. The CRYPT_PRIORITY_TOP value is used to insert the function at the top of the list. The CRYPT_PRIORITY_BOTTOM value is used to insert the function at the end of the list.
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.|
||One or more parameters are not valid.|
||A memory allocation failure occurred.|
||The context could not be found.|
If the function added is already in the list, it will be removed and inserted at the new position.
BCryptAddContextFunction can be called only in user mode.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|