Connectivity Software User's Guide and Reference
CryptAcquireCertificatePrivateKey Method



OpcLabs.BaseLibPrimitives Assembly > OpcLabs.BaseLib.Licensing Namespace > Crypto.NativeMethods Class : CryptAcquireCertificatePrivateKey Method
Syntax
'Declaration
 
Public Shared Function CryptAcquireCertificatePrivateKey( _
   ByVal pCert As IntPtr, _
   ByVal dwFlags As Integer, _
   ByVal pvReserved As IntPtr, _
   ByRef phCryptProv As IntPtr, _
   ByRef pdwKeySpec As Integer, _
   ByRef pfCallerFreeProv As Boolean _
) As Boolean
'Usage
 
Dim pCert As IntPtr
Dim dwFlags As Integer
Dim pvReserved As IntPtr
Dim phCryptProv As IntPtr
Dim pdwKeySpec As Integer
Dim pfCallerFreeProv As Boolean
Dim value As Boolean
 
value = Crypto.NativeMethods.CryptAcquireCertificatePrivateKey(pCert, dwFlags, pvReserved, phCryptProv, pdwKeySpec, pfCallerFreeProv)
public static bool CryptAcquireCertificatePrivateKey( 
   IntPtr pCert,
   int dwFlags,
   IntPtr pvReserved,
   ref IntPtr phCryptProv,
   ref int pdwKeySpec,
   ref bool pfCallerFreeProv
)
public:
static bool CryptAcquireCertificatePrivateKey( 
   IntPtr pCert,
   int dwFlags,
   IntPtr pvReserved,
   IntPtr% phCryptProv,
   int% pdwKeySpec,
   bool% pfCallerFreeProv
) 

Parameters

pCert
dwFlags
pvReserved
phCryptProv
pdwKeySpec
pfCallerFreeProv
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also