CertEnumPhysicalStore

[This is preliminary documentation and subject to change.]

The CertEnumPhysicalStore function enumerates the physical stores for a specified system store.

#include <wincrypt.h>
BOOL WINAPI CertEnumPhysicalStore(
  const void pvSystemStore,              // in
  DWORD dwFlags,                         // in
  void *pvArg,                           // in
  PFN_CERT_ENUM_PHYSICAL_STORE pfnEnum   // in
);
 

Parameters

pvSystemStore
If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStore points to a CERT_SYSTEM_STORE_RELOCATE_PARA that indicates both the name and the location of the system store. Otherwise it is a pointer to a unicode string that names the system store whose physical stores are to be enumerated. See CertRegisterSystemStore for details on prefixing a ServiceName or ComputerName to the system store name.
dwFlags
The HIWORD of the dwFlags parameter specifies the location of the system store.The following dwFlags are defined:
CERT_SYSTEM_STORE_CURRENT_USER
CERT_SYSTEM_STORE_CURRENT_SERVICE
CERT_SYSTEM_STORE_LOCAL_MACHINE
CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY
CERT_SYSTEM_STORE_CURRENT_MACHINE_GROUP_POLICY
CERT_SYSTEM_STORE_SERVICES
CERT_SYSTEM_STORE_USERS

In addition CERT_SYSTEM_STORE_RELOCATE_FLAG may be ORed with any of the HIWORD location flags.

pvArg
Pointer to a void which allows the application to declare, define, and initialize a data structure to hold any information to be passed to the callback enumeration function.
pfnEnum
Pointer to the callback function used to show the details for each physical store. This callback function determines the content and format for the presentation of information on each physical store. The application must provide the callback function and declare the following signature :
BOOL WINAPI CertEnumPhysicalStoreCallback(
  const void *pvSystemStore,             // in
  DWORD dwFlags,                         // in
  PCERT_SYSTEM_STORE_INFO pStoreInfo,    // in
  void *pvReserved,                      // in, optional
  void *pvArg                            // in, optional
);
 

The pvArg passed to the callback function is the pvArg pointer passed to CertEnumPhysicalStore.

Return Values

The function returns TRUE if another physical store was found. If another physical store was not found, it returns FALSE.

If the system store location only supports system stores and does not support physical stores, the function returns FALSE and GetLastError returns ERROR_NOT_SUPPORTED.

Remarks

To use CertEnumPhysicalStore, an application must declare and define the ENUM_ARG data structure and an enumeration callback function.

To access a remote store, the Security Permissions in the registry keys on that remote computer must be set to allow access. For more information on setting Security Permissions in an NT registry, see MDSN Article ID Q155363. For information on what to do to enable remote administration on a Win95 registry.

Example

See Example Code for Listing System and Physical Stores.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in wincrypt.h.
  Import Library: Use crypt32.lib.

See Also

CertRegisterSystemStore, CertRegisterPhysicalStore, CertUnregisterSystemStore, CertUnregisterPhysicalStore, CertEnumSystemStoreLocation, CertEnumSystemStore