ReactOS  0.4.15-dev-5459-gb85f005
registry.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS system libraries
3  * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE: Functions to read RunOnceEx registry.
5  * COPYRIGHT: Copyright 2021 He Yang <1160386205@qq.com>
6  */
7 
8 #pragma once
9 
10 #include <windows.h>
11 #include <atlbase.h>
12 #include <atlstr.h>
13 #include <atlcoll.h>
14 #include <atlsimpcoll.h>
15 
16 #define FLAGS_NO_STAT_DIALOG 0x00000080
17 
18 #ifndef UNICODE
19 #error This project must be compiled with UNICODE!
20 #endif
21 
22 class CRegKeyEx : public CRegKey
23 {
24 public:
26  _In_ DWORD iIndex,
27  _Out_ LPTSTR pszName,
28  _Inout_ LPDWORD pnNameLength);
29 };
30 
32 {
33 private:
36 
37 public:
38 
40  _In_ const ATL::CStringW &Name,
41  _In_ const ATL::CStringW &Value);
42 
43  BOOL Delete(_In_ CRegKeyEx &hParentKey);
44  BOOL Exec() const;
45 
46  friend int RunOnceExEntryCmp(
47  _In_ const void *a,
48  _In_ const void *b);
49 };
50 
52 {
53 private:
56 
59  _In_ const CStringW &ValueName);
60 
61 public:
65 
67  _In_ CRegKeyEx &hParentKey,
68  _In_ const CStringW &lpSubKeyName);
69 
70  RunOnceExSection(_In_ const RunOnceExSection &Section);
71 
72  BOOL CloseAndDelete(_In_ CRegKeyEx &hParentKey);
73 
74  UINT GetEntryCnt() const;
75 
76  BOOL Exec(
77  _Inout_ UINT& iCompleteCnt,
78  _In_ const UINT iTotalCnt);
79 
80  friend int RunOnceExSectionCmp(
81  _In_ const void *a,
82  _In_ const void *b);
83 
84  friend class RunOnceExInstance;
85 };
86 
88 {
89 private:
91 
94  _In_ const CStringW &SubKeyName);
95 
96 public:
102 
103  RunOnceExInstance(_In_ HKEY BaseKey);
104 
106  BOOL Run(_In_ BOOL bSilence);
107 };
RunOnceExInstance(_In_ HKEY BaseKey)
Definition: registry.cpp:227
BOOL HandleSubKey(_In_ CRegKeyEx &hKey, _In_ const CStringW &SubKeyName)
Definition: registry.cpp:339
#define _In_opt_
Definition: ms_sal.h:309
#define _Inout_
Definition: ms_sal.h:378
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ PNDIS_STRING SubKeyName
Definition: ndis.h:4723
CSimpleArray< RunOnceExSection > m_SectionList
Definition: registry.h:98
#define _Out_
Definition: ms_sal.h:345
ATL::CStringW m_SectionName
Definition: registry.h:54
CRegKeyEx m_RegKey
Definition: registry.h:55
BOOL Exec(_Inout_ UINT &iCompleteCnt, _In_ const UINT iTotalCnt)
Definition: registry.cpp:201
CRegKeyEx m_RegKey
Definition: registry.h:90
CHAR * LPTSTR
Definition: xmlstorage.h:192
UINT GetEntryCnt() const
Definition: registry.cpp:196
ATL::CStringW m_Name
Definition: registry.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
BOOL Delete(_In_ CRegKeyEx &hParentKey)
Definition: registry.cpp:27
ATL::CStringW m_Value
Definition: registry.h:34
#define _In_
Definition: ms_sal.h:308
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
ATL::CStringW m_SectionTitle
Definition: registry.h:63
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
BOOL Run(_In_ BOOL bSilence)
Definition: registry.cpp:323
BOOL Exec() const
Definition: registry.cpp:33
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:240
CSimpleArray< RunOnceExEntry > m_EntryList
Definition: registry.h:64
RunOnceExSection(_In_ CRegKeyEx &hParentKey, _In_ const CStringW &lpSubKeyName)
friend int RunOnceExSectionCmp(_In_ const void *a, _In_ const void *b)
Definition: registry.cpp:219
FxAutoRegKey hKey
BOOL HandleValue(_In_ CRegKeyEx &hKey, _In_ const CStringW &ValueName)
Definition: registry.cpp:85
unsigned int UINT
Definition: ndis.h:50
CStringW m_Title
Definition: registry.h:99
LONG EnumValueName(_In_ DWORD iIndex, _Out_ LPTSTR pszName, _Inout_ LPDWORD pnNameLength)
Definition: registry.cpp:12
uint32_t * LPDWORD
Definition: typedefs.h:59
BOOL Exec(_In_opt_ HWND hwnd)
Definition: registry.cpp:293
RunOnceExEntry(_In_ const ATL::CStringW &Name, _In_ const ATL::CStringW &Value)
Definition: registry.cpp:21
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
friend int RunOnceExEntryCmp(_In_ const void *a, _In_ const void *b)
Definition: registry.cpp:77
BOOL CloseAndDelete(_In_ CRegKeyEx &hParentKey)
Definition: registry.cpp:189