Upravit

Sdílet prostřednictvím


CryptCATCDFEnumAttributesWithCDFTag function

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

The CryptCATCDFEnumAttributesWithCDFTag function enumerates the attributes of member files in the CatalogFiles section of a catalog definition file (CDF). CryptCATCDFEnumAttributesWithCDFTag is called by MakeCat.

Note

This function has no associated header file or import library. To call this function, you must create a user-defined header file and use the LoadLibrary and GetProcAddress functions to dynamically link to Mssign32.dll.

 

Syntax

CRYPTCATATTRIBUTE* WINAPI CryptCATCDFEnumAttributesWithCDFTag(
  _In_ CRYPTCATCDF                  *pCDF,
  _In_ LPWSTR                       pwszMemberTag,
  _In_ CRYPTCATMEMBER               *pMember,
  _In_ CRYPTCATATTRIBUTE            *pPrevAttr,
  _In_ PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError
);

Parameters

pCDF [in]

A pointer to a CRYPTCATCDF structure.

pwszMemberTag [in]

A pointer to a null-terminated string that identifies the catalog file member.

pMember [in]

A pointer to a CRYPTCATMEMBER structure that contains the member information.

pPrevAttr [in]

A pointer to a CRYPTCATATTRIBUTE structure for a file member attribute in the CDF pointed to by pCDF.

pfnParseError [in]

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 CryptCATCDFEnumAttributesWithCDFTag function returns a NULL pointer if it fails.

Remarks

You typically call this function in a loop to enumerate all of the catalog file member 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).

    CRYPTCATATTRIBUTE   *pAttr;
    CRYPTCATMEMBER      *pMember;
    LPWSTR              pwszMemberTag;
    CRYPTCATCDF         *pCDF;

    pCDF = CryptCATCDFOpen(L"myCDF", NULL);
    

    pMember = NULL;
    pwszMemberTag = NULL;

    while (pwszMemberTag = CryptCATCDFEnumMembersByCDFTagEx(pCDF,
                                                            pwszMemberTag,
                                                            NULL,
                                                            &pMember,
                                                            FALSE,
                                                            NULL))
    {
        pAttr = NULL;

        while (pAttr = CryptCATCDFEnumAttributesWithCDFTag(pCDF,
                                                           pwszMemberTag,
                                                           pMember,
                                                           pAttr,
                                                           DisplayParseError))
        {
            //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]
DLL
Wintrust.dll

See also

MakeCat

CRYPTCATATTRIBUTE

CRYPTCATCDF

CRYPTCATMEMBER

GetProcAddress

LoadLibrary