大网数据广告活动
账户与安全

CryptCATCDFEnumAttributesWithCDFTag function

· 52CE 我爱测

Enumerates the attributes of member files in the CatalogFiles section of a catalog definition file (CDF).

[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

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。