Historical Content Alert
This is a historical content for Windows NT 4.0 product and is presented for informative purposes only. All content in this directory is copyrighted and owned by Microsoft.

GenKeyFlags

The GenKeyFlags property value is passed directly to calls made to CryptGenKey. By default it has a value of zero except when a .PVK file is specified using PVKFileName, where it defaults to a value of CRYPT_EXPORTABLE.

By default the private key is not exportable except when a .PVK file is requested. However, if the private key is to be exportable without a specified .PVK file, this flag should be set to CRYPT_EXPORTABLE. If the cryptographic service provider (CSP) does not support exportable private keys, an error occurs.

Data Type

[VB] DWORD

[C++] DWORD

Defined Values

The value for GenKeyFlags is passed through to CryptGenKey. For the details see CryptGenKey in the CryptoAPI documentation.

Affects the behavior of the following methods:

createPKCS10
createFilePKCS10

Access Methods

[VB] "="operator

[C++] HRESULT get_GenKeyFlags (DWORD);
HRESULT put_GenKeyFlags (DWORD);

HRESULT

Value Meaning
S_OK The property read/write completed successfully.


Share this article: