CryptCATCDFEnumCatAttributes function (mscat.h)
[The CryptCATCDFEnumCatAttributes function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]
The CryptCATCDFEnumCatAttributes function enumerates catalog-level attributes within the CatalogHeader section of a catalog definition file (CDF). CryptCATCDFEnumCatAttributes is called by MakeCat.
Syntax
CRYPTCATATTRIBUTE * CryptCATCDFEnumCatAttributes(
[in] CRYPTCATCDF *pCDF,
[in] CRYPTCATATTRIBUTE *pPrevAttr,
[in] PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError
);
Parameters
[in] pCDF
A pointer to a CRYPTCATCDF structure.
[in] pPrevAttr
A pointer to a CRYPTCATATTRIBUTE structure for a catalog attribute in the CDF pointed to by pCDF.
[in] pfnParseError
A pointer to a user-defined function to handle file parse errors.
Return value
Upon success, this function returns a pointer to a CRYPTCATATTRIBUTE structure. The CryptCATCDFEnumCatAttributes function returns a NULL pointer if it fails.
Remarks
You typically call this function in a loop to enumerate all of the catalog header attributes in a CDF. Before entering the loop, set pPrevAttr to NULL. The function returns a pointer to the first attribute. Set pPrevAttr to the return value of the function for subsequent iterations of the loop.
Examples
The following example shows the correct sequence of assignments for the pPrevAttr parameter (pAttr
).
CRYPTCATCDF *pCDF;
CRYPTCATATTRIBUTE *pAttr;
pCDF = CryptCATCDFOpen(L"myCDF", NULL);
pAttr = NULL;
while (pAttr = CryptCATCDFEnumCatAttributes(pCDF, pAttr, NULL))
{
//do something with pAttr
}
CryptCATCDFClose(pCDF);
Requirements
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 |