ReactOS 0.4.15-dev-8222-g9164419
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
22class CRegKeyEx : public CRegKey
23{
24public:
26 _In_ DWORD iIndex,
27 _Out_ LPTSTR pszName,
28 _Inout_ LPDWORD pnNameLength);
29};
30
32{
33private:
36
37public:
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{
53private:
56
59 _In_ const CStringW &ValueName);
60
61public:
65
67 _In_ CRegKeyEx &hParentKey,
68 _In_ const CStringW &lpSubKeyName);
69
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{
89private:
91
94 _In_ const CStringW &SubKeyName);
95
96public:
102
103 RunOnceExInstance(_In_ HKEY BaseKey);
104
106 BOOL Run(_In_ BOOL bSilence);
107};
LONG EnumValueName(_In_ DWORD iIndex, _Out_ LPTSTR pszName, _Inout_ LPDWORD pnNameLength)
Definition: registry.cpp:12
ATL::CStringW m_Value
Definition: registry.h:34
ATL::CStringW m_Name
Definition: registry.h:35
BOOL Delete(_In_ CRegKeyEx &hParentKey)
Definition: registry.cpp:27
friend int RunOnceExEntryCmp(_In_ const void *a, _In_ const void *b)
Definition: registry.cpp:77
BOOL Exec() const
Definition: registry.cpp:33
BOOL HandleSubKey(_In_ CRegKeyEx &hKey, _In_ const CStringW &SubKeyName)
Definition: registry.cpp:339
BOOL Exec(_In_opt_ HWND hwnd)
Definition: registry.cpp:293
CStringW m_Title
Definition: registry.h:99
CSimpleArray< RunOnceExSection > m_SectionList
Definition: registry.h:98
CRegKeyEx m_RegKey
Definition: registry.h:90
ATL::CStringW m_SectionTitle
Definition: registry.h:63
BOOL CloseAndDelete(_In_ CRegKeyEx &hParentKey)
Definition: registry.cpp:189
UINT GetEntryCnt() const
Definition: registry.cpp:196
friend int RunOnceExSectionCmp(_In_ const void *a, _In_ const void *b)
Definition: registry.cpp:219
CSimpleArray< RunOnceExEntry > m_EntryList
Definition: registry.h:64
BOOL HandleValue(_In_ CRegKeyEx &hKey, _In_ const CStringW &ValueName)
Definition: registry.cpp:85
BOOL Exec(_Inout_ UINT &iCompleteCnt, _In_ const UINT iTotalCnt)
Definition: registry.cpp:201
ATL::CStringW m_SectionName
Definition: registry.h:54
CRegKeyEx m_RegKey
Definition: registry.h:55
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
unsigned int UINT
Definition: ndis.h:50
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ PNDIS_STRING SubKeyName
Definition: ndis.h:4725
long LONG
Definition: pedump.c:60
uint32_t * LPDWORD
Definition: typedefs.h:59
struct tagRun Run
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
CHAR * LPTSTR
Definition: xmlstorage.h:192