Commit d63ed91c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

combase: Return initial values for global options.

parent 583d2cbf
...@@ -38,6 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole); ...@@ -38,6 +38,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
HINSTANCE hProxyDll; HINSTANCE hProxyDll;
static ULONG_PTR global_options[COMGLB_PROPERTIES_RESERVED3 + 1];
/* Ole32 exports */ /* Ole32 exports */
extern void WINAPI DestroyRunningObjectTable(void); extern void WINAPI DestroyRunningObjectTable(void);
extern HRESULT WINAPI Ole32DllGetClassObject(REFCLSID rclsid, REFIID riid, void **obj); extern HRESULT WINAPI Ole32DllGetClassObject(REFCLSID rclsid, REFIID riid, void **obj);
...@@ -490,9 +492,14 @@ static HRESULT WINAPI global_options_Set(IGlobalOptions *iface, GLOBALOPT_PROPER ...@@ -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) 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 = static const IGlobalOptionsVtbl global_options_vtbl =
......
...@@ -3919,6 +3919,7 @@ todo_wine { ...@@ -3919,6 +3919,7 @@ todo_wine {
static void test_GlobalOptions(void) static void test_GlobalOptions(void)
{ {
IGlobalOptions *global_options; IGlobalOptions *global_options;
ULONG_PTR value;
HRESULT hres; HRESULT hres;
CoInitialize(NULL); CoInitialize(NULL);
...@@ -3933,6 +3934,18 @@ static void test_GlobalOptions(void) ...@@ -3933,6 +3934,18 @@ static void test_GlobalOptions(void)
return; 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); IGlobalOptions_Release(global_options);
hres = CoCreateInstance(&CLSID_GlobalOptions, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER, hres = CoCreateInstance(&CLSID_GlobalOptions, (IUnknown*)0xdeadbeef, CLSCTX_INPROC_SERVER,
......
...@@ -1095,7 +1095,12 @@ typedef enum tagGLOBALOPT_PROPERTIES ...@@ -1095,7 +1095,12 @@ typedef enum tagGLOBALOPT_PROPERTIES
{ {
COMGLB_EXCEPTION_HANDLING = 1, COMGLB_EXCEPTION_HANDLING = 1,
COMGLB_APPID = 2, 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; } GLOBALOPT_PROPERTIES;
typedef enum tagGLOBALOPT_EH_VALUES typedef enum tagGLOBALOPT_EH_VALUES
...@@ -1112,6 +1117,27 @@ typedef enum tagGLOBALOPT_RPCTP_VALUES ...@@ -1112,6 +1117,27 @@ typedef enum tagGLOBALOPT_RPCTP_VALUES
COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL = 1 COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL = 1
} GLOBALOPT_RPCTP_VALUES; } 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, object,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment