ReactOS 0.4.16-dev-1946-g52006dd
unattended.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Applications Manager
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Functions to parse command-line flags and process them
5 * COPYRIGHT: Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
6 * Copyright 2020 He Yang (1160386205@qq.com)
7 */
8
9#include "gui.h"
10#include "unattended.h"
11#include "configparser.h"
12#include <setupapi.h>
13#include <conutils.h>
14
15static BOOL
16MatchCmdOption(LPWSTR argvOption, LPCWSTR szOptToMacth)
17{
18 WCHAR FirstCharList[] = {L'-', L'/'};
19
20 for (UINT i = 0; i < _countof(FirstCharList); i++)
21 {
22 if (argvOption[0] == FirstCharList[i])
23 {
24 return StrCmpIW(argvOption + 1, szOptToMacth) == 0;
25 }
26 }
27 return FALSE;
28}
29
30static void
32{
33 // First, try to attach to our parent's console
35 {
36 // Did we already have a console?
38 {
39 // No, try to open a new one
41 }
42 }
43 ConInitStdStreams(); // Initialize the Console Standard Streams
44}
45
46static CAppInfo *
48{
50 db.GetApps(List, Type);
51 for (POSITION it = List.GetHeadPosition(); it;)
52 {
53 CAppInfo *Info = List.GetNext(it);
54 if (SearchPatternMatch(Info->szDisplayName, Name))
55 {
56 return Info;
57 }
58 }
59 return NULL;
60}
61
62static BOOL
63HandleInstallCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
64{
66 if (argcLeft >= 1 && !StrCmpIW(L"/S", argvLeft[0]))
67 {
69 argvLeft = &argvLeft[1], --argcLeft;
70 }
71
72 if (argcLeft < 1)
73 {
76 return FALSE;
77 }
78
79 CAtlList<CAppInfo *> Applications;
80 for (int i = 0; i < argcLeft; i++)
81 {
82 LPCWSTR PackageName = argvLeft[i];
83 CAppInfo *AppInfo = db->FindByPackageName(PackageName);
84 if (AppInfo)
85 {
86 Applications.AddTail(AppInfo);
87 }
88 }
89
90 return DownloadListOfApplications(Applications, flags);
91}
92
93static BOOL
94HandleSetupCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
95{
97 if (argcLeft >= 1 && !StrCmpIW(L"/S", argvLeft[0]))
98 {
100 argvLeft = &argvLeft[1], --argcLeft;
101 }
102
103 if (argcLeft != 1)
104 {
107 return FALSE;
108 }
109
110 CAtlList<CAppInfo *> Applications;
111 HINF InfHandle = SetupOpenInfFileW(argvLeft[0], NULL, INF_STYLE_WIN4, NULL);
112 if (InfHandle == INVALID_HANDLE_VALUE)
113 {
114 return FALSE;
115 }
116
118 if (SetupFindFirstLineW(InfHandle, L"RAPPS", L"Install", &Context))
119 {
120 WCHAR szPkgName[MAX_PATH];
121 do
122 {
123 if (SetupGetStringFieldW(&Context, 1, szPkgName, _countof(szPkgName), NULL))
124 {
125 CAppInfo *AppInfo = db->FindByPackageName(szPkgName);
126 if (AppInfo)
127 {
128 Applications.AddTail(AppInfo);
129 }
130 }
131 } while (SetupFindNextLine(&Context, &Context));
132 }
133 SetupCloseInfFile(InfHandle);
134
135 return DownloadListOfApplications(Applications, flags);
136}
137
138static BOOL
139HandleUninstallCommand(CAppDB &db, UINT argcLeft, LPWSTR *argvLeft)
140{
141 UINT argi = 0, silent = FALSE, byregkeyname = FALSE;
142 for (; argcLeft; ++argi, --argcLeft)
143 {
144 if (!StrCmpIW(argvLeft[argi], L"/S"))
145 ++silent;
146 else if (!StrCmpIW(argvLeft[argi], L"/K"))
147 ++byregkeyname;
148 else
149 break;
150 }
151 if (argcLeft != 1)
152 return FALSE;
153
155 LPCWSTR name = argvLeft[argi];
156 BOOL retval = FALSE;
157 CAppInfo *pInfo = NULL, *pDelete = NULL;
158
159 if (!byregkeyname)
160 {
161 for (UINT i = ENUM_INSTALLED_MIN; !pInfo && i <= ENUM_INSTALLED_MAX; ++i)
162 {
164 }
165
166 if (!pInfo)
167 {
169 if (p)
170 {
171 CConfigParser *cp = p->GetConfigParser();
172 if (cp && cp->GetString(DB_REGNAME, buf) && !buf.IsEmpty())
173 {
174 name = buf.GetString();
175 byregkeyname = TRUE;
176 }
177 }
178 }
179 }
180
181 if (byregkeyname)
182 {
183 // Force a specific key type if requested (<M|U>[32|64]<\\KeyName>)
184 if (name[0])
185 {
186 REGSAM wow = 0;
187 UINT i = 1;
188 if (name[i] == '3' && name[i + 1])
189 wow = KEY_WOW64_32KEY, i += 2;
190 else if (name[i] == '6' && name[i + 1])
191 wow = KEY_WOW64_64KEY, i += 2;
192
193 if (name[i++] == '\\')
194 {
195 pInfo = CAppDB::CreateInstalledAppInstance(name + i, name[0] == 'U', wow);
196 }
197 }
198
199 if (!pInfo)
200 {
202 }
203 pDelete = pInfo;
204 }
205
206 if (pInfo)
207 {
209 }
210 delete pDelete;
211 return retval;
212}
213
214static BOOL
216{
217 bool bSilent = false;
218 if (argcLeft && !StrCmpIW(argvLeft[0], L"/S"))
219 {
220 bSilent = true;
221 --argcLeft;
222 ++argvLeft;
223 }
224
225 if (argcLeft != 2)
226 return FALSE;
227
229 if (!pAI)
230 return FALSE;
231
232 return ExtractAndRunGeneratedInstaller(*pAI, argvLeft[1], bSilent);
233}
234
235static BOOL
236HandleFindCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
237{
238 if (argcLeft < 1)
239 {
241 return FALSE;
242 }
243
246
247 for (int i = 0; i < argcLeft; i++)
248 {
249 LPCWSTR lpszSearch = argvLeft[i];
251
252 POSITION CurrentListPosition = List.GetHeadPosition();
253 while (CurrentListPosition)
254 {
255 CAppInfo *Info = List.GetNext(CurrentListPosition);
256
257 if (SearchPatternMatch(Info->szDisplayName, lpszSearch) || SearchPatternMatch(Info->szComments, lpszSearch))
258 {
259 ConPrintf(StdOut, L"%s (%s)\n", Info->szDisplayName.GetString(), Info->szIdentifier.GetString());
260 }
261 }
262
263 ConPrintf(StdOut, L"\n");
264 }
265
266 return TRUE;
267}
268
269static BOOL
270HandleInfoCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
271{
272 if (argcLeft < 1)
273 {
275 return FALSE;
276 }
277
278 for (int i = 0; i < argcLeft; i++)
279 {
280 LPCWSTR PackageName = argvLeft[i];
281 CAppInfo *AppInfo = db->FindByPackageName(PackageName);
282 if (!AppInfo)
283 {
285 }
286 else
287 {
289
290 ConPuts(StdOut, AppInfo->szDisplayName);
291
292 if (!AppInfo->szDisplayVersion.IsEmpty())
293 {
296 }
297
298 CStringW License, Size, UrlSite, UrlDownload;
299 AppInfo->GetDisplayInfo(License, Size, UrlSite, UrlDownload);
300
301 if (!License.IsEmpty())
302 {
304 ConPuts(StdOut, License);
305 }
306
307 if (!Size.IsEmpty())
308 {
311 }
312
313 if (!UrlSite.IsEmpty())
314 {
316 ConPuts(StdOut, UrlSite);
317 }
318
319 if (AppInfo->szComments)
320 {
322 ConPuts(StdOut, AppInfo->szComments);
323 }
324
325 if (!UrlDownload.IsEmpty())
326 {
328 ConPuts(StdOut, UrlDownload);
329 }
330 ConPuts(StdOut, L"\n");
331 }
332 ConPuts(StdOut, L"\n");
333 }
334 return TRUE;
335}
336
337static VOID
339{
340 ConPrintf(StdOut, L"\n");
342 ConPrintf(StdOut, L"\n\n");
343
345 ConPrintf(StdOut, L"%ls\n", UsageString);
346}
347
348BOOL
349ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int nCmdShow)
350{
351 INT argc;
352 LPWSTR *argv = CommandLineToArgvW(lpCmdLine, &argc);
353 if (!argv)
354 return FALSE;
355
357
358 BOOL bAppwizMode = (argc > 1 && MatchCmdOption(argv[1], CMD_KEY_APPWIZ));
359 if (!bAppwizMode)
360 {
362 if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch)
363 db.RemoveCached();
364
365 db.UpdateAvailable();
366 }
367
368 db.UpdateInstalled();
369
370 if (argc == 1 || bAppwizMode) // RAPPS is launched without options or APPWIZ mode is requested
371 {
372 // Check whether the RAPPS MainWindow is already launched in another process
373 CStringW szWindowText(MAKEINTRESOURCEW(bAppwizMode ? IDS_APPWIZ_TITLE : IDS_APPTITLE));
374 LPCWSTR pszMutex = bAppwizMode ? L"RAPPWIZ" : MAINWINDOWMUTEX;
375
376 HANDLE hMutex = CreateMutexW(NULL, FALSE, pszMutex);
378 {
379 /* If already started, find its window */
380 HWND hWindow;
381 for (int wait = 2500, inter = 250; wait > 0; wait -= inter)
382 {
383 if ((hWindow = FindWindowW(szWindowClass, szWindowText)) != NULL)
384 break;
385 Sleep(inter);
386 }
387
388 if (hWindow)
389 {
390 /* Activate the window in the other instance */
391 ShowWindow(hWindow, SW_SHOWNA);
392 SwitchToThisWindow(hWindow, TRUE);
393 if (bAppwizMode)
395
396 if (hMutex)
398
399 return FALSE;
400 }
401 }
402 szWindowText.Empty();
403
404 CMainWindow wnd(&db, bAppwizMode);
405 MainWindowLoop(&wnd, nCmdShow);
406
407 if (hMutex)
409
410 return TRUE;
411 }
412
414 {
415 return HandleInstallCommand(&db, argv[1], argc - 2, argv + 2);
416 }
417 else if (MatchCmdOption(argv[1], CMD_KEY_SETUP))
418 {
419 return HandleSetupCommand(&db, argv[1], argc - 2, argv + 2);
420 }
422 {
423 return HandleUninstallCommand(db, argc - 2, argv + 2);
424 }
425 else if (MatchCmdOption(argv[1], CMD_KEY_GENINST))
426 {
427 return HandleGenerateInstallerCommand(db, argc - 2, argv + 2);
428 }
429
431
433 {
434 return HandleFindCommand(&db, argv[1], argc - 2, argv + 2);
435 }
436 else if (MatchCmdOption(argv[1], CMD_KEY_INFO))
437 {
438 return HandleInfoCommand(&db, argv[1], argc - 2, argv + 2);
439 }
441 {
443 return TRUE;
444 }
445 else
446 {
447 // unrecognized/invalid options
450 return FALSE;
451 }
452}
static int argc
Definition: ServiceArgs.c:12
Type
Definition: Type.h:7
#define DB_REGNAME
Definition: appinfo.h:94
@ UCF_NONE
Definition: appinfo.h:74
@ UCF_SILENT
Definition: appinfo.h:75
@ UCF_SAMEPROCESS
Definition: appinfo.h:77
AppsCategories
Definition: appinfo.h:24
@ ENUM_ALL_AVAILABLE
Definition: appinfo.h:25
@ ENUM_INSTALLED_MAX
Definition: appinfo.h:49
@ ENUM_INSTALLED_MIN
Definition: appinfo.h:48
void ConPuts(FILE *fp, LPCWSTR psz)
Definition: fc.c:16
#define ConInitStdStreams()
Definition: fc.c:13
void ConPrintf(FILE *fp, LPCWSTR psz,...)
Definition: fc.c:20
#define StdOut
Definition: fc.c:14
void ConResPrintf(FILE *fp, UINT nID,...)
Definition: fc.c:33
void ConResPuts(FILE *fp, UINT nID)
Definition: fc.c:27
#define IDS_APPTITLE
Definition: resource.h:3
BOOL SearchPatternMatch(LPCWSTR szHaystack, LPCWSTR szNeedle)
Definition: misc.cpp:504
#define IDS_CMD_FIND_RESULT_FOR
Definition: resource.h:237
#define IDS_AINFO_SIZE
Definition: resource.h:173
#define IDS_AINFO_VERSION
Definition: resource.h:171
#define IDS_CMD_PACKAGE_INFO
Definition: resource.h:239
#define IDS_AINFO_LICENSE
Definition: resource.h:175
#define ID_ACTIVATE_APPWIZ
Definition: resource.h:89
#define IDS_AINFO_DESCRIPTION
Definition: resource.h:172
#define IDS_AINFO_URLSITE
Definition: resource.h:174
#define IDS_CMD_USAGE
Definition: resource.h:232
#define IDS_CMD_INVALID_OPTION
Definition: resource.h:236
#define IDS_CMD_NEED_PACKAGE_NAME
Definition: resource.h:233
#define IDS_AINFO_URLDOWNLOAD
Definition: resource.h:176
#define IDS_CMD_NEED_FILE_NAME
Definition: resource.h:234
#define IDS_APPWIZ_TITLE
Definition: resource.h:97
#define IDS_CMD_NEED_PARAMS
Definition: resource.h:235
#define IDS_CMD_PACKAGE_NOT_FOUND
Definition: resource.h:238
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:21
BOOL WINAPI AttachConsole(IN DWORD dwProcessId)
Definition: console.c:147
POSITION AddTail(INARGTYPE element)
Definition: atlcoll.h:629
bool IsEmpty() const noexcept
Definition: atlsimpstr.h:394
void Empty() noexcept
Definition: atlsimpstr.h:253
Definition: appdb.h:9
VOID UpdateAvailable()
Definition: appdb.cpp:130
static CInstalledApplicationInfo * CreateInstalledAppByRegistryKey(LPCWSTR KeyName, HKEY hKeyParent, UINT KeyIndex)
Definition: appdb.cpp:178
CAvailableApplicationInfo * FindAvailableByPackageName(const CStringW &name)
Definition: appdb.cpp:47
CAppInfo * FindByPackageName(const CStringW &name)
Definition: appdb.h:34
static CStringW GetDefaultPath()
Definition: appdb.cpp:39
VOID UpdateInstalled()
Definition: appdb.cpp:245
VOID GetApps(CAtlList< CAppInfo * > &List, AppsCategories Type) const
Definition: appdb.cpp:62
VOID RemoveCached()
Definition: appdb.cpp:300
static CInstalledApplicationInfo * CreateInstalledAppInstance(LPCWSTR KeyName, BOOL User, REGSAM WowSam)
Definition: appdb.cpp:260
virtual BOOL UninstallApplication(UninstallCommandFlags Flags)=0
CStringW szComments
Definition: appinfo.h:123
CStringW szDisplayName
Definition: appinfo.h:121
virtual VOID GetDisplayInfo(CStringW &License, CStringW &Size, CStringW &UrlSite, CStringW &UrlDownload)=0
CStringW szDisplayVersion
Definition: appinfo.h:122
LPWSTR Name
Definition: desk.c:124
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
BOOL WINAPI AllocConsole(void)
Definition: console.c:492
int WINAPI StrCmpIW(const WCHAR *str, const WCHAR *comp)
Definition: string.c:456
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL ExtractAndRunGeneratedInstaller(const CAvailableApplicationInfo &AppInfo, LPCWSTR Archive, bool Silent)
Definition: geninst.cpp:681
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID MainWindowLoop(CMainWindow *wnd, INT nShowCmd)
Definition: gui.cpp:899
#define INF_STYLE_WIN4
Definition: infsupp.h:43
POINT cp
Definition: magnifier.c:59
const TCHAR szWindowClass[]
Definition: magnifier.c:28
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
HANDLE hMutex
Definition: mutex.c:11
#define argv
Definition: mplay32.c:18
static BOOL silent
Definition: msiexec.c:42
unsigned int UINT
Definition: ndis.h:50
INT __cdecl ConResMsgPrintf(IN PCON_STREAM Stream, IN DWORD dwFlags, IN UINT uID,...)
Definition: outstream.c:1461
@ DAF_MODAL
Definition: dialogs.h:14
@ DAF_SILENT
Definition: dialogs.h:13
BOOL DownloadListOfApplications(const CAtlList< CAppInfo * > &AppsList, UINT Flags=0)
Definition: loaddlg.cpp:1192
#define MAINWINDOWMUTEX
Definition: rapps.h:23
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
Definition: shell32_main.c:79
#define _countof(array)
Definition: sndvol32.h:70
BOOL bUpdateAtStart
Definition: settings.h:8
Definition: name.c:39
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexW(IN LPSECURITY_ATTRIBUTES lpMutexAttributes OPTIONAL, IN BOOL bInitialOwner, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:576
rwlock_t lock
Definition: tcpcore.h:0
int32_t INT
Definition: typedefs.h:58
static BOOL HandleInfoCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
Definition: unattended.cpp:270
static BOOL HandleUninstallCommand(CAppDB &db, UINT argcLeft, LPWSTR *argvLeft)
Definition: unattended.cpp:139
static BOOL MatchCmdOption(LPWSTR argvOption, LPCWSTR szOptToMacth)
Definition: unattended.cpp:16
static void InitRappsConsole()
Definition: unattended.cpp:31
static BOOL HandleFindCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
Definition: unattended.cpp:236
static VOID PrintHelpCommand()
Definition: unattended.cpp:338
static BOOL HandleInstallCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
Definition: unattended.cpp:63
static CAppInfo * SearchForAppWithDisplayName(CAppDB &db, AppsCategories Type, LPCWSTR Name)
Definition: unattended.cpp:47
static BOOL HandleGenerateInstallerCommand(CAppDB &db, UINT argcLeft, LPWSTR *argvLeft)
Definition: unattended.cpp:215
static BOOL HandleSetupCommand(CAppDB *db, LPWSTR szCommand, int argcLeft, LPWSTR *argvLeft)
Definition: unattended.cpp:94
BOOL ParseCmdAndExecute(LPWSTR lpCmdLine, BOOL bIsFirstLaunch, int nCmdShow)
Definition: unattended.cpp:349
#define CMD_KEY_INFO
Definition: unattended.h:9
#define CMD_KEY_INSTALL
Definition: unattended.h:6
#define CMD_KEY_SETUP
Definition: unattended.h:7
const WCHAR UsageString[]
Definition: unattended.h:14
#define CMD_KEY_HELP
Definition: unattended.h:10
#define CMD_KEY_UNINSTALL
Definition: unattended.h:5
#define CMD_KEY_HELP_ALT
Definition: unattended.h:11
#define CMD_KEY_GENINST
Definition: unattended.h:4
#define CMD_KEY_APPWIZ
Definition: unattended.h:3
#define CMD_KEY_FIND
Definition: unattended.h:8
BOOL WINAPI SetupGetStringFieldW(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
Definition: infsupp.c:186
BOOL WINAPI SetupFindFirstLineW(IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
Definition: infsupp.c:56
BOOL WINAPI SetupFindNextLine(IN PINFCONTEXT ContextIn, OUT PINFCONTEXT ContextOut)
Definition: infsupp.c:82
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
Definition: infsupp.c:45
int retval
Definition: wcstombs.cpp:91
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
VOID WINAPI SwitchToThisWindow(HWND hwnd, BOOL fAltTab)
Definition: window.c:82
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define ATTACH_PARENT_PROCESS
Definition: wincon.h:43
ACCESS_MASK REGSAM
Definition: winreg.h:76
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1768
#define SW_SHOWNA
Definition: winuser.h:789
#define PostMessage
Definition: winuser.h:5943
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define KEY_WOW64_32KEY
Definition: cmtypes.h:45
#define KEY_WOW64_64KEY
Definition: cmtypes.h:46
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184