Connectivity Software User's Guide and Reference
CryptExportKey Method



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

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

Syntax
'Declaration
 
Public Shared Function CryptExportKey( _
   ByVal hKey As IntPtr, _
   ByVal hExpKey As IntPtr, _
   ByVal dwBlobType As Integer, _
   ByVal dwFlags As Integer, _
   ByVal pbData() As Byte, _
   ByRef pdwDataLen As Integer _
) As Boolean
'Usage
 
Dim hKey As IntPtr
Dim hExpKey As IntPtr
Dim dwBlobType As Integer
Dim dwFlags As Integer
Dim pbData() As Byte
Dim pdwDataLen As Integer
Dim value As Boolean
 
value = Crypto.NativeMethods.CryptExportKey(hKey, hExpKey, dwBlobType, dwFlags, pbData, pdwDataLen)
public static bool CryptExportKey( 
   IntPtr hKey,
   IntPtr hExpKey,
   int dwBlobType,
   int dwFlags,
   byte[] pbData,
   ref int pdwDataLen
)

Parameters

hKey
hExpKey
dwBlobType
dwFlags
pbData

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

pdwDataLen
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