Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

CryptCATAdminAddCatalog function

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

The CryptCATAdminAddCatalog function adds a catalog to the catalog database. The catalog database is an index that associates file hashes with the catalogs that contain them. It is used to speed the identification of the catalogs when verifying the file signature. This function is the only supported way to programmatically add catalogs to the Windows catalog database. The function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Wintrust.dll.


HCATINFO CryptCATAdminAddCatalog(
  _In_ HCATADMIN hCatAdmin,
  _In_ WCHAR     *pwszCatalogFile,
  _In_ WCHAR     *pwszSelectBaseName,
  _In_ DWORD     dwFlags


hCatAdmin [in]

Handle previously assigned by the CryptCATAdminAcquireContext function.

pwszCatalogFile [in]

A pointer to a null-terminated string for the fully qualified path of the catalog to be added.

pwszSelectBaseName [in]

A pointer to a null-terminated string for the name of the catalog when it is stored. If the parameter is NULL, then a unique name will be generated for the catalog.

dwFlags [in]

If the CRYPTCAT_ADDCATALOG_HARDLINK (0x00000001) flag is specified, the catalog specified in the call will be hard-linked to rather than copied. Hard-linking instead of copying a catalog reduces the amount of disk space required by Windows.

Return value

If the function succeeds, the return value is a handle to the catalog information context. If the function fails, the return value is NULL. After you have finished using the returned handle, free it by calling the CryptCATAdminReleaseCatalogContext function.

For extended error information, call the GetLastError function. For a complete list of error codes provided by the operating system, see System Error Codes.


Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]







See also