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);
46#define GUID_NAME(guid) \
47 { &IID_##guid, #guid }
57 { &CLSID_UnknownUnmarshal,
"CLSID_UnknownUnmarshal" },
67 if (!
guid)
return "(null)";
102 IUnknown_AddRef(&
This->IUnknown_iface);
117 trace(
"server: unknown_AddRef: %p, ref %u\n", iface,
ref);
128 trace(
"server: unknown_Release: %p, ref %u\n", iface,
ref);
163 IClassFactory_AddRef(&
This->IClassFactory_iface);
164 *
ppv = &
This->IClassFactory_iface;
179 trace(
"server: factory_AddRef: %p, ref %u\n", iface,
ref);
190 trace(
"server: factory_Release: %p, ref %u\n", iface,
ref);
209 IUnknown_AddRef(&
unknown->IUnknown_iface);
211 hr = IUnknown_QueryInterface(&
unknown->IUnknown_iface, iid,
ppv);
212 IUnknown_Release(&
unknown->IUnknown_iface);
221 trace(
"server: factory_LockServer: %p,%d, ref %u\n", iface,
lock,
ref);
246 trace(
"server: registering class object\n");
251 HANDLE done_event, init_done_event;
254 ok(done_event != 0,
"server: OpenEvent error %d\n",
GetLastError());
256 ok(init_done_event != 0,
"server: OpenEvent error %d\n",
GetLastError());
260 trace(
"server: waiting for requests\n");
273 trace(
"call CoRevokeClassObject\n");
275 trace(
"ret CoRevokeClassObject\n");
278 trace(
"server: call CoUninitialize\n");
280 trace(
"server: ret CoUninitialize\n");
289 static const WCHAR clsidW[] = {
'C',
'L',
'S',
'I',
'D',
'\\',0};
296 lstrcatA(server_path,
" ole_server");
322 static const WCHAR clsidW[] = {
'C',
'L',
'S',
'I',
'D',
'\\',0};
352 memset(&si, 0,
sizeof(si));
359 sa.nLength =
sizeof(
sa);
360 sa.lpSecurityDescriptor =
NULL;
387 ok(
mapping != 0,
"CreateFileMapping failed\n");
395 ok(init_done_event != 0,
"CreateEvent error %d\n",
GetLastError());
401 trace(
"server: Refusing to be run by ole32\n");
407 info->child_failures = 0;
413 trace(
"server: Unknown parameter: %s\n",
argv[2]);
419 win_skip(
"not enough permissions to create a server CLSID key\n");
431 ok(
hr ==
S_OK,
"OleInitialize error %#x\n",
hr);
438 win_skip(
"not enough permissions to create a server CLSID key\n");
443 trace(
"call CoCreateInstance(&IID_NULL)\n");
445 trace(
"ret CoCreateInstance(&IID_NULL)\n");
449 trace(
"call CoCreateInstance(&IID_IUnknown)\n");
451 trace(
"ret CoCreateInstance(&IID_IUnknown)\n");
455 win_skip(
"In-process handler doesn't support IID_IUnknown on this platform\n");
459 trace(
"call CoCreateInstance(&IID_IOleObject)\n");
461 trace(
"ret CoCreateInstance(&IID_IOleObject)\n");
464 trace(
"call IUnknown_QueryInterface(&IID_IRunnableObject)\n");
466 trace(
"ret IUnknown_QueryInterface(&IID_IRunnableObject)\n");
467 ok(
hr ==
S_OK,
"QueryInterface(&IID_IRunnableObject) error %#x\n",
hr);
469 ret = IRunnableObject_IsRunning(runobj);
470 ok(!
ret,
"expected 0, got %d\n",
ret);
472 trace(
"call OleRun\n");
474 trace(
"ret OleRun\n");
478 ret = IRunnableObject_IsRunning(runobj);
480 ok(
ret == 1,
"expected 1, got %d\n",
ret);
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);
487 trace(
"call IUnknown_QueryInterface(&IID_IOleObject)\n");
489 trace(
"ret IUnknown_QueryInterface(&IID_IOleObject)\n");
490 ok(
hr ==
S_OK,
"QueryInterface(&IID_IOleObject) error %#x\n",
hr);
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);
497 trace(
"call IUnknown_Release\n");
499 trace(
"ret IUnknown_Release\n");
500 ok(!
ret,
"expected ref 0, got %u\n",
ret);
504 trace(
"call CoCreateInstance(&IID_IUnknown)\n");
506 trace(
"ret CoCreateInstance(&IID_IUnknown)\n");
507 ok(
hr ==
S_OK,
"CoCreateInstance(IID_IUnknown) error %#x\n",
hr);
509 trace(
"call IUnknown_QueryInterface(&IID_IRunnableObject)\n");
511 trace(
"ret IUnknown_QueryInterface(&IID_IRunnableObject)\n");
514 trace(
"call OleRun\n");
516 trace(
"ret OleRun\n");
519 trace(
"call IUnknown_QueryInterface(&IID_IOleObject)\n");
521 trace(
"ret IUnknown_QueryInterface(&IID_IOleObject)\n");
524 trace(
"call IUnknown_Release\n");
526 trace(
"ret IUnknown_Release\n");
527 ok(!
ret,
"expected ref 0, got %u\n",
ret);
529 trace(
"call CoGetClassObject(&IID_IClassFactory)\n");
531 trace(
"ret CoGetClassObject(&IID_IClassFactory)\n");
532 ok(
hr ==
S_OK,
"CoGetClassObject error %#x\n",
hr);
534 trace(
"call IClassFactory_CreateInstance(&IID_NULL)\n");
536 trace(
"ret IClassFactory_CreateInstance(&IID_NULL)\n");
539 trace(
"call IClassFactory_CreateInstance(&IID_IOleObject)\n");
541 trace(
"ret IClassFactory_CreateInstance(&IID_IOleObject)\n");
544 trace(
"call IClassFactory_Release\n");
546 trace(
"ret IClassFactory_Release\n");
547 ok(!
ret,
"expected ref 0, got %u\n",
ret);
549 trace(
"signalling termination\n");
558 if (
info->child_failures)
560 trace(
"%d failures in child process\n",
info->child_failures);
ACPI_SIZE strlen(const char *String)
static struct sockaddr_in sa
#define InterlockedIncrement
#define InterlockedDecrement
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
const CLSID CLSID_IdentityUnmarshal
static const WCHAR clsidW[]
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)
LONG WINAPI RegSetValueA(HKEY hKeyOriginal, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
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)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD dwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
HRESULT WINAPI DECLSPEC_HOTPATCH CoGetClassObject(REFCLSID rclsid, DWORD dwClsContext, COSERVERINFO *pServerInfo, REFIID iid, LPVOID *ppv)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
HRESULT WINAPI DECLSPEC_HOTPATCH OleRun(LPUNKNOWN pUnknown)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLenum GLenum GLenum mapping
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
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
#define sprintf(buf, format,...)
static void test_local_server(void)
#define KEY_CREATE_SUB_KEY
static UnknownImpl * impl_from_IUnknown(IUnknown *iface)
static const IUnknownVtbl UnknownImpl_Vtbl
static ULONG WINAPI ClassFactoryImpl_Release(IClassFactory *iface)
static ULONG WINAPI UnknownImpl_AddRef(IUnknown *iface)
static const struct @1692 guid_name[]
static ClassFactoryImpl factory
static HRESULT WINAPI ClassFactoryImpl_LockServer(IClassFactory *iface, BOOL lock)
static ULONG WINAPI ClassFactoryImpl_AddRef(IClassFactory *iface)
static void ole_server(void)
static HRESULT WINAPI ClassFactoryImpl_CreateInstance(IClassFactory *iface, IUnknown *punkouter, REFIID iid, void **ppv)
static void unregister_server(void)
static ClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
static HRESULT WINAPI ClassFactoryImpl_QueryInterface(IClassFactory *iface, REFIID iid, void **ppv)
static ULONG WINAPI UnknownImpl_Release(IUnknown *iface)
static const IClassFactoryVtbl ClassFactoryImpl_Vtbl
static HRESULT WINAPI UnknownImpl_QueryInterface(IUnknown *iface, REFIID iid, void **ppv)
static BOOL register_server(const char *server, BOOL inproc_handler)
static HANDLE start_server(const char *argv0)
const GUID IID_IRunnableObject
const GUID IID_IOleObject
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualIID(riid1, riid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
LONG winetest_get_failures(void)
int winetest_get_mainargs(char ***pargv)
void winetest_add_failures(LONG new_failures)
static char argv0[MAX_PATH]
IClassFactory IClassFactory_iface
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
#define CONTAINING_RECORD(address, type, field)
static rfbScreenInfoPtr server
#define STD_OUTPUT_HANDLE
DWORD WINAPI GetLastError(void)
#define EVENT_MODIFY_STATE
DWORD WINAPI GetCurrentProcessId(void)
#define STARTF_USESTDHANDLES
#define REGDB_E_CLASSNOTREG
#define CLASS_E_NOAGGREGATION
#define HKEY_CLASSES_ROOT