ReactOS 0.4.15-dev-7924-g5949c20
ShellExecuteEx.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPLv2+ - See COPYING in the top level directory
4 * PURPOSE: Testing ShellExecuteEx
5 * PROGRAMMER: Yaroslav Veremenko <yaroslav@veremenko.info>
6 * Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
7 */
8
9#include "shelltest.h"
10#include "closewnd.h"
11#include <pstypes.h>
12#include <psfuncs.h>
13#include <stdlib.h>
14#include <stdio.h>
15#include <strsafe.h>
16#include <versionhelpers.h>
17
33
34#define REG_APPPATHS L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\"
35
36typedef enum TEST_RESULT
37{
42
43typedef struct TEST_ENTRY
44{
45 INT line;
50
51static void
53
54static void TEST_DoTestEntries(void)
55{
58 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"This is an invalid path.");
71 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"\"test program.exe\"", s_sys_test_exe_cmdline);
74 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"shell:ThisIsAnInvalidName");
75 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"); // My Computer
76 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"); // My Computer (with shell:)
77
79 {
80 WCHAR szCurDir[MAX_PATH];
81 GetCurrentDirectoryW(_countof(szCurDir), szCurDir);
83 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"::{21EC2020-3AEA-1069-A2DD-08002B30309D}"); // Control Panel (without path)
84 SetCurrentDirectoryW(szCurDir);
85 }
86
87 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"); // Control Panel (with path)
88 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"); // Control Panel (with path and shell:)
89 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:AppData");
90 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common Desktop");
91 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common Programs");
92 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common Start Menu");
93 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common StartUp");
94 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:ControlPanelFolder");
95 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Desktop");
96 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Favorites");
97 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Fonts");
98 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Local AppData");
99 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:My Pictures");
100 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Personal");
101 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Programs");
102 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Recent");
103 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:RecycleBinFolder");
104 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:SendTo");
105 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Start Menu");
106 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:StartUp");
107}
108
109static LPWSTR
111{
112 PEB peb;
116 BOOL ret;
117
120
121 ret = ReadProcessMemory(hProcess, info.PebBaseAddress, &peb, sizeof(peb), NULL);
122 if (!ret)
123 trace("ReadProcessMemory failed (%ld)\n", GetLastError());
124
126 if (!ret)
127 trace("ReadProcessMemory failed (%ld)\n", GetLastError());
128
129 LPWSTR cmdline = Params.CommandLine.Buffer;
130 if (!cmdline)
131 trace("!cmdline\n");
132
133 SIZE_T cbCmdLine = Params.CommandLine.Length;
134 if (!cbCmdLine)
135 trace("!cbCmdLine\n");
136
137 LPWSTR pszBuffer = (LPWSTR)calloc(cbCmdLine + sizeof(WCHAR), 1);
138 if (!pszBuffer)
139 trace("!pszBuffer\n");
140
141 ret = ReadProcessMemory(hProcess, cmdline, pszBuffer, cbCmdLine, NULL);
142 if (!ret)
143 trace("ReadProcessMemory failed (%ld)\n", GetLastError());
144
145 pszBuffer[cbCmdLine / sizeof(WCHAR)] = UNICODE_NULL;
146
147 return pszBuffer; // needs free()
148}
149
151{
152 SHELLEXECUTEINFOW info = { sizeof(info) };
155 info.hwnd = NULL;
156 info.lpVerb = NULL;
157 info.lpFile = pEntry->lpFile;
158 info.nShow = SW_SHOWNORMAL;
159
161
163 if (ret && info.hProcess)
165 else if (ret && !info.hProcess)
167 else
169
170 ok(pEntry->result == result,
171 "Line %d: result: %d vs %d\n", pEntry->line, pEntry->result, result);
172
173 if (pEntry->result == TEST_SUCCESS_WITH_PROCESS && pEntry->cmdline && !s_bWow64)
174 {
176 if (!cmdline)
177 {
178 skip("!cmdline\n");
179 }
180 else
181 {
182 ok(lstrcmpiW(pEntry->cmdline, cmdline) == 0,
183 "Line %d: cmdline: '%ls' vs '%ls'\n", pEntry->line,
184 pEntry->cmdline, cmdline);
185 }
186
187 TerminateProcess(info.hProcess, 0xDEADFACE);
188 free(cmdline);
189 }
190
191 CloseHandle(info.hProcess);
192}
193
194static void
196{
197 TEST_ENTRY entry = { line, result, lpFile, cmdline };
199}
200
201static BOOL
203{
204 HANDLE hToken;
206 return FALSE;
207
208 TOKEN_PRIVILEGES tkp = { 0 };
209 if (!LookupPrivilegeValueW(NULL, pszPrivilege, &tkp.Privileges[0].Luid))
210 return FALSE;
211
212 tkp.PrivilegeCount = 1;
214 return AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, NULL, NULL);
215}
216
218
219static BOOL TEST_Start(void)
220{
221 // Check Wow64
222 s_bWow64 = FALSE;
224 if (s_bWow64)
225 skip("Wow64: Command Line check is skipped\n");
226
227 // getCommandLineFromProcess needs this
229
230 // s_win_dir
232
233 // s_sys_dir
235
236 // s_win_notepad
238 PathAppendW(s_win_notepad, L"notepad.exe");
239
240 // s_sys_notepad
242 PathAppendW(s_sys_notepad, L"notepad.exe");
243
244 // s_win_test_exe
246 PathAppendW(s_win_test_exe, L"test program.exe");
248 if (!ret)
249 {
250 skip("Please retry with admin rights\n");
251 return FALSE;
252 }
253
254 // s_sys_test_exe
256 PathAppendW(s_sys_test_exe, L"test program.exe");
258
259 // s_win_bat_file
261 PathAppendW(s_win_bat_file, L"test program.bat");
262 FILE *fp = _wfopen(s_win_bat_file, L"wb");
263 fprintf(fp, "exit /b 3");
264 fclose(fp);
266
267 // s_sys_bat_file
269 PathAppendW(s_sys_bat_file, L"test program.bat");
270 fp = _wfopen(s_sys_bat_file, L"wb");
271 fprintf(fp, "exit /b 4");
272 fclose(fp);
274
275 // s_win_txt_file
277 PathAppendW(s_win_txt_file, L"test_file.txt");
278 fp = _wfopen(s_win_txt_file, L"wb");
279 fclose(fp);
281
282 // s_sys_txt_file
284 PathAppendW(s_sys_txt_file, L"test_file.txt");
285 fp = _wfopen(s_sys_txt_file, L"wb");
286 fclose(fp);
288
289 // Check .txt settings
292 if (lstrcmpiW(PathFindFileNameW(szPath), L"notepad.exe") != 0)
293 {
294 skip("Please associate .txt with notepad.exe before tests\n");
295 return FALSE;
296 }
297
298 // command lines
300 L"\"%s\" ", s_win_notepad);
302 L"\"%s\" ", s_sys_notepad);
304 L"\"%s\" ", s_win_test_exe);
306 L"\"%s\" ", s_sys_test_exe);
307
309
310 return TRUE;
311}
312
313static void TEST_End(void)
314{
315 Sleep(500);
320
327}
328
329static void test_properties()
330{
331 HRESULT hrCoInit = CoInitialize(NULL);
332
333 WCHAR Buffer[MAX_PATH * 4];
335
336 SHELLEXECUTEINFOW info = { sizeof(info) };
338 info.lpVerb = L"properties";
339 info.lpFile = Buffer;
340 info.nShow = SW_SHOW;
341
342 BOOL bRet = ShellExecuteExW(&info);
343 ok(bRet, "Failed! (GetLastError(): %d)\n", (int)GetLastError());
344 ok_ptr(info.hInstApp, (HINSTANCE)42);
345
347 if (Extension)
348 {
349 // The inclusion of this depends on the file display settings!
351 }
352
353 // Now retry it with the extension cut off
354 bRet = ShellExecuteExW(&info);
355 ok(bRet, "Failed! (GetLastError(): %d)\n", (int)GetLastError());
356 ok_ptr(info.hInstApp, (HINSTANCE)42);
357
358 // Now retry it with complete garabage
359 info.lpFile = L"complete garbage, cannot run this!";
360 bRet = ShellExecuteExW(&info);
361 ok_int(bRet, 0);
362 ok_ptr(info.hInstApp, (HINSTANCE)2);
363
364 if (SUCCEEDED(hrCoInit))
366}
367
368static void test_sei_lpIDList()
369{
371 {
372 skip("Vista+\n");
373 return;
374 }
375
376 /* This tests ShellExecuteEx with lpIDList for explorer C:\ */
377
378 /* ITEMIDLIST for CLSID of 'My Computer' followed by PIDL for 'C:\' */
379 BYTE lpitemidlist[30] = { 0x14, 0, 0x1f, 0, 0xe0, 0x4f, 0xd0, 0x20, 0xea,
380 0x3a, 0x69, 0x10, 0xa2, 0xd8, 0x08, 0, 0x2b, 0x30, 0x30, 0x9d, // My Computer
381 0x8, 0, 0x23, 0x43, 0x3a, 0x5c, 0x5c, 0, 0, 0,}; // C:\\ + NUL-NUL ending
382
383 SHELLEXECUTEINFOW ShellExecInfo = { sizeof(ShellExecInfo) };
384 ShellExecInfo.fMask = SEE_MASK_IDLIST;
385 ShellExecInfo.hwnd = NULL;
386 ShellExecInfo.nShow = SW_SHOWNORMAL;
387 ShellExecInfo.lpIDList = lpitemidlist;
388 BOOL ret = ShellExecuteExW(&ShellExecInfo);
389 ok_int(ret, TRUE);
390}
391
392static BOOL
393CreateAppPath(LPCWSTR pszName, LPCWSTR pszValue)
394{
395 WCHAR szSubKey[MAX_PATH];
396 StringCchPrintfW(szSubKey, _countof(szSubKey), L"%s\\%s", REG_APPPATHS, pszName);
397
399 HKEY hKey;
401 &hKey, NULL);
402 if (error != ERROR_SUCCESS)
403 trace("Could not create test key (%lu)\n", error);
404
405 DWORD cbValue = (lstrlenW(pszValue) + 1) * sizeof(WCHAR);
406 error = RegSetValueExW(hKey, NULL, 0, REG_SZ, (LPBYTE)pszValue, cbValue);
407 if (error != ERROR_SUCCESS)
408 trace("Could not set value of the test key (%lu)\n", error);
409
411
412 return error == ERROR_SUCCESS;
413}
414
415static VOID
417{
418 WCHAR szSubKey[MAX_PATH];
419 StringCchPrintfW(szSubKey, _countof(szSubKey), L"%s\\%s", REG_APPPATHS, pszName);
420
422 if (error != ERROR_SUCCESS)
423 trace("Could not remove the test key (%lu)\n", error);
424}
425
426static void TEST_AppPath(void)
427{
428 if (CreateAppPath(L"app_path_test.bat", s_win_test_exe))
429 {
430 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"app_path_test.bat");
431 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"app_path_test.bat.exe");
432 DeleteAppPath(L"app_path_test.bat");
433 }
434
435 if (CreateAppPath(L"app_path_test.bat.exe", s_sys_test_exe))
436 {
437 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"app_path_test.bat");
438 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"app_path_test.bat.exe");
439 DeleteAppPath(L"app_path_test.bat.exe");
440 }
441}
442
444{
445#ifdef _WIN64
446 skip("Win64 is not supported yet\n");
447 return;
448#endif
449
450 if (!TEST_Start())
451 return;
452
453 TEST_AppPath();
457
458 TEST_End();
459}
static WINDOW_LIST s_List2
static WCHAR s_win_dir[MAX_PATH]
static WCHAR s_sys_bat_file[MAX_PATH]
static WCHAR s_sys_test_exe_cmdline[MAX_PATH]
static BOOL enableTokenPrivilege(LPCWSTR pszPrivilege)
TEST_RESULT
@ TEST_FAILED
@ TEST_SUCCESS_NO_PROCESS
@ TEST_SUCCESS_WITH_PROCESS
static WCHAR s_win_txt_file[MAX_PATH]
static WCHAR s_win_test_exe[MAX_PATH]
static WCHAR s_sys_notepad_cmdline[MAX_PATH]
static WCHAR s_win_test_exe_cmdline[MAX_PATH]
static void test_sei_lpIDList()
static WCHAR s_win_bat_file[MAX_PATH]
static void TEST_DoTestEntry(INT line, TEST_RESULT result, LPCWSTR lpFile, LPCWSTR cmdline=NULL)
static BOOL TEST_Start(void)
static void TEST_DoTestEntryStruct(const TEST_ENTRY *pEntry)
static WCHAR s_win_notepad[MAX_PATH]
static WCHAR s_sys_test_exe[MAX_PATH]
static void test_properties()
static void TEST_AppPath(void)
static BOOL s_bWow64
static WCHAR s_win_notepad_cmdline[MAX_PATH]
static WCHAR s_sys_notepad[MAX_PATH]
static WCHAR s_sys_txt_file[MAX_PATH]
#define REG_APPPATHS
static WINDOW_LIST s_List1
struct TEST_ENTRY TEST_ENTRY
struct TEST_ENTRY * PTEST_ENTRY
static void TEST_DoTestEntries(void)
static void TEST_End(void)
static BOOL CreateAppPath(LPCWSTR pszName, LPCWSTR pszValue)
static WCHAR s_sys_dir[MAX_PATH]
static VOID DeleteAppPath(LPCWSTR pszName)
static LPWSTR getCommandLineFromProcess(HANDLE hProcess)
#define ok_ntstatus(status, expected)
Definition: atltest.h:135
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define ok_int(expression, result)
Definition: atltest.h:134
#define ok_ptr(expression, result)
Definition: atltest.h:108
LONG NTSTATUS
Definition: precomp.h:26
#define RegCloseKey(hKey)
Definition: registry.h:49
Definition: bufpool.h:45
void CloseNewWindows(PWINDOW_LIST List1, PWINDOW_LIST List2)
Definition: closewnd.cpp:66
void GetWindowList(PWINDOW_LIST pList)
Definition: closewnd.cpp:33
void FreeWindowList(PWINDOW_LIST pList)
Definition: closewnd.cpp:11
#define free
Definition: debug_ros.c:5
#define ERROR_SUCCESS
Definition: deptool.c:10
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1239
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
Definition: misc.c:782
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
Definition: security.c:374
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
Definition: security.c:294
#define CloseHandle
Definition: compat.h:739
#define ReadProcessMemory(a, b, c, d, e)
Definition: compat.h:758
#define GetCurrentDirectoryW(x, y)
Definition: compat.h:756
#define GetCurrentProcess()
Definition: compat.h:759
#define IsWow64Process
Definition: compat.h:760
#define MAX_PATH
Definition: compat.h:34
#define lstrlenW
Definition: compat.h:750
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:439
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
Definition: path.c:2249
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1532
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:394
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1777
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_Inout_opt_ PUNICODE_STRING Extension
Definition: fltkernel.h:1092
FxAutoRegKey hKey
PLIST_ENTRY pEntry
Definition: fxioqueue.cpp:4484
Status
Definition: gdiplustypes.h:25
GLuint64EXT * result
Definition: glext.h:11304
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
@ ProcessBasicInformation
Definition: winternl.h:394
#define SUCCEEDED(hr)
Definition: intsafe.h:50
uint32_t entry
Definition: isohybrid.c:63
#define REG_SZ
Definition: layer.c:22
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
#define error(str)
Definition: mkdosfs.c:1605
LPCWSTR szPath
Definition: env.c:37
#define KEY_WRITE
Definition: nt_native.h:1031
#define UNICODE_NULL
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
Definition: query.c:59
#define L(x)
Definition: ntvdm.h:50
#define PathAppendW
Definition: pathcch.h:309
#define calloc
Definition: rosglue.h:14
#define SEE_MASK_NOCLOSEPROCESS
Definition: shellapi.h:31
#define ShellExecuteEx
Definition: shellapi.h:694
#define SEE_MASK_IDLIST
Definition: shellapi.h:27
#define SEE_MASK_NOASYNC
Definition: shellapi.h:33
#define SEE_MASK_WAITFORINPUTIDLE
Definition: shellapi.h:58
#define SEE_MASK_INVOKEIDLIST
Definition: shellapi.h:28
#define SEE_MASK_FLAG_NO_UI
Definition: shellapi.h:36
#define STATUS_SUCCESS
Definition: shellext.h:65
HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult)
Definition: shlexec.cpp:1257
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2391
#define _countof(array)
Definition: sndvol32.h:68
TCHAR * cmdline
Definition: stretchblt.cpp:32
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
Definition: cmd.c:13
INT line
Definition: cmd.c:14
LPCWSTR cmdline
TEST_RESULT result
LPCWSTR lpFile
PRTL_USER_PROCESS_PARAMETERS ProcessParameters
Definition: btrfs_drv.h:1913
$ULONG PrivilegeCount
Definition: setypes.h:1023
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]
Definition: setypes.h:1024
Definition: parser.c:49
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
unsigned char * LPBYTE
Definition: typedefs.h:53
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
VERSIONHELPERAPI IsWindowsVistaOrGreater()
int ret
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:308
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define SE_DEBUG_NAME
Definition: winnt_old.h:385
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define SW_SHOWNORMAL
Definition: winuser.h:770
#define SW_SHOW
Definition: winuser.h:775
#define TOKEN_ADJUST_PRIVILEGES
Definition: setypes.h:930
#define TOKEN_QUERY
Definition: setypes.h:928
#define SE_PRIVILEGE_ENABLED
Definition: setypes.h:63
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193