Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/combase/combase.c | 11 +++++++++-- dlls/ole32/tests/compobj.c | 13 +++++++++++++ include/objidlbase.idl | 28 +++++++++++++++++++++++++++- 3 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/dlls/combase/combase.c b/dlls/combase/combase.c index cda0d52f579..4677972656f 100644 --- a/dlls/combase/combase.c +++ b/dlls/combase/combase.c @@ -38,6 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
HINSTANCE hProxyDll;
+static ULONG_PTR global_options[COMGLB_PROPERTIES_RESERVED3 + 1]; + /* Ole32 exports */ extern void WINAPI DestroyRunningObjectTable(void); extern HRESULT WINAPI Ole32DllGetClassObject(REFCLSID rclsid, REFIID riid, void **obj); @@ -490,9 +492,14 @@ static HRESULT WINAPI global_options_Set(IGlobalOptions *iface, GLOBALOPT_PROPER
static HRESULT WINAPI global_options_Query(IGlobalOptions *iface, GLOBALOPT_PROPERTIES property, ULONG_PTR *value) { - FIXME("%p, %u, %p.\n", iface, property, value); + TRACE("%p, %u, %p.\n", iface, property, value);
- return E_NOTIMPL; + if (property < COMGLB_EXCEPTION_HANDLING || property > COMGLB_PROPERTIES_RESERVED3) + return E_INVALIDARG; + + *value = global_options[property]; + + return S_OK; }
static const IGlobalOptionsVtbl global_options_vtbl = diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index 2e5006463da..d1e947e393f 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -3919,6 +3919,7 @@ todo_wine { static void test_GlobalOptions(void) { IGlobalOptions *global_options; + ULONG_PTR value; HRESULT hres;
CoInitialize(NULL); @@ -3933,6 +3934,18 @@ static void test_GlobalOptions(void) return; }
+ hres = IGlobalOptions_Query(global_options, 0, &value); + ok(FAILED(hres), "Unexpected hr %#x.\n", hres); + + hres = IGlobalOptions_Query(global_options, COMGLB_PROPERTIES_RESERVED3 + 1, &value); + ok(FAILED(hres), "Unexpected hr %#x.\n", hres); + + value = ~0u; + hres = IGlobalOptions_Query(global_options, COMGLB_EXCEPTION_HANDLING, &value); + ok(hres == S_OK || broken(hres == E_FAIL) /* Vista */, "Unexpected hr %#x.\n", hres); + if (SUCCEEDED(hres)) + ok(value == COMGLB_EXCEPTION_HANDLE, "Unexpected value %ld.\n", value); + IGlobalOptions_Release(global_options);
hres = CoCreateInstance(&CLSID_GlobalOptions, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER, diff --git a/include/objidlbase.idl b/include/objidlbase.idl index 6449be8417b..bd5a9b12409 100644 --- a/include/objidlbase.idl +++ b/include/objidlbase.idl @@ -1095,7 +1095,12 @@ typedef enum tagGLOBALOPT_PROPERTIES { COMGLB_EXCEPTION_HANDLING = 1, COMGLB_APPID = 2, - COMGLB_RPC_THREADPOOL_SETTING = 3 + COMGLB_RPC_THREADPOOL_SETTING = 3, + COMGLB_RO_SETTINGS = 4, + COMGLB_UNMARSHALING_POLICY = 5, + COMGLB_PROPERTIES_RESERVED1 = 6, + COMGLB_PROPERTIES_RESERVED2 = 7, + COMGLB_PROPERTIES_RESERVED3 = 8, } GLOBALOPT_PROPERTIES;
typedef enum tagGLOBALOPT_EH_VALUES @@ -1112,6 +1117,27 @@ typedef enum tagGLOBALOPT_RPCTP_VALUES COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL = 1 } GLOBALOPT_RPCTP_VALUES;
+typedef enum tagGLOBALOPT_RO_FLAGS +{ + COMGLB_STA_MODALLOOP_REMOVE_TOUCH_MESSAGES = 0x1, + COMGLB_STA_MODALLOOP_SHARED_QUEUE_REMOVE_INPUT_MESSAGES = 0x2, + COMGLB_STA_MODALLOOP_SHARED_QUEUE_DONOT_REMOVE_INPUT_MESSAGES = 0x4, + COMGLB_FAST_RUNDOWN = 0x8, + COMGLB_RESERVED1 = 0x10, + COMGLB_RESERVED2 = 0x20, + COMGLB_RESERVED3 = 0x40, + COMGLB_STA_MODALLOOP_SHARED_QUEUE_REORDER_POINTER_MESSAGES = 0x80, + COMGLB_RESERVED4 = 0x100, + COMGLB_RESERVED5 = 0x200, + COMGLB_RESERVED6 = 0x400, +} GLOBALOPT_RO_FLAGS; + +typedef enum tagGLOBALOPT_UNMARSHALING_POLICY_VALUES +{ + COMGLB_UNMARSHALING_POLICY_NORMAL = 0, + COMGLB_UNMARSHALING_POLICY_STRONG = 1, + COMGLB_UNMARSHALING_POLICY_HYBRID = 2, +} GLOBALOPT_UNMARSHALING_POLICY_VALUES;
[ object,
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=88065
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ole32: compobj.c:831: Test failed: Section not found. compobj.c:841: Test failed: Unexpected return value. compobj.c:850: Test failed: Unexpected return value. compobj.c:856: Test failed: Unexpected module name L"testlib.dll".