Export (0) Print
Expand All
Expand Minimize

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.

Syntax


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

Parameters

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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Mscat.h

Library

Wintrust.lib

DLL

Wintrust.dll

See also

CryptCATAdminAcquireContext
CryptCATAdminReleaseCatalogContext

 

 

Community Additions

ADD
Show:
© 2014 Microsoft