Partager via


CertEnumPhysicalStore (Compact 2013)

3/28/2014

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, pvSystemStore points to a CERT_SYSTEM_STORE_RELOCATE_PARA structure that indicates both the name and the location of the system store to be enumerated. Otherwise, pvSystemStore is 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-OR operation with any of the high-word location flags.

  • pvArg
    [in] Pointer to a void that 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 application-defined 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. For details about the callback function, see PFN_CERT_ENUM_PHYSICAL_STORE.

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 GetLastError returns 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_ARG 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.

The desktop operating system supports the following dwFlags that Windows Embedded Compact 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

See Also

Reference

Certificates Functions
CERT_SYSTEM_STORE_RELOCATE_PARA
CertEnumSystemStore
CertEnumSystemStoreLocation