ReactOS 0.4.15-dev-8093-g3285f69
ole_server.c
Go to the documentation of this file.
1/*
2 * OLE client/server test suite
3 *
4 * Copyright 2013 Dmitry Timoshkov
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#define COBJMACROS
22#define CONST_VTABLE
23
24#include <windows.h>
25#include <exdisp.h>
26#include <tlhelp32.h>
27#include <stdio.h>
28#include <assert.h>
29#include "wine/test.h"
30
31#include <initguid.h>
32DEFINE_GUID(CLSID_WineTestObject, 0xdeadbeef,0xdead,0xbeef,0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef);
33DEFINE_GUID(CLSID_UnknownUnmarshal,0x4c1e39e1,0xe3e3,0x4296,0xaa,0x86,0xec,0x93,0x8d,0x89,0x6e,0x92);
34
36{
38};
39
40static const struct
41{
42 const GUID *guid;
43 const char *name;
44} guid_name[] =
45{
46#define GUID_NAME(guid) \
47 { &IID_##guid, #guid }
56 { &CLSID_IdentityUnmarshal, "CLSID_IdentityUnmarshal" },
57 { &CLSID_UnknownUnmarshal, "CLSID_UnknownUnmarshal" },
58#undef GUID_NAME
59};
60
62
63static const char *debugstr_guid(const GUID *guid)
64{
65 int i;
66
67 if (!guid) return "(null)";
68
69 for (i = 0; i < ARRAY_SIZE(guid_name); i++)
70 {
72 return guid_name[i].name;
73 }
74
75 return wine_dbgstr_guid(guid);
76}
77
78/******************************* OLE server *******************************/
79typedef struct
80{
84
86{
87 return CONTAINING_RECORD(iface, UnknownImpl, IUnknown_iface);
88}
89
91 REFIID iid, void **ppv)
92{
94
95 trace("server: unknown_QueryInterface: %p,%s,%p\n", iface, debugstr_guid(iid), ppv);
96
97 if (!ppv) return E_INVALIDARG;
98
99 if (IsEqualIID(&IID_IUnknown, iid))
100 {
101 *ppv = &This->IUnknown_iface;
102 IUnknown_AddRef(&This->IUnknown_iface);
103 return S_OK;
104 }
105
106 *ppv = NULL;
107 return E_NOINTERFACE;
108}
109
111{
114
116
117 trace("server: unknown_AddRef: %p, ref %u\n", iface, ref);
118 return ref;
119}
120
122{
125
127
128 trace("server: unknown_Release: %p, ref %u\n", iface, ref);
129 if (ref == 0) HeapFree(GetProcessHeap(), 0, This);
130 return ref;
131}
132
133static const IUnknownVtbl UnknownImpl_Vtbl =
134{
138};
139
140typedef struct
141{
142 IClassFactory IClassFactory_iface;
143 LONG ref;
145
147{
148 return CONTAINING_RECORD(iface, ClassFactoryImpl, IClassFactory_iface);
149}
150
152 REFIID iid, void **ppv)
153{
155
156 trace("server: factory_QueryInterface: %p,%s,%p\n", iface, debugstr_guid(iid), ppv);
157
158 if (!ppv) return E_INVALIDARG;
159
160 if (IsEqualIID(&IID_IUnknown, iid) ||
162 {
163 IClassFactory_AddRef(&This->IClassFactory_iface);
164 *ppv = &This->IClassFactory_iface;
165 return S_OK;
166 }
167
168 *ppv = NULL;
169 return E_NOINTERFACE;
170}
171
173{
176
178
179 trace("server: factory_AddRef: %p, ref %u\n", iface, ref);
180 return ref;
181}
182
184{
187
189
190 trace("server: factory_Release: %p, ref %u\n", iface, ref);
191 return ref;
192}
193
195 IUnknown *punkouter, REFIID iid, void **ppv)
196{
198 HRESULT hr;
199
200 trace("server: factory_CreateInstance: %p,%s,%p\n", iface, debugstr_guid(iid), ppv);
201
202 if (punkouter) return CLASS_E_NOAGGREGATION;
203
204 unknown = HeapAlloc(GetProcessHeap(), 0, sizeof(*unknown));
205 if (!unknown) return E_OUTOFMEMORY;
206
207 unknown->IUnknown_iface.lpVtbl = &UnknownImpl_Vtbl;
208 unknown->ref = 0;
209 IUnknown_AddRef(&unknown->IUnknown_iface);
210
211 hr = IUnknown_QueryInterface(&unknown->IUnknown_iface, iid, ppv);
212 IUnknown_Release(&unknown->IUnknown_iface);
213
214 return hr;
215}
216
218{
220
221 trace("server: factory_LockServer: %p,%d, ref %u\n", iface, lock, ref);
222 return S_OK;
223}
224
225static const IClassFactoryVtbl ClassFactoryImpl_Vtbl =
226{
232};
233
235
236static void ole_server(void)
237{
238 HRESULT hr;
239 DWORD key;
240
241 trace("server: starting %u\n", GetCurrentProcessId());
242
244 if (hr == S_OK)
245 {
246 trace("server: registering class object\n");
247 hr = CoRegisterClassObject(&CLSID_WineTestObject, (IUnknown *)&factory.IClassFactory_iface,
248 CLSCTX_SERVER, REGCLS_MULTIPLEUSE, &key);
249 if (hr == S_OK)
250 {
251 HANDLE done_event, init_done_event;
252
253 done_event = OpenEventA(SYNCHRONIZE, FALSE, "ole_server_done_event");
254 ok(done_event != 0, "server: OpenEvent error %d\n", GetLastError());
255 init_done_event = OpenEventA(EVENT_MODIFY_STATE, FALSE, "ole_server_init_done_event");
256 ok(init_done_event != 0, "server: OpenEvent error %d\n", GetLastError());
257
258 SetEvent(init_done_event);
259
260 trace("server: waiting for requests\n");
261 WaitForSingleObject(done_event, INFINITE);
262
263 /* 1 remainining class ref is supposed to be cleared by CoRevokeClassObject */
264 ok(class_ref == 1, "expected 1 class refs, got %d\n", class_ref);
265 ok(!obj_ref, "expected 0 object refs, got %d\n", obj_ref);
266 ok(!server_locks, "expected 0 server locks, got %d\n", server_locks);
267
268 CloseHandle(done_event);
269 CloseHandle(init_done_event);
270 if (0)
271 {
272 /* calling CoRevokeClassObject terminates process under Win7 */
273 trace("call CoRevokeClassObject\n");
275 trace("ret CoRevokeClassObject\n");
276 }
277 }
278 trace("server: call CoUninitialize\n");
280 trace("server: ret CoUninitialize\n");
281 }
282
283 trace("server: exiting %u\n", GetCurrentProcessId());
284}
285
286/******************************* OLE client *******************************/
287static BOOL register_server(const char *server, BOOL inproc_handler)
288{
289 static const WCHAR clsidW[] = {'C','L','S','I','D','\\',0};
290 DWORD ret;
291 HKEY root;
292 WCHAR buf[39 + 6];
293 char server_path[MAX_PATH];
294
295 lstrcpyA(server_path, server);
296 lstrcatA(server_path, " ole_server");
297
299 StringFromGUID2(&CLSID_WineTestObject, buf + 6, 39);
300
303 if (ret == ERROR_SUCCESS)
304 {
305 ret = RegSetValueA(root, "LocalServer32", REG_SZ, server_path, strlen(server_path));
306 ok(ret == ERROR_SUCCESS, "RegSetValue error %u\n", ret);
307
308 if (inproc_handler)
309 {
310 ret = RegSetValueA(root, "InprocHandler32", REG_SZ, "ole32.dll", 9);
311 ok(ret == ERROR_SUCCESS, "RegSetValue error %u\n", ret);
312 }
313
315 }
316
317 return ret == ERROR_SUCCESS;
318}
319
320static void unregister_server(void)
321{
322 static const WCHAR clsidW[] = {'C','L','S','I','D','\\',0};
323 DWORD ret;
324 HKEY root;
325 WCHAR buf[39 + 6];
326
328 StringFromGUID2(&CLSID_WineTestObject, buf + 6, 39);
329
331 DELETE, NULL, &root, NULL);
332 if (ret == ERROR_SUCCESS)
333 {
334 ret = RegDeleteKeyA(root, "InprocHandler32");
335 ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret);
336 ret = RegDeleteKeyA(root, "LocalServer32");
337 ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret);
338 ret = RegDeleteKeyA(root, "");
339 ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret);
341 }
342}
343
344static HANDLE start_server(const char *argv0)
345{
347 STARTUPINFOA si;
349 char cmdline[MAX_PATH * 2];
350 BOOL ret;
351
352 memset(&si, 0, sizeof(si));
353 si.cb = sizeof(si);
357 si.hStdError = si.hStdOutput;
358
359 sa.nLength = sizeof(sa);
360 sa.lpSecurityDescriptor = NULL;
361 sa.bInheritHandle = TRUE;
362
363 sprintf(cmdline, "\"%s\" ole_server -server", argv0);
364 ret = CreateProcessA(argv0, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi);
365 ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError());
366 if (!ret) return 0;
367
368 CloseHandle(pi.hThread);
369 return pi.hProcess;
370}
371
373{
374 CLSID clsid = CLSID_WineTestObject;
375 HRESULT hr;
378 IOleObject *oleobj;
379 IRunnableObject *runobj;
380 DWORD ret;
381 HANDLE mapping, done_event, init_done_event, process;
382 struct winetest_info *info;
383 int argc;
384 char **argv;
385
386 mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, "winetest_ole_server");
387 ok(mapping != 0, "CreateFileMapping failed\n");
389
391
392 done_event = CreateEventA(NULL, TRUE, FALSE, "ole_server_done_event");
393 ok(done_event != 0, "CreateEvent error %d\n", GetLastError());
394 init_done_event = CreateEventA(NULL, TRUE, FALSE, "ole_server_init_done_event");
395 ok(init_done_event != 0, "CreateEvent error %d\n", GetLastError());
396
397 if (argc > 2)
398 {
399 if (!lstrcmpiA(argv[2], "-Embedding"))
400 {
401 trace("server: Refusing to be run by ole32\n");
402 return;
403 }
404
405 if (!lstrcmpiA(argv[2], "-server"))
406 {
407 info->child_failures = 0;
408 ole_server();
409 info->child_failures = winetest_get_failures();
410 return;
411 }
412
413 trace("server: Unknown parameter: %s\n", argv[2]);
414 return;
415 }
416
417 if (!register_server(argv[0], FALSE))
418 {
419 win_skip("not enough permissions to create a server CLSID key\n");
420 return;
421 }
422
423 if (!(process = start_server(argv[0])))
424 {
426 return;
427 }
428 WaitForSingleObject(init_done_event, 5000);
429
431 ok(hr == S_OK, "OleInitialize error %#x\n", hr);
432
433 hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void **)&unknown);
434 ok(hr == REGDB_E_CLASSNOTREG, "expected REGDB_E_CLASSNOTREG, got %#x\n", hr);
435
436 if (!register_server(argv[0], TRUE))
437 {
438 win_skip("not enough permissions to create a server CLSID key\n");
440 return;
441 }
442
443 trace("call CoCreateInstance(&IID_NULL)\n");
444 hr = CoCreateInstance(&clsid, NULL, CLSCTX_LOCAL_SERVER, &IID_NULL, (void **)&unknown);
445 trace("ret CoCreateInstance(&IID_NULL)\n");
446 ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr);
447
448 /* in-process handler supports IID_IUnknown starting from Vista */
449 trace("call CoCreateInstance(&IID_IUnknown)\n");
450 hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_HANDLER, &IID_IUnknown, (void **)&unknown);
451 trace("ret CoCreateInstance(&IID_IUnknown)\n");
452 ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG) /* XP,win2000 and earlier */, "CoCreateInstance(IID_IUnknown) error %#x\n", hr);
453 if (hr != S_OK)
454 {
455 win_skip("In-process handler doesn't support IID_IUnknown on this platform\n");
457 }
458
459 trace("call CoCreateInstance(&IID_IOleObject)\n");
460 hr = CoCreateInstance(&clsid, NULL, CLSCTX_LOCAL_SERVER, &IID_IOleObject, (void **)&oleobj);
461 trace("ret CoCreateInstance(&IID_IOleObject)\n");
462 ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr);
463
464 trace("call IUnknown_QueryInterface(&IID_IRunnableObject)\n");
465 hr = IUnknown_QueryInterface(unknown, &IID_IRunnableObject, (void **)&runobj);
466 trace("ret IUnknown_QueryInterface(&IID_IRunnableObject)\n");
467 ok(hr == S_OK, "QueryInterface(&IID_IRunnableObject) error %#x\n", hr);
468
469 ret = IRunnableObject_IsRunning(runobj);
470 ok(!ret, "expected 0, got %d\n", ret);
471
472 trace("call OleRun\n");
473 hr = OleRun(unknown);
474 trace("ret OleRun\n");
476 ok(hr == S_OK, "OleRun error %#x\n", hr);
477
478 ret = IRunnableObject_IsRunning(runobj);
480 ok(ret == 1, "expected 1, got %d\n", ret);
481
482 trace("call IRunnableObject_Release\n");
483 ret = IRunnableObject_Release(runobj);
484 trace("ret IRunnableObject_Release\n");
485 ok(ret == 1, "expected ref 1, got %u\n", ret);
486
487 trace("call IUnknown_QueryInterface(&IID_IOleObject)\n");
488 hr = IUnknown_QueryInterface(unknown, &IID_IOleObject, (void **)&oleobj);
489 trace("ret IUnknown_QueryInterface(&IID_IOleObject)\n");
490 ok(hr == S_OK, "QueryInterface(&IID_IOleObject) error %#x\n", hr);
491
492 trace("call IOleObject_Release\n");
493 ret = IOleObject_Release(oleobj);
494 trace("ret IOleObject_Release\n");
495 ok(ret == 1, "expected ref 1, got %u\n", ret);
496
497 trace("call IUnknown_Release\n");
498 ret = IUnknown_Release(unknown);
499 trace("ret IUnknown_Release\n");
500 ok(!ret, "expected ref 0, got %u\n", ret);
501
503 /* local server supports IID_IUnknown */
504 trace("call CoCreateInstance(&IID_IUnknown)\n");
505 hr = CoCreateInstance(&clsid, NULL, CLSCTX_LOCAL_SERVER, &IID_IUnknown, (void **)&unknown);
506 trace("ret CoCreateInstance(&IID_IUnknown)\n");
507 ok(hr == S_OK, "CoCreateInstance(IID_IUnknown) error %#x\n", hr);
508
509 trace("call IUnknown_QueryInterface(&IID_IRunnableObject)\n");
510 hr = IUnknown_QueryInterface(unknown, &IID_IRunnableObject, (void **)&runobj);
511 trace("ret IUnknown_QueryInterface(&IID_IRunnableObject)\n");
512 ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr);
513
514 trace("call OleRun\n");
515 hr = OleRun(unknown);
516 trace("ret OleRun\n");
517 ok(hr == S_OK, "OleRun error %#x\n", hr);
518
519 trace("call IUnknown_QueryInterface(&IID_IOleObject)\n");
520 hr = IUnknown_QueryInterface(unknown, &IID_IOleObject, (void **)&oleobj);
521 trace("ret IUnknown_QueryInterface(&IID_IOleObject)\n");
522 ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr);
523
524 trace("call IUnknown_Release\n");
525 ret = IUnknown_Release(unknown);
526 trace("ret IUnknown_Release\n");
527 ok(!ret, "expected ref 0, got %u\n", ret);
528
529 trace("call CoGetClassObject(&IID_IClassFactory)\n");
530 hr = CoGetClassObject(&clsid, CLSCTX_LOCAL_SERVER, NULL, &IID_IClassFactory, (void **)&factory);
531 trace("ret CoGetClassObject(&IID_IClassFactory)\n");
532 ok(hr == S_OK, "CoGetClassObject error %#x\n", hr);
533
534 trace("call IClassFactory_CreateInstance(&IID_NULL)\n");
535 hr = IClassFactory_CreateInstance(factory, NULL, &IID_NULL, (void **)&oleobj);
536 trace("ret IClassFactory_CreateInstance(&IID_NULL)\n");
537 ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr);
538
539 trace("call IClassFactory_CreateInstance(&IID_IOleObject)\n");
540 hr = IClassFactory_CreateInstance(factory, NULL, &IID_IOleObject, (void **)&oleobj);
541 trace("ret IClassFactory_CreateInstance(&IID_IOleObject)\n");
542 ok(hr == E_NOINTERFACE, "expected E_NOINTERFACE, got %#x\n", hr);
543
544 trace("call IClassFactory_Release\n");
545 ret = IClassFactory_Release(factory);
546 trace("ret IClassFactory_Release\n");
547 ok(!ret, "expected ref 0, got %u\n", ret);
548
549 trace("signalling termination\n");
550 SetEvent(done_event);
552 ok(ret == WAIT_OBJECT_0, "server failed to terminate\n");
553
555
557
558 if (info->child_failures)
559 {
560 trace("%d failures in child process\n", info->child_failures);
561 winetest_add_failures(info->child_failures);
562 }
563}
static int argc
Definition: ServiceArgs.c:12
#define broken(x)
Definition: _sntprintf.h:21
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static struct sockaddr_in sa
Definition: adnsresfilter.c:69
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define trace
Definition: atltest.h:70
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
#define ARRAY_SIZE(A)
Definition: main.h:33
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
Definition: registry.h:49
struct _root root
const CLSID CLSID_IdentityUnmarshal
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define ERROR_SUCCESS
Definition: deptool.c:10
static const WCHAR clsidW[]
#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 RegSetValueA(HKEY hKeyOriginal, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
Definition: reg.c:4954
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
Definition: reg.c:1224
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1605
#define CloseHandle
Definition: compat.h:739
#define GetProcessHeap()
Definition: compat.h:736
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define HeapAlloc
Definition: compat.h:733
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define FILE_MAP_READ
Definition: compat.h:776
#define lstrcpyW
Definition: compat.h:749
#define MapViewOfFile
Definition: compat.h:745
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4741
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
Definition: locale.c:4223
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
Definition: compobj.c:2897
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD dwRegister)
Definition: compobj.c:1086
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3103
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
HRESULT WINAPI DECLSPEC_HOTPATCH OleRun(LPUNKNOWN pUnknown)
Definition: ole2.c:1205
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
Definition: ole2.c:230
#define INFINITE
Definition: serial.h:102
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
Definition: filemap.c:23
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
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 LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define REG_SZ
Definition: layer.c:22
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:123
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define todo_wine
Definition: custom.c:79
static void test_local_server(void)
Definition: marshal.c:3824
static refpint_t pi[]
Definition: server.c:96
#define argv
Definition: mplay32.c:18
REFCLSID clsid
Definition: msctf.c:82
#define SYNCHRONIZE
Definition: nt_native.h:61
#define PAGE_READWRITE
Definition: nt_native.h:1304
#define KEY_READ
Definition: nt_native.h:1023
#define KEY_CREATE_SUB_KEY
Definition: nt_native.h:1018
#define DELETE
Definition: nt_native.h:57
#define KEY_WRITE
Definition: nt_native.h:1031
@ REGCLS_MULTIPLEUSE
Definition: objbase.h:393
@ COINIT_MULTITHREADED
Definition: objbase.h:279
static UnknownImpl * impl_from_IUnknown(IUnknown *iface)
Definition: ole_server.c:85
static const IUnknownVtbl UnknownImpl_Vtbl
Definition: ole_server.c:133
static ULONG WINAPI ClassFactoryImpl_Release(IClassFactory *iface)
Definition: ole_server.c:183
static ULONG WINAPI UnknownImpl_AddRef(IUnknown *iface)
Definition: ole_server.c:110
static const struct @1692 guid_name[]
static ClassFactoryImpl factory
Definition: ole_server.c:234
static HRESULT WINAPI ClassFactoryImpl_LockServer(IClassFactory *iface, BOOL lock)
Definition: ole_server.c:217
static ULONG WINAPI ClassFactoryImpl_AddRef(IClassFactory *iface)
Definition: ole_server.c:172
static void ole_server(void)
Definition: ole_server.c:236
static HRESULT WINAPI ClassFactoryImpl_CreateInstance(IClassFactory *iface, IUnknown *punkouter, REFIID iid, void **ppv)
Definition: ole_server.c:194
static LONG server_locks
Definition: ole_server.c:61
static void unregister_server(void)
Definition: ole_server.c:320
const char * name
Definition: ole_server.c:43
const GUID * guid
Definition: ole_server.c:42
static ClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: ole_server.c:146
static HRESULT WINAPI ClassFactoryImpl_QueryInterface(IClassFactory *iface, REFIID iid, void **ppv)
Definition: ole_server.c:151
static LONG class_ref
Definition: ole_server.c:61
static LONG obj_ref
Definition: ole_server.c:61
static ULONG WINAPI UnknownImpl_Release(IUnknown *iface)
Definition: ole_server.c:121
static const IClassFactoryVtbl ClassFactoryImpl_Vtbl
Definition: ole_server.c:225
#define GUID_NAME(guid)
static HRESULT WINAPI UnknownImpl_QueryInterface(IUnknown *iface, REFIID iid, void **ppv)
Definition: ole_server.c:90
static BOOL register_server(const char *server, BOOL inproc_handler)
Definition: ole_server.c:287
static HANDLE start_server(const char *argv0)
Definition: ole_server.c:344
const GUID IID_IRunnableObject
const GUID IID_IOleObject
long LONG
Definition: pedump.c:60
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define IID_NULL
Definition: guiddef.h:98
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
#define win_skip
Definition: test.h:163
LONG winetest_get_failures(void)
int winetest_get_mainargs(char ***pargv)
void winetest_add_failures(LONG new_failures)
#define memset(x, y, z)
Definition: compat.h:39
static char argv0[MAX_PATH]
Definition: shlexec.c:49
HRESULT hr
Definition: shlfolder.c:183
TCHAR * cmdline
Definition: stretchblt.cpp:32
IUnknown IUnknown_iface
Definition: ole_server.c:81
HANDLE hStdOutput
Definition: winbase.h:847
HANDLE hStdError
Definition: winbase.h:848
DWORD dwFlags
Definition: winbase.h:842
DWORD cb
Definition: winbase.h:831
HANDLE hStdInput
Definition: winbase.h:846
Definition: main.c:439
IClassFactory IClassFactory_iface
Definition: main.c:440
Definition: copy.c:22
Definition: name.c:39
Definition: send.c:48
LONG child_failures
Definition: ole_server.c:37
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
Definition: synch.c:637
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
Definition: synch.c:669
rwlock_t lock
Definition: tcpcore.h:0
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
static rfbScreenInfoPtr server
Definition: vnc.c:74
int ret
#define STD_OUTPUT_HANDLE
Definition: winbase.h:268
#define STD_INPUT_HANDLE
Definition: winbase.h:267
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define FILE_MAP_WRITE
Definition: winbase.h:154
#define EVENT_MODIFY_STATE
Definition: winbase.h:163
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1158
#define WAIT_OBJECT_0
Definition: winbase.h:406
#define STARTF_USESTDHANDLES
Definition: winbase.h:499
#define WINAPI
Definition: msvc.h:6
#define REGDB_E_CLASSNOTREG
Definition: winerror.h:2696
#define E_NOINTERFACE
Definition: winerror.h:2364
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
__wchar_t WCHAR
Definition: xmlstorage.h:180