ReactOS 0.4.16-dev-2320-ge1853c6
comtest.c
Go to the documentation of this file.
1/*
2 * Copyright 2018 Fabian Maurer
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#define COBJMACROS
20#include <stdio.h>
21
22#include "windows.h"
23#include "ole2.h"
24#include "mscoree.h"
25#include "corerror.h"
26#include "shlwapi.h"
27#include "shlobj.h"
28
29#include "wine/test.h"
30
31#include "initguid.h"
32#include "interfaces.h"
33
35
36DEFINE_GUID(IID_ITest2, 0x50adb433, 0xf6c5, 0x3b30, 0x92,0x0a, 0x55,0x57,0x11,0x86,0x75,0x09);
37
38typedef enum _run_type
39{
44
45static BOOL write_resource_file(const char *path_tmp, const char *name_res, const char *name_file, char *path_file)
46{
47 HRSRC rsrc;
48 void *rsrc_data;
49 DWORD rsrc_size;
50 BOOL ret;
51 HANDLE hfile;
52
54 if (!rsrc) return FALSE;
55
57 if (!rsrc_data) return FALSE;
58
59 rsrc_size = SizeofResource(GetModuleHandleA(NULL), rsrc);
60 if (!rsrc_size) return FALSE;
61
62 strcpy(path_file, path_tmp);
63 PathAppendA(path_file, name_file);
65 if (hfile == INVALID_HANDLE_VALUE) return FALSE;
66
67 ret = WriteFile(hfile, rsrc_data, rsrc_size, &rsrc_size, NULL);
68
69 CloseHandle(hfile);
70 return ret;
71}
72
73static BOOL compile_cs_to_dll(char *source_path, char *dest_path)
74{
75 const char *path_csc = "C:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\csc.exe";
76 char cmdline[2 * MAX_PATH + 74];
77 char path_temp[MAX_PATH];
79 STARTUPINFOA si = { 0 };
80 BOOL ret;
81
82 if (!PathFileExistsA(path_csc))
83 {
84 skip("Can't find csc.exe\n");
85 return FALSE;
86 }
87
88 GetTempPathA(MAX_PATH, path_temp);
89 PathAppendA(path_temp, "comtest.dll");
90
91 sprintf(cmdline, "%s /t:library /out:\"%s\" \"%s\"", path_csc, path_temp, source_path);
92
93 si.cb = sizeof(si);
94 ret = CreateProcessA(path_csc, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
95 ok(ret, "Could not create process: %lu\n", GetLastError());
96
100
101 ret = PathFileExistsA(path_temp);
102 ok(ret, "Compilation failed\n");
103
104 ret = MoveFileA(path_temp, dest_path);
105 ok(ret, "Could not move %s to %s: %lu\n", path_temp, dest_path, GetLastError());
106 return ret;
107}
108
109static void run_test(BOOL expect_success)
110{
111 typedef HRESULT (WINAPI *_DllGetClassObject)(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
112 ITest *test = NULL;
113 HRESULT hr;
114 _DllGetClassObject getClassObject;
115 IClassFactory *classFactory = NULL;
116 HRESULT result_expected = expect_success ? S_OK : HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
117
118 hr = CoCreateInstance(&CLSID_Test, NULL, CLSCTX_INPROC_SERVER, &IID_ITest, (void**)&test);
119 todo_wine_if(!expect_success)
120 ok(hr == result_expected, "Expected %lx, got %lx\n", result_expected, hr);
121
122 if (hr == S_OK)
123 {
124 int i = 0;
125 hr = ITest_Func(test, &i);
126 ok(hr == S_OK, "Got %lx\n", hr);
127 ok(i == 42, "Expected 42, got %d\n", i);
128 ITest_Release(test);
129 }
130
131 getClassObject = (_DllGetClassObject)GetProcAddress(hmscoree, "DllGetClassObject");
132 hr = getClassObject(&CLSID_Test, &IID_IClassFactory, (void **)&classFactory);
133 todo_wine_if(!expect_success)
134 ok(hr == result_expected, "Expected %lx, got %lx\n", result_expected, hr);
135
136 if (hr == S_OK)
137 {
138 ITest *test2 = NULL;
139 hr = IClassFactory_CreateInstance(classFactory, NULL, &IID_ITest, (void **)&test2);
140 todo_wine_if(!expect_success)
141 ok(hr == S_OK, "Got %lx\n", hr);
142
143 if (hr == S_OK)
144 {
145 int i = 0;
146 hr = ITest_Func(test2, &i);
147 ok(hr == S_OK, "Got %lx\n", hr);
148 ok(i == 42, "Expected 42, got %d\n", i);
149 ITest_Release(test2);
150 }
151 IClassFactory_Release(classFactory);
152 }
153
154}
155
157{
158 char buffer[256];
159 ITest *test = NULL;
160 HRESULT hr, result_expected;
161 IUnknown *unk = NULL;
162 HKEY hkey;
163 DWORD ret;
164 int i = 0;
165
166 if (run == run_type_exe_directory) result_expected = S_OK;
167 else result_expected = HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
168
169 sprintf(buffer, "CLSID\\%s", wine_dbgstr_guid(&CLSID_Test));
172 {
173 win_skip("cannot run the registry tests due to user not being admin\n");
174 RegCloseKey(hkey);
175 return;
176 }
177 ok(ret == ERROR_SUCCESS, "RegCreateKeyA returned %lx\n", ret);
178
179 ret = RegSetKeyValueA(hkey, "InprocServer32", NULL, REG_SZ, "mscoree.dll", 11);
180 ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %lx\n", ret);
181 ret = RegSetKeyValueA(hkey, "InprocServer32", "Assembly", REG_SZ, "comtest, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", 74);
182 ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %lx\n", ret);
183 ret = RegSetKeyValueA(hkey, "InprocServer32", "Class", REG_SZ, "DLL.Test", 8);
184 ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %lx\n", ret);
185 ret = RegSetKeyValueA(hkey, "InprocServer32", "CodeBase", REG_SZ, "file:///U:/invalid/path/to/comtest.dll", 41);
186 ok(ret == ERROR_SUCCESS, "RegSetKeyValueA returned %lx\n", ret);
187
188 hr = CoCreateInstance(&CLSID_Test, NULL, CLSCTX_INPROC_SERVER, &IID_ITest, (void**)&test);
189 todo_wine_if(result_expected != S_OK)
190 ok(hr == result_expected, "Expected %lx, got %lx\n", result_expected, hr);
191
192 if (hr == S_OK)
193 {
194 hr = ITest_Func(test, &i);
195 ok(hr == S_OK, "Got %lx\n", hr);
196 ok(i == 42, "Expected 42, got %d\n", i);
197 hr = ITest_QueryInterface(test, &IID_ITest2, (void**)&unk);
198 ok(hr == S_OK, "ITest_QueryInterface returned %lx\n", hr);
199 if (hr == S_OK) IUnknown_Release(unk);
200 ITest_Release(test);
201 }
202
203 RegDeleteKeyValueA(hkey, "InprocServer32", "CodeBase");
204 RegDeleteKeyValueA(hkey, "InprocServer32", "Class");
205 RegDeleteKeyValueA(hkey, "InprocServer32", "Assembly");
206 RegDeleteKeyValueA(hkey, "InprocServer32", NULL);
207 RegDeleteKeyA(hkey, "InprocServer32");
208 RegCloseKey(hkey);
209}
210
211static void get_dll_path_for_run(char *path_dll, UINT path_dll_size, run_type run)
212{
213 char path_tmp[MAX_PATH];
214
215 GetTempPathA(MAX_PATH, path_tmp);
216
217 switch (run)
218 {
220 strcpy(path_dll, path_tmp);
221 PathAppendA(path_dll, "comtest.dll");
222 break;
224 GetModuleFileNameA(NULL, path_dll, path_dll_size);
225 PathRemoveFileSpecA(path_dll);
226 PathAppendA(path_dll, "comtest.dll");
227 break;
229 GetSystemDirectoryA(path_dll, path_dll_size);
230 PathAppendA(path_dll, "comtest.dll");
231 break;
232 }
233}
234static void prepare_and_run_test(const char *dll_source, run_type run)
235{
236 char path_tmp[MAX_PATH];
237 char path_tmp_manifest[MAX_PATH];
238 char path_dll[MAX_PATH];
239 char path_dll_source[MAX_PATH];
240 char path_manifest_dll[MAX_PATH];
241 char path_manifest_exe[MAX_PATH];
243 ACTCTXA context = {0};
245 HANDLE handle_context = 0;
246
247 path_manifest_exe[0] = path_manifest_dll[0] = path_dll_source[0] = 0;
248
249 GetTempPathA(MAX_PATH, path_tmp);
250 GetTempPathA(MAX_PATH, path_tmp_manifest);
251 PathAppendA(path_tmp_manifest, "manifests");
252
253 CreateDirectoryA(path_tmp_manifest, NULL);
254
255 if (run == run_type_system32)
256 {
257 if (!IsUserAnAdmin())
258 {
259 skip("Can't test dll in system32 due to user not being admin.\n");
260 return;
261 }
262 }
263
264 if (!write_resource_file(path_tmp, dll_source, "comtest.cs", path_dll_source))
265 {
266 ok(0, "run: %d, Failed to create file for testing\n", run);
267 goto cleanup;
268 }
269
270 get_dll_path_for_run(path_dll, sizeof(path_dll), run);
271
272 if (!compile_cs_to_dll(path_dll_source, path_dll))
273 goto cleanup;
274
275 if (!write_resource_file(path_tmp_manifest, "comtest_exe.manifest", "exe.manifest", path_manifest_exe))
276 {
277 ok(0, "run: %d, Failed to create file for testing\n", run);
278 goto cleanup;
279 }
280
281 if (!write_resource_file(path_tmp_manifest, "comtest_dll.manifest", "comtest.manifest", path_manifest_dll))
282 {
283 ok(0, "run: %d, Failed to create file for testing\n", run);
284 goto cleanup;
285 }
286
287 context.cbSize = sizeof(ACTCTXA);
288 context.lpSource = path_manifest_exe;
289 context.lpAssemblyDirectory = path_tmp_manifest;
290 context.dwFlags = ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID;
291
292 handle_context = CreateActCtxA(&context);
293 ok(handle_context != NULL && handle_context != INVALID_HANDLE_VALUE, "run: %d, CreateActCtxA failed: %ld\n", run, GetLastError());
294
295 if (handle_context == NULL || handle_context == INVALID_HANDLE_VALUE)
296 {
297 ok(0, "run: %d, Failed to create activation context\n", run);
298 goto cleanup;
299 }
300
301 success = ActivateActCtx(handle_context, &cookie);
302 ok(success, "run: %d, ActivateActCtx failed: %ld\n", run, GetLastError());
303
305 SetCurrentDirectoryA(path_tmp);
306
309
310cleanup:
311 if (handle_context != NULL && handle_context != INVALID_HANDLE_VALUE)
312 {
314 ok(success, "run: %d, DeactivateActCtx failed: %ld\n", run, GetLastError());
315 ReleaseActCtx(handle_context);
316 }
317 if (*path_manifest_exe)
318 {
319 success = DeleteFileA(path_manifest_exe);
320 ok(success, "run: %d, DeleteFileA failed: %ld\n", run, GetLastError());
321 }
322 if(*path_manifest_dll)
323 {
324 success = DeleteFileA(path_manifest_dll);
325 ok(success, "run: %d, DeleteFileA failed: %ld\n", run, GetLastError());
326 }
327 if(*path_dll_source)
328 {
329 success = DeleteFileA(path_dll_source);
330 ok(success, "run: %d, DeleteFileA failed: %ld\n", run, GetLastError());
331 }
332 RemoveDirectoryA(path_tmp_manifest);
333 /* dll cleanup is handled by the parent, because it might still be used by the child */
334}
335
336
337static void cleanup_test(run_type run)
338{
339 char path_dll[MAX_PATH];
341
342 get_dll_path_for_run(path_dll, sizeof(path_dll), run);
343
344 if (!PathFileExistsA(path_dll))
345 return;
346
347 success = DeleteFileA(path_dll);
348 if (!success)
349 {
350 Sleep(500);
351 success = DeleteFileA(path_dll);
352 }
353 ok(success, "DeleteFileA failed: %ld\n", GetLastError());
354}
355
356static void run_child_process(const char *dll_source, run_type run)
357{
358 char cmdline[MAX_PATH];
359 char exe[MAX_PATH];
360 char **argv;
362 STARTUPINFOA si = { 0 };
363 BOOL ret;
364
366
367 if (strstr(argv[0], ".exe"))
368 sprintf(exe, "%s", argv[0]);
369 else
370 sprintf(exe, "%s.exe", argv[0]);
371 sprintf(cmdline, "\"%s\" %s %s %d", argv[0], argv[1], dll_source, run);
372
373 si.cb = sizeof(si);
374 ret = CreateProcessA(exe, cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
375 ok(ret, "Could not create process: %lu\n", GetLastError());
376
378
381
382 /* Cleanup dll, because it might still have been used by the child */
383 cleanup_test(run);
384}
385
387{
388 int argc;
389 char **argv;
390
392
393 hmscoree = LoadLibraryA("mscoree.dll");
394 if (!hmscoree)
395 {
396 skip(".NET or mono not available\n");
397 return;
398 }
399
401 if (argc > 2)
402 {
403 const char *dll_source = argv[2];
404 run_type run = atoi(argv[3]);
405 prepare_and_run_test(dll_source, run);
406
407 goto cleanup;
408 }
409
413
414cleanup:
417}
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
Definition: registry.h:49
static void run_registry_test(run_type run)
Definition: comtest.c:156
static BOOL compile_cs_to_dll(char *source_path, char *dest_path)
Definition: comtest.c:73
enum _run_type run_type
HMODULE hmscoree
Definition: comtest.c:34
static void get_dll_path_for_run(char *path_dll, UINT path_dll_size, run_type run)
Definition: comtest.c:211
_run_type
Definition: comtest.c:39
@ run_type_current_working_directory
Definition: comtest.c:40
@ run_type_system32
Definition: comtest.c:42
@ run_type_exe_directory
Definition: comtest.c:41
static BOOL write_resource_file(const char *path_tmp, const char *name_res, const char *name_file, char *path_file)
Definition: comtest.c:45
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1179
LONG WINAPI RegSetKeyValueA(IN HKEY hKey, IN LPCSTR lpSubKey OPTIONAL, IN LPCSTR lpValueName OPTIONAL, IN DWORD dwType, IN LPCVOID lpData OPTIONAL, IN DWORD cbData)
Definition: reg.c:2210
LONG WINAPI RegDeleteKeyValueA(IN HKEY hKey, IN LPCSTR lpSubKey OPTIONAL, IN LPCSTR lpValueName OPTIONAL)
Definition: reg.c:1392
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1224
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
#define CloseHandle
Definition: compat.h:739
#define GetProcAddress(x, y)
Definition: compat.h:753
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define FreeLibrary(x)
Definition: compat.h:748
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
static void cleanup(void)
Definition: main.c:1335
VOID WINAPI ReleaseActCtx(IN HANDLE hActCtx)
Definition: actctx.c:208
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
Definition: actctx.c:268
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
Definition: actctx.c:237
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
Definition: dir.c:682
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:37
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:539
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
Definition: path.c:2125
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:1973
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
Definition: path.c:2202
HANDLE WINAPI CreateActCtxA(PCACTCTXA pActCtx)
Definition: actctx.c:26
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
Definition: res.c:155
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
BOOL WINAPI PathRemoveFileSpecA(char *path)
Definition: path.c:1108
BOOL WINAPI PathFileExistsA(const char *path)
Definition: path.c:2590
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
Definition: process.c:686
MonoAssembly int argc
Definition: metahost.c:107
_ACRTIMP int __cdecl atoi(const char *)
Definition: string.c:1715
_ACRTIMP char *__cdecl strstr(const char *, const char *)
Definition: string.c:3415
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:531
return ret
Definition: mutex.c:146
void test2()
Definition: ehthrow.cxx:284
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint buffer
Definition: glext.h:5915
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
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define REG_SZ
Definition: layer.c:22
#define win_skip
Definition: minitest.h:67
#define todo_wine_if(is_todo)
Definition: minitest.h:81
#define CREATE_ALWAYS
Definition: disk.h:72
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define sprintf
Definition: sprintf.c:45
static const GUID CLSID_Test
Definition: atl.c:35
static void run_child_process(void)
Definition: actctx.c:2713
static PROCESS_INFORMATION pi
Definition: debugger.c:2303
static SYSTEM_INFO si
Definition: virtual.c:39
static void prepare_and_run_test(void)
Definition: sxs.c:112
BOOL WINAPI MoveFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName)
Definition: moveansi.c:23
#define argv
Definition: mplay32.c:18
#define run_test(test)
Definition: ms_seh.c:71
unsigned int UINT
Definition: ndis.h:50
#define GENERIC_WRITE
Definition: nt_native.h:90
#define PathAppendA
Definition: pathcch.h:309
#define RT_RCDATA
Definition: pedump.c:372
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define test
Definition: rosglue.h:37
strcpy
Definition: string.h:131
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:206
int winetest_get_mainargs(char ***pargv)
#define wait_child_process
Definition: test.h:177
static void cleanup_test(void)
Definition: shlexec.c:2780
HRESULT hr
Definition: shlfolder.c:183
BOOL WINAPI IsUserAnAdmin(void)
Definition: shellord.c:2808
TCHAR * cmdline
Definition: stretchblt.cpp:32
Definition: http.c:7252
Definition: cookie.c:34
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:726
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
const char * LPCSTR
Definition: xmlstorage.h:183