EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

CryptCATOpen function

[The CryptCATOpen function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

The CryptCATOpen function opens a catalog and returns a context handle to the open catalog.

Note  Some older versions of Wintrust.lib do not contain the export information for this function. In this case, you must use the LoadLibrary and GetProcAddress functions to dynamically link to Wintrust.dll.

Syntax


HANDLE CryptCATOpen(
  _In_  LPWSTR pwszFileName,
  _In_  DWORD fdwOpenFlags,
  _In_  HCRYPTPROV hProv,
  _In_  DWORD dwPublicVersion,
  _In_  DWORD dwEncodingType
);

Parameters

pwszFileName [in]

A pointer to a null-terminated string for the catalog file name.

fdwOpenFlags [in]

Zero, to open an existing catalog file, or a bitwise combination of one or more of the following values.

ValueMeaning
CRYPTCAT_OPEN_ALWAYS

Opens the file, if it exists, or creates a new file, if needed.

CRYPTCAT_OPEN_CREATENEW

A new catalog file is created. If a previously created file exists, it is overwritten.

 

hProv [in]

A handle to a cryptographic service provider (CSP).

dwPublicVersion [in]

Version of the file. This can be one of the following values.

ValueMeaning
CRYPTCAT_VERSION_1
0x100

Version 1 file format.

CRYPTCAT_VERSION_2
0x200

Version 2 file format.

Windows 8 and Windows Server 2012:  Support for this value begins.

 

dwEncodingType [in]

Encoding type used for the file. If this value is 0, then the encoding type is set to PKCS_7_ASN_ENCODING | X509_ASN_ENCODING.

Return value

Upon success, this function returns a handle to the open catalog. When you have finished using the handle, close it by calling the CryptCATClose function. The CryptCATOpen function returns INVALID_HANDLE_VALUE if it fails.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Mscat.h

Library

Wintrust.lib

DLL

Wintrust.dll

See also

CryptCATClose

 

 

Ajouts de la communauté

AJOUTER
Afficher:
© 2014 Microsoft