CryptCATAdminAcquireContext function

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

The CryptCATAdminAcquireContext function acquires a handle to a catalog administrator context. This handle can be used by subsequent calls to the CryptCATAdminAddCatalog, CryptCATAdminEnumCatalogFromHash, and CryptCATAdminRemoveCatalog functions. This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Wintrust.dll.

Syntax

BOOL CryptCATAdminAcquireContext(
  HCATADMIN  *phCatAdmin,
  const GUID *pgSubsystem,
  DWORD      dwFlags
);

Parameters

phCatAdmin

A pointer to the catalog administrator context handle that is assigned by this function. When you have finished using the handle, close it by calling the CryptCATAdminReleaseContext function.

pgSubsystem

A pointer to the GUID that identifies the subsystem. DRIVER_ACTION_VERIFY represents the subsystem for operating system components and third party drivers. This is the subsystem used by most implementations.

dwFlags

Not used; set to zero.

Return Value

The return value is TRUE if the function succeeds; FALSE if the function fails.

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]
Target Platform Windows
Header mscat.h
Library Wintrust.lib
DLL Wintrust.dll

See Also

CryptCATAdminAddCatalog

CryptCATAdminReleaseContext

CryptCATAdminRemoveCatalog