ole32/tests: Compile with -D__WINESRC__.
This commit is contained in:
parent
de69361b8a
commit
026b711483
|
@ -1,6 +1,5 @@
|
||||||
TESTDLL = ole32.dll
|
TESTDLL = ole32.dll
|
||||||
IMPORTS = oleaut32 ole32 user32 gdi32 advapi32
|
IMPORTS = oleaut32 ole32 user32 gdi32 advapi32
|
||||||
EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS
|
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
clipboard.c \
|
clipboard.c \
|
||||||
|
|
|
@ -548,10 +548,10 @@ static void test_CoCreateInstance(void)
|
||||||
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
|
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
|
||||||
thread has already done so */
|
thread has already done so */
|
||||||
|
|
||||||
info.wait = CreateEvent(NULL, TRUE, FALSE, NULL);
|
info.wait = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
info.stop = CreateEvent(NULL, TRUE, FALSE, NULL);
|
info.stop = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid);
|
thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid);
|
||||||
|
@ -599,10 +599,10 @@ static void test_CoGetClassObject(void)
|
||||||
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
|
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
|
||||||
thread has already done so */
|
thread has already done so */
|
||||||
|
|
||||||
info.wait = CreateEvent(NULL, TRUE, FALSE, NULL);
|
info.wait = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
info.stop = CreateEvent(NULL, TRUE, FALSE, NULL);
|
info.stop = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid);
|
thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid);
|
||||||
|
@ -644,7 +644,7 @@ static void test_CoGetClassObject(void)
|
||||||
{
|
{
|
||||||
IUnknown_Release(pUnk);
|
IUnknown_Release(pUnk);
|
||||||
|
|
||||||
res = RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\Classes", 0, NULL, 0,
|
res = RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Classes", 0, NULL, 0,
|
||||||
KEY_ALL_ACCESS, NULL, &hkey, NULL);
|
KEY_ALL_ACCESS, NULL, &hkey, NULL);
|
||||||
ok(!res, "RegCreateKeyEx returned %d\n", res);
|
ok(!res, "RegCreateKeyEx returned %d\n", res);
|
||||||
|
|
||||||
|
@ -665,21 +665,21 @@ static void test_CoGetClassObject(void)
|
||||||
|
|
||||||
static ATOM register_dummy_class(void)
|
static ATOM register_dummy_class(void)
|
||||||
{
|
{
|
||||||
WNDCLASS wc =
|
WNDCLASSA wc =
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
DefWindowProc,
|
DefWindowProcA,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
GetModuleHandle(NULL),
|
GetModuleHandleA(NULL),
|
||||||
NULL,
|
NULL,
|
||||||
LoadCursor(NULL, IDC_ARROW),
|
LoadCursorA(NULL, (LPSTR)IDC_ARROW),
|
||||||
(HBRUSH)(COLOR_BTNFACE+1),
|
(HBRUSH)(COLOR_BTNFACE+1),
|
||||||
NULL,
|
NULL,
|
||||||
TEXT("WineOleTestClass"),
|
"WineOleTestClass",
|
||||||
};
|
};
|
||||||
|
|
||||||
return RegisterClass(&wc);
|
return RegisterClassA(&wc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_ole_menu(void)
|
static void test_ole_menu(void)
|
||||||
|
@ -687,7 +687,7 @@ static void test_ole_menu(void)
|
||||||
HWND hwndFrame;
|
HWND hwndFrame;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
hwndFrame = CreateWindow(MAKEINTATOM(register_dummy_class()), "Test", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL);
|
hwndFrame = CreateWindowA((LPCSTR)MAKEINTATOM(register_dummy_class()), "Test", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL);
|
||||||
hr = OleSetMenuDescriptor(NULL, hwndFrame, NULL, NULL, NULL);
|
hr = OleSetMenuDescriptor(NULL, hwndFrame, NULL, NULL, NULL);
|
||||||
todo_wine ok_ole_success(hr, "OleSetMenuDescriptor");
|
todo_wine ok_ole_success(hr, "OleSetMenuDescriptor");
|
||||||
|
|
||||||
|
@ -983,7 +983,7 @@ static void test_CoGetPSClsid(void)
|
||||||
hr = CoGetPSClsid(&IID_IClassFactory, &clsid);
|
hr = CoGetPSClsid(&IID_IClassFactory, &clsid);
|
||||||
ok_ole_success(hr, "CoGetPSClsid");
|
ok_ole_success(hr, "CoGetPSClsid");
|
||||||
|
|
||||||
res = RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\Classes", 0, NULL, 0,
|
res = RegCreateKeyExA(HKEY_CURRENT_USER, "Software\\Classes", 0, NULL, 0,
|
||||||
KEY_ALL_ACCESS, NULL, &hkey, NULL);
|
KEY_ALL_ACCESS, NULL, &hkey, NULL);
|
||||||
ok(!res, "RegCreateKeyEx returned %d\n", res);
|
ok(!res, "RegCreateKeyEx returned %d\n", res);
|
||||||
|
|
||||||
|
@ -1403,7 +1403,7 @@ static DWORD CALLBACK free_libraries_thread(LPVOID p)
|
||||||
|
|
||||||
static inline BOOL is_module_loaded(const char *module)
|
static inline BOOL is_module_loaded(const char *module)
|
||||||
{
|
{
|
||||||
return GetModuleHandle(module) != 0;
|
return GetModuleHandleA(module) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_CoFreeUnusedLibraries(void)
|
static void test_CoFreeUnusedLibraries(void)
|
||||||
|
@ -1475,10 +1475,10 @@ static void test_CoGetObjectContext(void)
|
||||||
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
|
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
|
||||||
thread has already done so */
|
thread has already done so */
|
||||||
|
|
||||||
info.wait = CreateEvent(NULL, TRUE, FALSE, NULL);
|
info.wait = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
info.stop = CreateEvent(NULL, TRUE, FALSE, NULL);
|
info.stop = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid);
|
thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid);
|
||||||
|
@ -1694,10 +1694,10 @@ static void test_CoGetContextToken(void)
|
||||||
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
|
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
|
||||||
thread has already done so */
|
thread has already done so */
|
||||||
|
|
||||||
info.wait = CreateEvent(NULL, TRUE, FALSE, NULL);
|
info.wait = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
ok(info.wait != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
info.stop = CreateEvent(NULL, TRUE, FALSE, NULL);
|
info.stop = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
ok(info.stop != NULL, "CreateEvent failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid);
|
thread = CreateThread(NULL, 0, ole_initialize_thread, &info, 0, &tid);
|
||||||
|
|
|
@ -252,7 +252,7 @@ static void test_default_handler_run(void)
|
||||||
DWORD class_reg;
|
DWORD class_reg;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
|
||||||
if(!GetProcAddress(GetModuleHandle("ole32"), "CoRegisterSurrogateEx")) {
|
if(!GetProcAddress(GetModuleHandleA("ole32"), "CoRegisterSurrogateEx")) {
|
||||||
win_skip("skipping OleCreateDefaultHandler tests\n");
|
win_skip("skipping OleCreateDefaultHandler tests\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,21 +270,21 @@ static IDataObject DataObject = { &dataobject_vtbl };
|
||||||
|
|
||||||
static ATOM register_dummy_class(void)
|
static ATOM register_dummy_class(void)
|
||||||
{
|
{
|
||||||
WNDCLASS wc =
|
WNDCLASSA wc =
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
DefWindowProc,
|
DefWindowProcA,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
GetModuleHandle(NULL),
|
GetModuleHandleA(NULL),
|
||||||
NULL,
|
NULL,
|
||||||
LoadCursor(NULL, IDC_ARROW),
|
LoadCursorA(NULL, (LPSTR)IDC_ARROW),
|
||||||
(HBRUSH)(COLOR_BTNFACE+1),
|
(HBRUSH)(COLOR_BTNFACE+1),
|
||||||
NULL,
|
NULL,
|
||||||
TEXT("WineOleTestClass"),
|
"WineOleTestClass",
|
||||||
};
|
};
|
||||||
|
|
||||||
return RegisterClass(&wc);
|
return RegisterClassA(&wc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_Register_Revoke(void)
|
static void test_Register_Revoke(void)
|
||||||
|
|
|
@ -240,11 +240,11 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
|
||||||
ok_ole_success(hr, CoMarshalInterface);
|
ok_ole_success(hr, CoMarshalInterface);
|
||||||
|
|
||||||
/* force the message queue to be created before signaling parent thread */
|
/* force the message queue to be created before signaling parent thread */
|
||||||
PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
|
PeekMessageA(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
|
||||||
|
|
||||||
SetEvent(data->marshal_event);
|
SetEvent(data->marshal_event);
|
||||||
|
|
||||||
while (GetMessage(&msg, NULL, 0, 0))
|
while (GetMessageA(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
if (msg.hwnd == NULL && msg.message == RELEASEMARSHALDATA)
|
if (msg.hwnd == NULL && msg.message == RELEASEMARSHALDATA)
|
||||||
{
|
{
|
||||||
|
@ -252,7 +252,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
|
||||||
SetEvent((HANDLE)msg.lParam);
|
SetEvent((HANDLE)msg.lParam);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DispatchMessage(&msg);
|
DispatchMessageA(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, data);
|
HeapFree(GetProcessHeap(), 0, data);
|
||||||
|
@ -265,7 +265,7 @@ static DWORD CALLBACK host_object_proc(LPVOID p)
|
||||||
static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, IMessageFilter *filter, HANDLE *thread)
|
static DWORD start_host_object2(IStream *stream, REFIID riid, IUnknown *object, MSHLFLAGS marshal_flags, IMessageFilter *filter, HANDLE *thread)
|
||||||
{
|
{
|
||||||
DWORD tid = 0;
|
DWORD tid = 0;
|
||||||
HANDLE marshal_event = CreateEvent(NULL, FALSE, FALSE, NULL);
|
HANDLE marshal_event = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||||
struct host_object_data *data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data));
|
struct host_object_data *data = HeapAlloc(GetProcessHeap(), 0, sizeof(*data));
|
||||||
|
|
||||||
data->stream = stream;
|
data->stream = stream;
|
||||||
|
@ -293,15 +293,15 @@ static DWORD start_host_object(IStream *stream, REFIID riid, IUnknown *object, M
|
||||||
* same thread that marshaled the interface in the first place. */
|
* same thread that marshaled the interface in the first place. */
|
||||||
static void release_host_object(DWORD tid)
|
static void release_host_object(DWORD tid)
|
||||||
{
|
{
|
||||||
HANDLE event = CreateEvent(NULL, FALSE, FALSE, NULL);
|
HANDLE event = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||||
PostThreadMessage(tid, RELEASEMARSHALDATA, 0, (LPARAM)event);
|
PostThreadMessageA(tid, RELEASEMARSHALDATA, 0, (LPARAM)event);
|
||||||
ok( !WaitForSingleObject(event, 10000), "wait timed out\n" );
|
ok( !WaitForSingleObject(event, 10000), "wait timed out\n" );
|
||||||
CloseHandle(event);
|
CloseHandle(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void end_host_object(DWORD tid, HANDLE thread)
|
static void end_host_object(DWORD tid, HANDLE thread)
|
||||||
{
|
{
|
||||||
BOOL ret = PostThreadMessage(tid, WM_QUIT, 0, 0);
|
BOOL ret = PostThreadMessageA(tid, WM_QUIT, 0, 0);
|
||||||
ok(ret, "PostThreadMessage failed with error %d\n", GetLastError());
|
ok(ret, "PostThreadMessage failed with error %d\n", GetLastError());
|
||||||
/* be careful of races - don't return until hosting thread has terminated */
|
/* be careful of races - don't return until hosting thread has terminated */
|
||||||
ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" );
|
ok( !WaitForSingleObject(thread, 10000), "wait timed out\n" );
|
||||||
|
@ -865,8 +865,8 @@ static void test_no_couninitialize_server(void)
|
||||||
|
|
||||||
cLocks = 0;
|
cLocks = 0;
|
||||||
|
|
||||||
ncu_params.marshal_event = CreateEvent(NULL, TRUE, FALSE, NULL);
|
ncu_params.marshal_event = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
ncu_params.unmarshal_event = CreateEvent(NULL, TRUE, FALSE, NULL);
|
ncu_params.unmarshal_event = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
|
|
||||||
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream);
|
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream);
|
||||||
ok_ole_success(hr, CreateStreamOnHGlobal);
|
ok_ole_success(hr, CreateStreamOnHGlobal);
|
||||||
|
@ -1107,14 +1107,14 @@ static DWORD CALLBACK weak_and_normal_marshal_thread_proc(void *p)
|
||||||
ok_ole_success(hr, "CoMarshalInterface");
|
ok_ole_success(hr, "CoMarshalInterface");
|
||||||
|
|
||||||
/* force the message queue to be created before signaling parent thread */
|
/* force the message queue to be created before signaling parent thread */
|
||||||
PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
|
PeekMessageA(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
|
||||||
|
|
||||||
SetEvent(data->hReadyEvent);
|
SetEvent(data->hReadyEvent);
|
||||||
|
|
||||||
while (WAIT_OBJECT_0 + 1 == MsgWaitForMultipleObjects(1, &hQuitEvent, FALSE, 10000, QS_ALLINPUT))
|
while (WAIT_OBJECT_0 + 1 == MsgWaitForMultipleObjects(1, &hQuitEvent, FALSE, 10000, QS_ALLINPUT))
|
||||||
{
|
{
|
||||||
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE))
|
||||||
DispatchMessage(&msg);
|
DispatchMessageA(&msg);
|
||||||
}
|
}
|
||||||
CloseHandle(hQuitEvent);
|
CloseHandle(hQuitEvent);
|
||||||
|
|
||||||
|
@ -1135,8 +1135,8 @@ static void test_tableweak_and_normal_marshal_and_unmarshal(void)
|
||||||
|
|
||||||
cLocks = 0;
|
cLocks = 0;
|
||||||
|
|
||||||
data.hReadyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
|
data.hReadyEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||||
data.hQuitEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
|
data.hQuitEvent = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||||
hr = CreateStreamOnHGlobal(NULL, TRUE, &data.pStreamWeak);
|
hr = CreateStreamOnHGlobal(NULL, TRUE, &data.pStreamWeak);
|
||||||
ok_ole_success(hr, CreateStreamOnHGlobal);
|
ok_ole_success(hr, CreateStreamOnHGlobal);
|
||||||
hr = CreateStreamOnHGlobal(NULL, TRUE, &data.pStreamNormal);
|
hr = CreateStreamOnHGlobal(NULL, TRUE, &data.pStreamNormal);
|
||||||
|
@ -1485,7 +1485,7 @@ static void test_proxy_used_in_wrong_thread(void)
|
||||||
CloseHandle(thread);
|
CloseHandle(thread);
|
||||||
|
|
||||||
/* do release statement on Win9x that we should have done above */
|
/* do release statement on Win9x that we should have done above */
|
||||||
if (!GetProcAddress(GetModuleHandle("ole32"), "CoRegisterSurrogateEx"))
|
if (!GetProcAddress(GetModuleHandleA("ole32"), "CoRegisterSurrogateEx"))
|
||||||
IUnknown_Release(pProxy);
|
IUnknown_Release(pProxy);
|
||||||
|
|
||||||
ok_no_locks();
|
ok_no_locks();
|
||||||
|
@ -1825,7 +1825,7 @@ static HRESULT WINAPI TestRE_IClassFactory_CreateInstance(
|
||||||
DWORD_PTR res;
|
DWORD_PTR res;
|
||||||
if (IsEqualIID(riid, &IID_IWineTest))
|
if (IsEqualIID(riid, &IID_IWineTest))
|
||||||
{
|
{
|
||||||
BOOL ret = SendMessageTimeout(hwnd_app, WM_NULL, 0, 0, SMTO_BLOCK, 5000, &res);
|
BOOL ret = SendMessageTimeoutA(hwnd_app, WM_NULL, 0, 0, SMTO_BLOCK, 5000, &res);
|
||||||
ok(ret, "Timed out sending a message to originating window during RPC call\n");
|
ok(ret, "Timed out sending a message to originating window during RPC call\n");
|
||||||
}
|
}
|
||||||
*ppvObj = NULL;
|
*ppvObj = NULL;
|
||||||
|
@ -1882,7 +1882,7 @@ static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
|
||||||
|
|
||||||
end_host_object(tid, thread);
|
end_host_object(tid, thread);
|
||||||
|
|
||||||
PostMessage(hwnd, WM_QUIT, 0, 0);
|
PostMessageA(hwnd, WM_QUIT, 0, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1912,7 +1912,7 @@ static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
|
||||||
|
|
||||||
/* post quit message before a doing a COM call to show that a pending
|
/* post quit message before a doing a COM call to show that a pending
|
||||||
* WM_QUIT message doesn't stop the call from succeeding */
|
* WM_QUIT message doesn't stop the call from succeeding */
|
||||||
PostMessage(hwnd, WM_QUIT, 0, 0);
|
PostMessageA(hwnd, WM_QUIT, 0, 0);
|
||||||
hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&object);
|
hr = IClassFactory_CreateInstance(proxy, NULL, &IID_IUnknown, (void **)&object);
|
||||||
ok(hr == S_FALSE, "IClassFactory_CreateInstance returned 0x%08x, expected S_FALSE\n", hr);
|
ok(hr == S_FALSE, "IClassFactory_CreateInstance returned 0x%08x, expected S_FALSE\n", hr);
|
||||||
|
|
||||||
|
@ -1957,34 +1957,34 @@ static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return DefWindowProc(hwnd, msg, wparam, lparam);
|
return DefWindowProcA(hwnd, msg, wparam, lparam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void register_test_window(void)
|
static void register_test_window(void)
|
||||||
{
|
{
|
||||||
WNDCLASS wndclass;
|
WNDCLASSA wndclass;
|
||||||
|
|
||||||
memset(&wndclass, 0, sizeof(wndclass));
|
memset(&wndclass, 0, sizeof(wndclass));
|
||||||
wndclass.lpfnWndProc = window_proc;
|
wndclass.lpfnWndProc = window_proc;
|
||||||
wndclass.lpszClassName = "WineCOMTest";
|
wndclass.lpszClassName = "WineCOMTest";
|
||||||
RegisterClass(&wndclass);
|
RegisterClassA(&wndclass);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_message_reentrancy(void)
|
static void test_message_reentrancy(void)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
hwnd_app = CreateWindow("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0);
|
hwnd_app = CreateWindowA("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0);
|
||||||
ok(hwnd_app != NULL, "Window creation failed\n");
|
ok(hwnd_app != NULL, "Window creation failed\n");
|
||||||
|
|
||||||
/* start message re-entrancy test */
|
/* start message re-entrancy test */
|
||||||
PostMessage(hwnd_app, WM_USER, 0, 0);
|
PostMessageA(hwnd_app, WM_USER, 0, 0);
|
||||||
|
|
||||||
while (GetMessage(&msg, NULL, 0, 0))
|
while (GetMessageA(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessageA(&msg);
|
||||||
}
|
}
|
||||||
DestroyWindow(hwnd_app);
|
DestroyWindow(hwnd_app);
|
||||||
}
|
}
|
||||||
|
@ -1996,7 +1996,7 @@ static HRESULT WINAPI TestMsg_IClassFactory_CreateInstance(
|
||||||
LPVOID *ppvObj)
|
LPVOID *ppvObj)
|
||||||
{
|
{
|
||||||
*ppvObj = NULL;
|
*ppvObj = NULL;
|
||||||
SendMessage(hwnd_app, WM_USER+2, 0, 0);
|
SendMessageA(hwnd_app, WM_USER+2, 0, 0);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2021,7 +2021,7 @@ static void test_call_from_message(void)
|
||||||
HANDLE thread;
|
HANDLE thread;
|
||||||
IUnknown *object;
|
IUnknown *object;
|
||||||
|
|
||||||
hwnd_app = CreateWindow("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0);
|
hwnd_app = CreateWindowA("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0);
|
||||||
ok(hwnd_app != NULL, "Window creation failed\n");
|
ok(hwnd_app != NULL, "Window creation failed\n");
|
||||||
|
|
||||||
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream);
|
hr = CreateStreamOnHGlobal(NULL, TRUE, &pStream);
|
||||||
|
@ -2047,10 +2047,10 @@ static void test_call_from_message(void)
|
||||||
|
|
||||||
end_host_object(tid, thread);
|
end_host_object(tid, thread);
|
||||||
|
|
||||||
while (GetMessage(&msg, NULL, 0, 0))
|
while (GetMessageA(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessageA(&msg);
|
||||||
}
|
}
|
||||||
DestroyWindow(hwnd_app);
|
DestroyWindow(hwnd_app);
|
||||||
}
|
}
|
||||||
|
@ -2059,16 +2059,16 @@ static void test_WM_QUIT_handling(void)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
hwnd_app = CreateWindow("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0);
|
hwnd_app = CreateWindowA("WineCOMTest", NULL, 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, 0);
|
||||||
ok(hwnd_app != NULL, "Window creation failed\n");
|
ok(hwnd_app != NULL, "Window creation failed\n");
|
||||||
|
|
||||||
/* start WM_QUIT handling test */
|
/* start WM_QUIT handling test */
|
||||||
PostMessage(hwnd_app, WM_USER+1, 0, 0);
|
PostMessageA(hwnd_app, WM_USER+1, 0, 0);
|
||||||
|
|
||||||
while (GetMessage(&msg, NULL, 0, 0))
|
while (GetMessageA(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessageA(&msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2289,7 +2289,7 @@ static HRESULT reg_unreg_wine_test_class(BOOL Register)
|
||||||
strcat(buffer, "\\InprocHandler32");
|
strcat(buffer, "\\InprocHandler32");
|
||||||
if (Register)
|
if (Register)
|
||||||
{
|
{
|
||||||
error = RegCreateKeyEx(HKEY_CLASSES_ROOT, buffer, 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey, &dwDisposition);
|
error = RegCreateKeyExA(HKEY_CLASSES_ROOT, buffer, 0, NULL, 0, KEY_SET_VALUE, NULL, &hkey, &dwDisposition);
|
||||||
if (error == ERROR_ACCESS_DENIED)
|
if (error == ERROR_ACCESS_DENIED)
|
||||||
{
|
{
|
||||||
skip("Not authorized to modify the Classes key\n");
|
skip("Not authorized to modify the Classes key\n");
|
||||||
|
@ -2297,16 +2297,16 @@ static HRESULT reg_unreg_wine_test_class(BOOL Register)
|
||||||
}
|
}
|
||||||
ok(error == ERROR_SUCCESS, "RegCreateKeyEx failed with error %d\n", error);
|
ok(error == ERROR_SUCCESS, "RegCreateKeyEx failed with error %d\n", error);
|
||||||
if (error != ERROR_SUCCESS) hr = E_FAIL;
|
if (error != ERROR_SUCCESS) hr = E_FAIL;
|
||||||
error = RegSetValueEx(hkey, NULL, 0, REG_SZ, (const unsigned char *)"\"ole32.dll\"", strlen("\"ole32.dll\"") + 1);
|
error = RegSetValueExA(hkey, NULL, 0, REG_SZ, (const unsigned char *)"\"ole32.dll\"", strlen("\"ole32.dll\"") + 1);
|
||||||
ok(error == ERROR_SUCCESS, "RegSetValueEx failed with error %d\n", error);
|
ok(error == ERROR_SUCCESS, "RegSetValueEx failed with error %d\n", error);
|
||||||
if (error != ERROR_SUCCESS) hr = E_FAIL;
|
if (error != ERROR_SUCCESS) hr = E_FAIL;
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RegDeleteKey(HKEY_CLASSES_ROOT, buffer);
|
RegDeleteKeyA(HKEY_CLASSES_ROOT, buffer);
|
||||||
*strrchr(buffer, '\\') = '\0';
|
*strrchr(buffer, '\\') = '\0';
|
||||||
RegDeleteKey(HKEY_CLASSES_ROOT, buffer);
|
RegDeleteKeyA(HKEY_CLASSES_ROOT, buffer);
|
||||||
}
|
}
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
@ -2616,16 +2616,16 @@ static void test_register_local_server(void)
|
||||||
HANDLE quit_event;
|
HANDLE quit_event;
|
||||||
DWORD wait;
|
DWORD wait;
|
||||||
|
|
||||||
heventShutdown = CreateEvent(NULL, TRUE, FALSE, NULL);
|
heventShutdown = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
|
|
||||||
hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&TestOOP_ClassFactory,
|
hr = CoRegisterClassObject(&CLSID_WineOOPTest, (IUnknown *)&TestOOP_ClassFactory,
|
||||||
CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie);
|
CLSCTX_LOCAL_SERVER, REGCLS_SINGLEUSE, &cookie);
|
||||||
ok_ole_success(hr, CoRegisterClassObject);
|
ok_ole_success(hr, CoRegisterClassObject);
|
||||||
|
|
||||||
ready_event = CreateEvent(NULL, FALSE, FALSE, "Wine COM Test Ready Event");
|
ready_event = CreateEventA(NULL, FALSE, FALSE, "Wine COM Test Ready Event");
|
||||||
SetEvent(ready_event);
|
SetEvent(ready_event);
|
||||||
|
|
||||||
quit_event = CreateEvent(NULL, FALSE, FALSE, "Wine COM Test Quit Event");
|
quit_event = CreateEventA(NULL, FALSE, FALSE, "Wine COM Test Quit Event");
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -2633,12 +2633,12 @@ static void test_register_local_server(void)
|
||||||
if (wait == WAIT_OBJECT_0+1)
|
if (wait == WAIT_OBJECT_0+1)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
BOOL ret = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
|
|
||||||
if (ret)
|
if (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE))
|
||||||
{
|
{
|
||||||
trace("Message 0x%x\n", msg.message);
|
trace("Message 0x%x\n", msg.message);
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessageA(&msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2655,14 +2655,14 @@ static HANDLE create_target_process(const char *arg)
|
||||||
char cmdline[MAX_PATH];
|
char cmdline[MAX_PATH];
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
STARTUPINFO si = { 0 };
|
STARTUPINFOA si = { 0 };
|
||||||
si.cb = sizeof(si);
|
si.cb = sizeof(si);
|
||||||
|
|
||||||
pi.hThread = NULL;
|
pi.hThread = NULL;
|
||||||
pi.hProcess = NULL;
|
pi.hProcess = NULL;
|
||||||
winetest_get_mainargs( &argv );
|
winetest_get_mainargs( &argv );
|
||||||
sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg);
|
sprintf(cmdline, "%s %s %s", argv[0], argv[1], arg);
|
||||||
ret = CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
|
||||||
ok(ret, "CreateProcess failed with error: %u\n", GetLastError());
|
ok(ret, "CreateProcess failed with error: %u\n", GetLastError());
|
||||||
if (pi.hThread) CloseHandle(pi.hThread);
|
if (pi.hThread) CloseHandle(pi.hThread);
|
||||||
return pi.hProcess;
|
return pi.hProcess;
|
||||||
|
@ -2679,7 +2679,7 @@ static void test_local_server(void)
|
||||||
HANDLE quit_event;
|
HANDLE quit_event;
|
||||||
HANDLE ready_event;
|
HANDLE ready_event;
|
||||||
|
|
||||||
heventShutdown = CreateEvent(NULL, TRUE, FALSE, NULL);
|
heventShutdown = CreateEventA(NULL, TRUE, FALSE, NULL);
|
||||||
|
|
||||||
cLocks = 0;
|
cLocks = 0;
|
||||||
|
|
||||||
|
@ -2742,7 +2742,7 @@ static void test_local_server(void)
|
||||||
process = create_target_process("-Embedding");
|
process = create_target_process("-Embedding");
|
||||||
ok(process != NULL, "couldn't start local server process, error was %d\n", GetLastError());
|
ok(process != NULL, "couldn't start local server process, error was %d\n", GetLastError());
|
||||||
|
|
||||||
ready_event = CreateEvent(NULL, FALSE, FALSE, "Wine COM Test Ready Event");
|
ready_event = CreateEventA(NULL, FALSE, FALSE, "Wine COM Test Ready Event");
|
||||||
ok( !WaitForSingleObject(ready_event, 10000), "wait timed out\n" );
|
ok( !WaitForSingleObject(ready_event, 10000), "wait timed out\n" );
|
||||||
CloseHandle(ready_event);
|
CloseHandle(ready_event);
|
||||||
|
|
||||||
|
@ -2754,7 +2754,7 @@ static void test_local_server(void)
|
||||||
hr = CoCreateInstance(&CLSID_WineOOPTest, NULL, CLSCTX_LOCAL_SERVER, &IID_IClassFactory, (void **)&cf);
|
hr = CoCreateInstance(&CLSID_WineOOPTest, NULL, CLSCTX_LOCAL_SERVER, &IID_IClassFactory, (void **)&cf);
|
||||||
ok(hr == REGDB_E_CLASSNOTREG, "Second CoCreateInstance on REGCLS_SINGLEUSE object should have failed\n");
|
ok(hr == REGDB_E_CLASSNOTREG, "Second CoCreateInstance on REGCLS_SINGLEUSE object should have failed\n");
|
||||||
|
|
||||||
quit_event = CreateEvent(NULL, FALSE, FALSE, "Wine COM Test Quit Event");
|
quit_event = CreateEventA(NULL, FALSE, FALSE, "Wine COM Test Quit Event");
|
||||||
SetEvent(quit_event);
|
SetEvent(quit_event);
|
||||||
|
|
||||||
winetest_wait_child_process( process );
|
winetest_wait_child_process( process );
|
||||||
|
@ -2847,8 +2847,8 @@ static void test_globalinterfacetable(void)
|
||||||
while (ret == WAIT_OBJECT_0 + 1)
|
while (ret == WAIT_OBJECT_0 + 1)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
while (PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE))
|
||||||
DispatchMessage(&msg);
|
DispatchMessageA(&msg);
|
||||||
ret = MsgWaitForMultipleObjects(1, &thread, FALSE, 10000, QS_ALLINPUT);
|
ret = MsgWaitForMultipleObjects(1, &thread, FALSE, 10000, QS_ALLINPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2956,12 +2956,12 @@ static const char *debugstr_iid(REFIID riid)
|
||||||
LONG name_size = sizeof(name);
|
LONG name_size = sizeof(name);
|
||||||
StringFromGUID2(riid, bufferW, sizeof(bufferW)/sizeof(bufferW[0]));
|
StringFromGUID2(riid, bufferW, sizeof(bufferW)/sizeof(bufferW[0]));
|
||||||
WideCharToMultiByte(CP_ACP, 0, bufferW, sizeof(bufferW)/sizeof(bufferW[0]), buffer, sizeof(buffer), NULL, NULL);
|
WideCharToMultiByte(CP_ACP, 0, bufferW, sizeof(bufferW)/sizeof(bufferW[0]), buffer, sizeof(buffer), NULL, NULL);
|
||||||
if (RegOpenKeyEx(HKEY_CLASSES_ROOT, "Interface", 0, KEY_QUERY_VALUE, &hkeyInterface) != ERROR_SUCCESS)
|
if (RegOpenKeyExA(HKEY_CLASSES_ROOT, "Interface", 0, KEY_QUERY_VALUE, &hkeyInterface) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
memcpy(name, buffer, sizeof(buffer));
|
memcpy(name, buffer, sizeof(buffer));
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (RegQueryValue(hkeyInterface, buffer, name, &name_size) != ERROR_SUCCESS)
|
if (RegQueryValueA(hkeyInterface, buffer, name, &name_size) != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
memcpy(name, buffer, sizeof(buffer));
|
memcpy(name, buffer, sizeof(buffer));
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -3160,7 +3160,7 @@ static void test_channel_hook(void)
|
||||||
|
|
||||||
START_TEST(marshal)
|
START_TEST(marshal)
|
||||||
{
|
{
|
||||||
HMODULE hOle32 = GetModuleHandle("ole32");
|
HMODULE hOle32 = GetModuleHandleA("ole32");
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
|
|
||||||
|
|
|
@ -1339,7 +1339,7 @@ static void test_data_cache(void)
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
GetSystemDirectory(szSystemDir, sizeof(szSystemDir)/sizeof(szSystemDir[0]));
|
GetSystemDirectoryA(szSystemDir, sizeof(szSystemDir)/sizeof(szSystemDir[0]));
|
||||||
|
|
||||||
expected_method_list = methods_cacheinitnew;
|
expected_method_list = methods_cacheinitnew;
|
||||||
|
|
||||||
|
@ -1442,7 +1442,7 @@ static void test_data_cache(void)
|
||||||
fmtetc.cfFormat = CF_METAFILEPICT;
|
fmtetc.cfFormat = CF_METAFILEPICT;
|
||||||
stgmedium.tymed = TYMED_MFPICT;
|
stgmedium.tymed = TYMED_MFPICT;
|
||||||
U(stgmedium).hMetaFilePict = OleMetafilePictFromIconAndLabel(
|
U(stgmedium).hMetaFilePict = OleMetafilePictFromIconAndLabel(
|
||||||
LoadIcon(NULL, IDI_APPLICATION), wszPath, wszPath, 0);
|
LoadIconA(NULL, (LPSTR)IDI_APPLICATION), wszPath, wszPath, 0);
|
||||||
stgmedium.pUnkForRelease = NULL;
|
stgmedium.pUnkForRelease = NULL;
|
||||||
|
|
||||||
fmtetc.dwAspect = DVASPECT_CONTENT;
|
fmtetc.dwAspect = DVASPECT_CONTENT;
|
||||||
|
|
|
@ -258,9 +258,9 @@ static void ole_server(void)
|
||||||
{
|
{
|
||||||
HANDLE done_event, init_done_event;
|
HANDLE done_event, init_done_event;
|
||||||
|
|
||||||
done_event = OpenEvent(SYNCHRONIZE, FALSE, "ole_server_done_event");
|
done_event = OpenEventA(SYNCHRONIZE, FALSE, "ole_server_done_event");
|
||||||
ok(done_event != 0, "server: OpenEvent error %d\n", GetLastError());
|
ok(done_event != 0, "server: OpenEvent error %d\n", GetLastError());
|
||||||
init_done_event = OpenEvent(EVENT_MODIFY_STATE, FALSE, "ole_server_init_done_event");
|
init_done_event = OpenEventA(EVENT_MODIFY_STATE, FALSE, "ole_server_init_done_event");
|
||||||
ok(init_done_event != 0, "server: OpenEvent error %d\n", GetLastError());
|
ok(init_done_event != 0, "server: OpenEvent error %d\n", GetLastError());
|
||||||
|
|
||||||
SetEvent(init_done_event);
|
SetEvent(init_done_event);
|
||||||
|
@ -300,8 +300,8 @@ static BOOL register_server(const char *server, BOOL inproc_handler)
|
||||||
WCHAR buf[39 + 6];
|
WCHAR buf[39 + 6];
|
||||||
char server_path[MAX_PATH];
|
char server_path[MAX_PATH];
|
||||||
|
|
||||||
lstrcpy(server_path, server);
|
lstrcpyA(server_path, server);
|
||||||
lstrcat(server_path, " ole_server");
|
lstrcatA(server_path, " ole_server");
|
||||||
|
|
||||||
lstrcpyW(buf, clsidW);
|
lstrcpyW(buf, clsidW);
|
||||||
StringFromGUID2(&CLSID_WineTestObject, buf + 6, 39);
|
StringFromGUID2(&CLSID_WineTestObject, buf + 6, 39);
|
||||||
|
@ -310,12 +310,12 @@ static BOOL register_server(const char *server, BOOL inproc_handler)
|
||||||
KEY_READ | KEY_WRITE | KEY_CREATE_SUB_KEY, NULL, &root, NULL);
|
KEY_READ | KEY_WRITE | KEY_CREATE_SUB_KEY, NULL, &root, NULL);
|
||||||
if (ret == ERROR_SUCCESS)
|
if (ret == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
ret = RegSetValue(root, "LocalServer32", REG_SZ, server_path, strlen(server_path));
|
ret = RegSetValueA(root, "LocalServer32", REG_SZ, server_path, strlen(server_path));
|
||||||
ok(ret == ERROR_SUCCESS, "RegSetValue error %u\n", ret);
|
ok(ret == ERROR_SUCCESS, "RegSetValue error %u\n", ret);
|
||||||
|
|
||||||
if (inproc_handler)
|
if (inproc_handler)
|
||||||
{
|
{
|
||||||
ret = RegSetValue(root, "InprocHandler32", REG_SZ, "ole32.dll", 9);
|
ret = RegSetValueA(root, "InprocHandler32", REG_SZ, "ole32.dll", 9);
|
||||||
ok(ret == ERROR_SUCCESS, "RegSetValue error %u\n", ret);
|
ok(ret == ERROR_SUCCESS, "RegSetValue error %u\n", ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,11 +339,11 @@ static void unregister_server(void)
|
||||||
DELETE, NULL, &root, NULL);
|
DELETE, NULL, &root, NULL);
|
||||||
if (ret == ERROR_SUCCESS)
|
if (ret == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
ret = RegDeleteKey(root, "InprocHandler32");
|
ret = RegDeleteKeyA(root, "InprocHandler32");
|
||||||
ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret);
|
ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret);
|
||||||
ret = RegDeleteKey(root, "LocalServer32");
|
ret = RegDeleteKeyA(root, "LocalServer32");
|
||||||
ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret);
|
ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret);
|
||||||
ret = RegDeleteKey(root, "");
|
ret = RegDeleteKeyA(root, "");
|
||||||
ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret);
|
ok(ret == ERROR_SUCCESS, "RegDeleteKey error %u\n", ret);
|
||||||
RegCloseKey(root);
|
RegCloseKey(root);
|
||||||
}
|
}
|
||||||
|
@ -352,7 +352,7 @@ static void unregister_server(void)
|
||||||
static HANDLE start_server(const char *argv0)
|
static HANDLE start_server(const char *argv0)
|
||||||
{
|
{
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
STARTUPINFO si;
|
STARTUPINFOA si;
|
||||||
SECURITY_ATTRIBUTES sa;
|
SECURITY_ATTRIBUTES sa;
|
||||||
char cmdline[MAX_PATH * 2];
|
char cmdline[MAX_PATH * 2];
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
@ -369,7 +369,7 @@ static HANDLE start_server(const char *argv0)
|
||||||
sa.bInheritHandle = TRUE;
|
sa.bInheritHandle = TRUE;
|
||||||
|
|
||||||
sprintf(cmdline, "\"%s\" ole_server -server", argv0);
|
sprintf(cmdline, "\"%s\" ole_server -server", argv0);
|
||||||
ret = CreateProcess(argv0, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi);
|
ret = CreateProcessA(argv0, cmdline, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi);
|
||||||
ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError());
|
ok(ret, "CreateProcess(%s) error %d\n", cmdline, GetLastError());
|
||||||
if (!ret) return 0;
|
if (!ret) return 0;
|
||||||
|
|
||||||
|
@ -391,26 +391,26 @@ START_TEST(ole_server)
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
|
|
||||||
mapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, "winetest_ole_server");
|
mapping = CreateFileMappingA(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, "winetest_ole_server");
|
||||||
ok(mapping != 0, "CreateFileMapping failed\n");
|
ok(mapping != 0, "CreateFileMapping failed\n");
|
||||||
info = MapViewOfFile(mapping, FILE_MAP_READ|FILE_MAP_WRITE, 0, 0, 4096);
|
info = MapViewOfFile(mapping, FILE_MAP_READ|FILE_MAP_WRITE, 0, 0, 4096);
|
||||||
|
|
||||||
argc = winetest_get_mainargs(&argv);
|
argc = winetest_get_mainargs(&argv);
|
||||||
|
|
||||||
done_event = CreateEvent(NULL, TRUE, FALSE, "ole_server_done_event");
|
done_event = CreateEventA(NULL, TRUE, FALSE, "ole_server_done_event");
|
||||||
ok(done_event != 0, "CreateEvent error %d\n", GetLastError());
|
ok(done_event != 0, "CreateEvent error %d\n", GetLastError());
|
||||||
init_done_event = CreateEvent(NULL, TRUE, FALSE, "ole_server_init_done_event");
|
init_done_event = CreateEventA(NULL, TRUE, FALSE, "ole_server_init_done_event");
|
||||||
ok(init_done_event != 0, "CreateEvent error %d\n", GetLastError());
|
ok(init_done_event != 0, "CreateEvent error %d\n", GetLastError());
|
||||||
|
|
||||||
if (argc > 2)
|
if (argc > 2)
|
||||||
{
|
{
|
||||||
if (!lstrcmpi(argv[2], "-Embedding"))
|
if (!lstrcmpiA(argv[2], "-Embedding"))
|
||||||
{
|
{
|
||||||
trace("server: Refusing to be run by ole32\n");
|
trace("server: Refusing to be run by ole32\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lstrcmpi(argv[2], "-server"))
|
if (!lstrcmpiA(argv[2], "-server"))
|
||||||
{
|
{
|
||||||
info->child_failures = 0;
|
info->child_failures = 0;
|
||||||
ole_server();
|
ole_server();
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
#include "wtypes.h"
|
||||||
|
#include "ddeml.h"
|
||||||
|
|
||||||
#include "wine/test.h"
|
#include "wine/test.h"
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ static void test_create_storage_modes(void)
|
||||||
static void test_stgcreatestorageex(void)
|
static void test_stgcreatestorageex(void)
|
||||||
{
|
{
|
||||||
HRESULT (WINAPI *pStgCreateStorageEx)(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen);
|
HRESULT (WINAPI *pStgCreateStorageEx)(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen);
|
||||||
HMODULE hOle32 = GetModuleHandle("ole32");
|
HMODULE hOle32 = GetModuleHandleA("ole32");
|
||||||
IStorage *stg = NULL;
|
IStorage *stg = NULL;
|
||||||
STGOPTIONS stgoptions = {1, 0, 4096};
|
STGOPTIONS stgoptions = {1, 0, 4096};
|
||||||
HRESULT r;
|
HRESULT r;
|
||||||
|
|
|
@ -241,8 +241,8 @@ static void test_marshal_HGLOBAL(void)
|
||||||
static HENHMETAFILE create_emf(void)
|
static HENHMETAFILE create_emf(void)
|
||||||
{
|
{
|
||||||
const RECT rect = {0, 0, 100, 100};
|
const RECT rect = {0, 0, 100, 100};
|
||||||
HDC hdc = CreateEnhMetaFile(NULL, NULL, &rect, "HENHMETAFILE Marshaling Test\0Test\0\0");
|
HDC hdc = CreateEnhMetaFileA(NULL, NULL, &rect, "HENHMETAFILE Marshaling Test\0Test\0\0");
|
||||||
ExtTextOut(hdc, 0, 0, ETO_OPAQUE, &rect, "Test String", strlen("Test String"), NULL);
|
ExtTextOutA(hdc, 0, 0, ETO_OPAQUE, &rect, "Test String", strlen("Test String"), NULL);
|
||||||
return CloseEnhMetaFile(hdc);
|
return CloseEnhMetaFile(hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,8 +313,8 @@ static void test_marshal_HENHMETAFILE(void)
|
||||||
static HMETAFILE create_mf(void)
|
static HMETAFILE create_mf(void)
|
||||||
{
|
{
|
||||||
RECT rect = {0, 0, 100, 100};
|
RECT rect = {0, 0, 100, 100};
|
||||||
HDC hdc = CreateMetaFile(NULL);
|
HDC hdc = CreateMetaFileA(NULL);
|
||||||
ExtTextOut(hdc, 0, 0, ETO_OPAQUE, &rect, "Test String", strlen("Test String"), NULL);
|
ExtTextOutA(hdc, 0, 0, ETO_OPAQUE, &rect, "Test String", strlen("Test String"), NULL);
|
||||||
return CloseMetaFile(hdc);
|
return CloseMetaFile(hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue