ReactOS 0.4.16-dev-2284-g3529151
CStoreList.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Certificate Manager
3 * LICENSE: MIT (https://spdx.org/licenses/MIT)
4 * PURPOSE: CStoreList implementation
5 * COPYRIGHT: Copyright 2025 Mark Jansen <mark.jansen@reactos.org>
6 */
7
8#include "certmgr.h"
9
11{
12}
13
16{
17 switch (m_Type)
18 {
19 case StoreType::User:
21 case StoreType::Service:
23 case StoreType::Computer:
25 default:
26 return 0;
27 }
28}
29
32 const void *pvSystemStore,
34 PCERT_SYSTEM_STORE_INFO pStoreInfo,
35 void *pvReserved,
36 void *pvArg)
37{
38 CStoreList *storeList = static_cast<CStoreList *>(pvArg);
39 const wchar_t *storeName = static_cast<const wchar_t *>(pvSystemStore);
40 CStore *newStore = new CStore(storeName, storeList->StoreTypeFlags());
41 storeList->m_Stores.AddTail(newStore);
42 return TRUE; // Continue enumeration
43}
44
45void
47{
49}
StoreType
Definition: CStoreList.hpp:9
DWORD StoreTypeFlags() const
Definition: CStoreList.cpp:15
CStoreList(StoreType type)
Definition: CStoreList.cpp:10
void LoadStores()
Definition: CStoreList.cpp:46
CAtlList< CStore * > m_Stores
Definition: CStoreList.hpp:18
static BOOL CALLBACK s_StoreCallback(const void *pvSystemStore, DWORD dwFlags, PCERT_SYSTEM_STORE_INFO pStoreInfo, void *pvReserved, void *pvArg)
Definition: CStoreList.cpp:31
StoreType m_Type
Definition: CStoreList.hpp:19
Definition: CStore.hpp:9
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
BOOL WINAPI CertEnumSystemStore(DWORD dwFlags, void *pvSystemStoreLocationPara, void *pvArg, PFN_CERT_ENUM_SYSTEM_STORE pfnEnum)
Definition: store.c:1321
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static LPCWSTR LPVOID pvReserved
Definition: asmcache.c:749
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define CERT_SYSTEM_STORE_SERVICES
Definition: wincrypt.h:2534
#define CERT_SYSTEM_STORE_LOCAL_MACHINE
Definition: wincrypt.h:2530
#define CERT_SYSTEM_STORE_CURRENT_USER
Definition: wincrypt.h:2528