ImportPFXToProvider callback function (certenroll.h)

Imports a PFX certificate.

Syntax

ImportPFXToProvider Importpfxtoprovider;

HRESULT Importpfxtoprovider(
  HWND hWndParent,
  BYTE const *pbPFX,
  DWORD cbPFX,
  ImportPFXFlags ImportFlags,
  PCWSTR pwszPassword,
  PCWSTR pwszProviderName,
  PCWSTR pwszReaderName,
  PCWSTR pwszContainerNamePrefix,
  PCWSTR pwszPin,
  PCWSTR pwszFriendlyName,
  DWORD *pcCertOut,
  PCCERT_CONTEXT **prgpCertOut
)
{...}

Parameters

hWndParent

Handle to a Parent Window.

pbPFX

Pointer to a buffer that contains the PFX file.

cbPFX

Size of pbPFX in bytes.

ImportFlags

One or more ImportPFXFlag values.

pwszPassword

Pointer to a constant null-terminated string of 16-bit Unicode characters that is the Password for the PFX file.

pwszProviderName

Pointer to a constant null-terminated string of 16-bit Unicode characters that is the name of the crypto provider.

pwszReaderName

Pointer to a constant null-terminated string of 16-bit Unicode characters that is the name of the smart card reader (can be nullptr).

pwszContainerNamePrefix

Pointer to a constant null-terminated string of 16-bit Unicode characters that is the name of the container (can be nullptr).

pwszPin

Pointer to a constant null-terminated string of 16-bit Unicode characters that is the PIN of the smart card (can be nullptr).

pwszFriendlyName

Pointer to a constant null-terminated string of 16-bit Unicode characters that is the friendly name of the certificate (can be nullptr).

pcCertOut

Pointer to DWORD that receives the number of certificates successfully imported (can be nullptr).

prgpCertOut

Pointer to a pointer that receives a CERT_CONTEXT structure (can be nullptr).

Return value

None

Requirements

   
Target Platform Windows
Header certenroll.h