Connectivity Software User's Guide and Reference
CryptAcquireContext Method



OpcLabs.BaseLibPrimitives Assembly > OpcLabs.BaseLib.Licensing Namespace > Crypto.NativeMethods Class : CryptAcquireContext Method

The value of this parameter can be null (Nothing in Visual Basic).

The value of this parameter can be null (Nothing in Visual Basic).

Syntax
'Declaration
 
Public Shared Function CryptAcquireContext( _
   ByRef hProv As IntPtr, _
   ByVal pszContainer As String, _
   ByVal pszProvider As String, _
   ByVal dwProvType As Integer, _
   ByVal dwFlags As Integer _
) As Boolean
'Usage
 
Dim hProv As IntPtr
Dim pszContainer As String
Dim pszProvider As String
Dim dwProvType As Integer
Dim dwFlags As Integer
Dim value As Boolean
 
value = Crypto.NativeMethods.CryptAcquireContext(hProv, pszContainer, pszProvider, dwProvType, dwFlags)
public static bool CryptAcquireContext( 
   ref IntPtr hProv,
   string pszContainer,
   string pszProvider,
   int dwProvType,
   int dwFlags
)
public:
static bool CryptAcquireContext( 
   IntPtr% hProv,
   String^ pszContainer,
   String^ pszProvider,
   int dwProvType,
   int dwFlags
) 

Parameters

hProv
pszContainer

The value of this parameter can be null (Nothing in Visual Basic).

pszProvider

The value of this parameter can be null (Nothing in Visual Basic).

dwProvType
dwFlags
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