ReactOS 0.4.16-dev-1489-g8fbbb41
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#include <shellutils.h>
18#include "shell32_apitest_sub.h"
19
35
36#define REG_APPPATHS L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\"
37
38typedef enum TEST_RESULT
39{
44
45typedef struct TEST_ENTRY
46{
47 INT line;
52
53static void
55
56static void TEST_DoTestEntries(void)
57{
60 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"This is an invalid path.");
73 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"\"test program.exe\"", s_sys_test_exe_cmdline);
76 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"shell:ThisIsAnInvalidName");
77 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"); // My Computer
78 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"); // My Computer (with shell:)
79
81 {
82 WCHAR szCurDir[MAX_PATH];
83 GetCurrentDirectoryW(_countof(szCurDir), szCurDir);
85 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"::{21EC2020-3AEA-1069-A2DD-08002B30309D}"); // Control Panel (without path)
86 SetCurrentDirectoryW(szCurDir);
87 }
88
89 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"); // Control Panel (with path)
90 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:)
91 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:AppData");
92 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common Desktop");
93 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common Programs");
94 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common Start Menu");
95 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common StartUp");
96 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:ControlPanelFolder");
97 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Desktop");
98 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Favorites");
99 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Fonts");
100 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Local AppData");
101 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:My Pictures");
102 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Personal");
103 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Programs");
104 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Recent");
105 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:RecycleBinFolder");
106 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:SendTo");
107 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Start Menu");
108 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:StartUp");
109}
110
111static LPWSTR
113{
114 PEB peb;
118 BOOL ret;
119
122
123 ret = ReadProcessMemory(hProcess, info.PebBaseAddress, &peb, sizeof(peb), NULL);
124 if (!ret)
125 trace("ReadProcessMemory failed (%ld)\n", GetLastError());
126
128 if (!ret)
129 trace("ReadProcessMemory failed (%ld)\n", GetLastError());
130
131 LPWSTR cmdline = Params.CommandLine.Buffer;
132 if (!cmdline)
133 trace("!cmdline\n");
134
135 SIZE_T cbCmdLine = Params.CommandLine.Length;
136 if (!cbCmdLine)
137 trace("!cbCmdLine\n");
138
139 LPWSTR pszBuffer = (LPWSTR)calloc(cbCmdLine + sizeof(WCHAR), 1);
140 if (!pszBuffer)
141 trace("!pszBuffer\n");
142
143 ret = ReadProcessMemory(hProcess, cmdline, pszBuffer, cbCmdLine, NULL);
144 if (!ret)
145 trace("ReadProcessMemory failed (%ld)\n", GetLastError());
146
147 pszBuffer[cbCmdLine / sizeof(WCHAR)] = UNICODE_NULL;
148
149 return pszBuffer; // needs free()
150}
151
153{
154 SHELLEXECUTEINFOW info = { sizeof(info) };
157 info.hwnd = NULL;
158 info.lpVerb = NULL;
159 info.lpFile = pEntry->lpFile;
160 info.nShow = SW_SHOWNORMAL;
161
163
165 if (ret && info.hProcess)
167 else if (ret && !info.hProcess)
169 else
171
172 ok(pEntry->result == result,
173 "Line %d: result: %d vs %d\n", pEntry->line, pEntry->result, result);
174
176 WaitForInputIdle(info.hProcess, 2000);
177
178 if (pEntry->result == TEST_SUCCESS_WITH_PROCESS && pEntry->cmdline && !s_bWow64)
179 {
181 if (!cmdline)
182 {
183 skip("!cmdline\n");
184 }
185 else
186 {
187 ok(lstrcmpiW(pEntry->cmdline, cmdline) == 0,
188 "Line %d: cmdline: '%ls' vs '%ls'\n", pEntry->line,
189 pEntry->cmdline, cmdline);
190 }
191
192 TerminateProcess(info.hProcess, 0xDEADFACE);
193 free(cmdline);
194 }
195
196 CloseHandle(info.hProcess);
197 return result;
198}
199
200static void
202{
203 WINDOW_LIST existingwindows;
204 GetWindowList(&existingwindows);
205 HWND hWndForeground = GetForegroundWindow();
206
207 TEST_ENTRY entry = { line, result, lpFile, cmdline };
209
211 {
212 // Wait a bit for Explorer to open its window
213 for (UINT i = 0; i < 2000 && hWndForeground == GetForegroundWindow(); i += 250)
214 Sleep(250);
215 }
216
217 CloseNewWindows(&existingwindows);
218 FreeWindowList(&existingwindows);
219}
220
221static BOOL
223{
224 HANDLE hToken;
226 return FALSE;
227
228 TOKEN_PRIVILEGES tkp = { 0 };
229 if (!LookupPrivilegeValueW(NULL, pszPrivilege, &tkp.Privileges[0].Luid))
230 return FALSE;
231
232 tkp.PrivilegeCount = 1;
234 return AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, NULL, NULL);
235}
236
238
239static BOOL TEST_Start(void)
240{
241 // Check Wow64
242 s_bWow64 = FALSE;
244 if (s_bWow64)
245 skip("Wow64: Command Line check is skipped\n");
246
247 // getCommandLineFromProcess needs this
249
250 // s_win_dir
252
253 // s_sys_dir
255
256 // s_win_notepad
258 PathAppendW(s_win_notepad, L"notepad.exe");
259
260 // s_sys_notepad
262 PathAppendW(s_sys_notepad, L"notepad.exe");
263
264 // s_win_test_exe
266 PathAppendW(s_win_test_exe, L"test program.exe");
268 if (!ret)
269 {
270 skip("Please retry with admin rights\n");
271 return FALSE;
272 }
273
274 // s_sys_test_exe
276 PathAppendW(s_sys_test_exe, L"test program.exe");
278
279 // s_win_bat_file
281 PathAppendW(s_win_bat_file, L"test program.bat");
282 FILE *fp = _wfopen(s_win_bat_file, L"wb");
283 fprintf(fp, "exit /b 3");
284 fclose(fp);
286
287 // s_sys_bat_file
289 PathAppendW(s_sys_bat_file, L"test program.bat");
290 fp = _wfopen(s_sys_bat_file, L"wb");
291 fprintf(fp, "exit /b 4");
292 fclose(fp);
294
295 // s_win_txt_file
297 PathAppendW(s_win_txt_file, L"test_file.txt");
298 fp = _wfopen(s_win_txt_file, L"wb");
299 fclose(fp);
301
302 // s_sys_txt_file
304 PathAppendW(s_sys_txt_file, L"test_file.txt");
305 fp = _wfopen(s_sys_txt_file, L"wb");
306 fclose(fp);
308
309 // Check .txt settings
312 if (lstrcmpiW(PathFindFileNameW(szPath), L"notepad.exe") != 0)
313 {
314 skip("Please associate .txt with notepad.exe before tests\n");
315 return FALSE;
316 }
317
318 // command lines
320 L"\"%s\" ", s_win_notepad);
322 L"\"%s\" ", s_sys_notepad);
324 L"\"%s\" ", s_win_test_exe);
326 L"\"%s\" ", s_sys_test_exe);
327
329
330 return TRUE;
331}
332
333static void TEST_End(void)
334{
341
342 // Execution can be asynchronous; you have to wait for it to finish.
343 INT nCount = GetWindowCount();
344 for (INT i = 0; i < 100; ++i)
345 {
346 INT nOldCount = nCount;
347 Sleep(3000);
348 nCount = GetWindowCount();
349 if (nOldCount == nCount)
350 break;
351 }
352 Sleep(3000);
353
354 // Close newly-opened window(s)
359}
360
361static void test_properties()
362{
363 HRESULT hrCoInit = CoInitialize(NULL);
364
365 WCHAR Buffer[MAX_PATH * 4];
367
368 SHELLEXECUTEINFOW info = { sizeof(info) };
370 info.lpVerb = L"properties";
371 info.lpFile = Buffer;
372 info.nShow = SW_SHOW;
373
374 BOOL bRet = ShellExecuteExW(&info);
375 ok(bRet, "Failed! (GetLastError(): %d)\n", (int)GetLastError());
376 ok_ptr(info.hInstApp, (HINSTANCE)42);
377
379 if (Extension)
380 {
381 // The inclusion of this depends on the file display settings!
383 }
384
385 // Now retry it with the extension cut off
386 bRet = ShellExecuteExW(&info);
387 ok(bRet, "Failed! (GetLastError(): %d)\n", (int)GetLastError());
388 ok_ptr(info.hInstApp, (HINSTANCE)42);
389
390 // Now retry it with complete garabage
391 info.lpFile = L"complete garbage, cannot run this!";
392 bRet = ShellExecuteExW(&info);
393 ok_int(bRet, 0);
394 ok_ptr(info.hInstApp, (HINSTANCE)2);
395
396 if (SUCCEEDED(hrCoInit))
398}
399
400static void test_sei_lpIDList()
401{
402 // Note: SEE_MASK_FLAG_NO_UI prevents the test from blocking with a MessageBox
404
405 /* This tests ShellExecuteEx with lpIDList for explorer C:\ */
409 if (!pidl)
410 {
411 skip("Unable to initialize test\n");
412 return;
413 }
414
415 SHELLEXECUTEINFOW ShellExecInfo = { sizeof(ShellExecInfo) };
416 ShellExecInfo.nShow = SW_SHOWNORMAL;
418 ShellExecInfo.lpIDList = pidl;
419 BOOL ret = ShellExecuteExW(&ShellExecInfo);
420 ok_int(ret, TRUE);
421 ILFree(pidl);
422
423 /* This tests ShellExecuteEx with lpIDList going through IContextMenu */
424 CCoInit ComInit;
426 if (!pidl)
427 {
428 skip("Unable to initialize test\n");
429 return;
430 }
432 ShellExecInfo.lpIDList = pidl;
433 ret = ShellExecuteExW(&ShellExecInfo);
434 ok_int(ret, TRUE);
435 ILFree(pidl);
436}
437
438static BOOL
439CreateAppPath(LPCWSTR pszName, LPCWSTR pszValue)
440{
441 WCHAR szSubKey[MAX_PATH];
442 StringCchPrintfW(szSubKey, _countof(szSubKey), L"%s\\%s", REG_APPPATHS, pszName);
443
445 HKEY hKey;
447 &hKey, NULL);
448 if (error != ERROR_SUCCESS)
449 trace("Could not create test key (%lu)\n", error);
450
451 DWORD cbValue = (lstrlenW(pszValue) + 1) * sizeof(WCHAR);
452 error = RegSetValueExW(hKey, NULL, 0, REG_SZ, (LPBYTE)pszValue, cbValue);
453 if (error != ERROR_SUCCESS)
454 trace("Could not set value of the test key (%lu)\n", error);
455
457
458 return error == ERROR_SUCCESS;
459}
460
461static VOID
463{
464 WCHAR szSubKey[MAX_PATH];
465 StringCchPrintfW(szSubKey, _countof(szSubKey), L"%s\\%s", REG_APPPATHS, pszName);
466
468 if (error != ERROR_SUCCESS)
469 trace("Could not remove the test key (%lu)\n", error);
470}
471
472static void TEST_AppPath(void)
473{
474 if (CreateAppPath(L"app_path_test.bat", s_win_test_exe))
475 {
476 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"app_path_test.bat");
477 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"app_path_test.bat.exe");
478 DeleteAppPath(L"app_path_test.bat");
479 }
480
481 if (CreateAppPath(L"app_path_test.bat.exe", s_sys_test_exe))
482 {
483 TEST_DoTestEntry(__LINE__, TEST_FAILED, L"app_path_test.bat");
484 TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"app_path_test.bat.exe");
485 DeleteAppPath(L"app_path_test.bat.exe");
486 }
487}
488
489static void test_DoInvalidDir(void)
490{
491 WCHAR szSubProgram[MAX_PATH];
492 if (!FindSubProgram(szSubProgram, _countof(szSubProgram)))
493 {
494 skip("shell32_apitest_sub.exe not found\n");
495 return;
496 }
497
498 DWORD dwExitCode;
500 sei.lpFile = szSubProgram;
501 sei.lpParameters = L"TEST";
502 sei.nShow = SW_SHOWNORMAL;
503
504 // Test invalid path on sei.lpDirectory
505 WCHAR szInvalidPath[MAX_PATH] = L"M:\\This is an invalid path\n";
506 sei.lpDirectory = szInvalidPath;
508 WaitForSingleObject(sei.hProcess, 20 * 1000);
509 GetExitCodeProcess(sei.hProcess, &dwExitCode);
510 ok_long(dwExitCode, 0);
512}
513
515{
516#ifdef _WIN64
517 skip("Win64 is not supported yet\n");
518 return;
519#endif
520
521 if (!TEST_Start())
522 return;
523
524 TEST_AppPath();
529
530 TEST_End();
531}
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 TEST_RESULT 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]
static void test_DoInvalidDir(void)
#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 ok_long(expression, result)
Definition: atltest.h:133
#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
@ ProcessBasicInformation
Definition: cicbase.cpp:44
Definition: bufpool.h:45
static VOID FreeWindowList(PWINDOW_LIST pList)
Definition: closewnd.h:32
static INT GetWindowCount(VOID)
Definition: closewnd.h:174
static VOID CloseNewWindows(PWINDOW_LIST pExisting, PWINDOW_LIST pNew)
Definition: closewnd.h:101
static VOID GetWindowList(PWINDOW_LIST pList)
Definition: closewnd.h:54
#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 GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
Definition: proc.c:1168
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
Definition: proc.c:1532
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4265
WCHAR *WINAPI PathFindFileNameW(const WCHAR *path)
Definition: path.c:1701
LPWSTR WINAPI PathFindExtensionW(const WCHAR *path)
Definition: path.c:1274
BOOL WINAPI PathStripToRootW(WCHAR *path)
Definition: path.c:1195
BOOL WINAPI PathFileExistsW(const WCHAR *path)
Definition: path.c:2607
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
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
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
_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)
#define SUCCEEDED(hr)
Definition: intsafe.h:50
uint32_t entry
Definition: isohybrid.c:63
#define REG_SZ
Definition: layer.c:22
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
#define error(str)
Definition: mkdosfs.c:1605
LPCWSTR szPath
Definition: env.c:37
unsigned int UINT
Definition: ndis.h:50
#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 PathAppendW
Definition: pathcch.h:310
LPITEMIDLIST WINAPI SHCloneSpecialIDList(HWND hwndOwner, int nFolder, BOOL fCreate)
Definition: pidl.c:446
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:1045
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
Definition: pidl.c:1102
#define calloc
Definition: rosglue.h:14
static BOOL FindSubProgram(LPWSTR pszSubProgram, DWORD cchSubProgram)
#define SEE_MASK_NOCLOSEPROCESS
Definition: shellapi.h:33
#define ShellExecuteEx
Definition: shellapi.h:733
#define SEE_MASK_IDLIST
Definition: shellapi.h:27
#define SEE_MASK_NOASYNC
Definition: shellapi.h:35
#define SEE_MASK_WAITFORINPUTIDLE
Definition: shellapi.h:52
#define SEE_MASK_FLAG_DDEWAIT
Definition: shellapi.h:36
#define SEE_MASK_INVOKEIDLIST
Definition: shellapi.h:28
#define SEE_MASK_FLAG_NO_UI
Definition: shellapi.h:38
#define STATUS_SUCCESS
Definition: shellext.h:65
HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult)
Definition: shlexec.cpp:1410
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2552
#define CSIDL_PROFILE
Definition: shlobj.h:2218
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define _countof(array)
Definition: sndvol32.h:70
TCHAR * cmdline
Definition: stretchblt.cpp:32
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
COM Initialisation.
Definition: shellclasses.h:179
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
LPCWSTR lpDirectory
Definition: shellapi.h:340
LPCWSTR lpParameters
Definition: shellapi.h:339
$ULONG PrivilegeCount
Definition: setypes.h:1035
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]
Definition: setypes.h:1036
Definition: parser.c:49
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
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()
_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:416
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define SW_SHOWNORMAL
Definition: winuser.h:781
HWND WINAPI GetForegroundWindow(void)
Definition: ntwrapper.h:392
DWORD WINAPI WaitForInputIdle(_In_ HANDLE, _In_ DWORD)
#define SW_SHOW
Definition: winuser.h:786
#define TOKEN_ADJUST_PRIVILEGES
Definition: setypes.h:942
#define TOKEN_QUERY
Definition: setypes.h:940
#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