cryptreleasecontext (advapi32)
Last changed: anathan-207.46.228.16

.
Summary
Releases the handle of a cryptographic service provider (CSP) and a key container.

C# Signature:

[DllImport("Advapi32.dll", EntryPoint = "CryptReleaseContext", CharSet = CharSet.Unicode, SetLastError = true)]
static extern bool CryptReleaseContext(
   IntPtr hProv,
   Int32 dwFlags   // Reserved. Must be 0.
   );

VB .NET Signature:

Declare Function CryptReleaseContext Lib "advapi32.dll" (hProv As IntPtr, _
   dwFlags As Integer) As Boolean

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

dwFlags is a reserved field and must be 0.

Sample Code:

CryptReleaseContext(
   this._hCryptProv,
   0   // Reserved. Must be zero.
   );

Alternative Managed API:

TODO

Documentation