IEnroll4::createPFXWStr method (xenroll.h)

[This method is no longer available for use as of Windows Server 2008 and Windows Vista.]

The createPFXWStr method saves the accepted certificate chain and private key in a Personal Information Exchange (PFX) format string. The PFX format is also known as PKCS #12. This method was first defined in the IEnroll4 interface.

Syntax

HRESULT createPFXWStr(
  [in]  LPCWSTR          pwszPassword,
  [out] PCRYPT_DATA_BLOB pblobPFX
);

Parameters

[in] pwszPassword

A pointer to a null-terminated Unicode string that represents the password for the PFX-format message. This value may be empty or NULL to indicate that no password is used. When you have finished using the password, remove the sensitive information from memory by calling SecureZeroMemory. For more information about protecting the password, see Handling Passwords.

[out] pblobPFX

A pointer to the CRYPT_DATA_BLOB structure that receives the base64-encoded PFX format certificate information.

When you have finished using this memory, free it by passing the pbData member of this structure to the CoTaskMemFree function.

Return value

If the method succeeds, the method returns S_OK.

If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header xenroll.h
Library Uuid.lib
DLL Xenroll.dll

See also

IEnroll4