CryptCATCDFOpen function
[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.]
Applies to: desktop apps only
The CryptCATCDFOpen function opens an existing catalog definition file (CDF) for reading and initializes a CRYPTCATCDF structure. CryptCATCDFOpen is called by MakeCat.
Syntax
CRYPTCATCDF* WINAPI CryptCATCDFOpen( __in LPWSTR pwszFilePath, __in_opt PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError );
Parameters
- pwszFilePath [in]
-
A pointer to a null-terminated string that contains a file path specification.
- pfnParseError [in, optional]
-
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.
Remarks
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. |
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012