CryptCATCDFOpen function (mscat.h)

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

The CRYPTCATCDF structure. CryptCATCDFOpen is called by MakeCat.


  [in]           LPWSTR                       pwszFilePath,
  [in, optional] PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError


[in] pwszFilePath

A pointer to a null-terminated string that contains the path of the CDF file to open.

[in, optional] pfnParseError

A pointer to a user-defined function to handle file parse errors.

Return value

Upon success, this function returns a pointer to the newly created CRYPTCATCDF structure. The CryptCATCDFOpen function returns a NULL pointer if it fails.


The following default values are used by the CryptCATCDFOpen function for given conditions in the CDF CatalogHeader section.

CatalogHeader condition Default value
No Name value is specified. The file name in pwszFilePath is used for the catalog (.cat) output file.
No PublicVersion value is specified. 0x00000001
No EncodingType value is specified. PKCS_7_ASN_ENCODING or X509_ASN_ENCODING (0x00010001)

The following actions are performed by the CryptCATCDFOpen function for given error conditions.

Error condition Action performed
No CatalogHeader or Name tags are found in CDF. If specified by the caller, the CryptCATCDFOpen function calls the function specified by pfnParseError and returns a NULL pointer.
The CryptCATCDFOpen function calls the CryptCATOpen function to get a handle to the catalog (.cat) output file, but it gets an invalid or NULL handle. Calls the CryptCATCDFClose function and returns a NULL pointer.
Additional OIDs for the Catalog branch Definition

Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  The additional Catalog OIDs are not available.


Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header mscat.h
DLL Wintrust.dll

See also