Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function retrieves the physical stores on a computer. The function calls the provided callback function for each physical store found.

Syntax

BOOL WINAPI CertEnumPhysicalStore(
  const void* 
pvSystemStore,
  DWORD 
dwFlags,
  void* 
pvArg,
  PFN_CERT_ENUM_PHYSICAL_STORE 
pfnEnum
);

Parameters

pvSystemStore

[in] If CERT_SYSTEM_STORE_RELOCATE_FLAG is set in dwFlags, pvSystemStorepoints to a CERT_SYSTEM_STORE_RELOCATE_PARA structure that indicates both the name and the location of the system store to be enumerated. Otherwise, pvSystemStoreis a pointer to a Unicode string that names the system store whose physical stores are to be enumerated.

dwFlags

[in]

Specifies the location of the system store. The following flag values are defined:

CERT_SYSTEM_STORE_CURRENT_USER

CERT_SYSTEM_STORE_LOCAL_MACHINE

In addition, CERT_SYSTEM_STORE_RELOCATE_FLAG can be combined using a bitwise- ORoperation with any of the high-word location flags.

pvArg

[in] Pointer to a voidthat allows the application to declare, define, and initialize a structure to hold any information to be passed to the callback enumeration function.

pfnEnum

[in] 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 CertEnumPhysicalStoreCallbackcallback function.

Return Value

If the function succeeds and another physical store was found, the return value is TRUE.

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

If the function fails and another physical store was not found, the return value is FALSE. For extended error information, call GetLastError.

Remarks

To use this function, the application must declare and define the ENUM_ARGstructure 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.

The desktop operating system supports the following dwFlagsthat Windows Embedded CE does not support:

CERT_SYSTEM_STORE_CURRENT_SERVICE

CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY

CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY

CERT_SYSTEM_STORE_SERVICES

CERT_SYSTEM_STORE_USERS

CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE

Requirements

Header wincrypt.h
Library crypt32.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also