combase: Return initial values for global options.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
583d2cbfb7
commit
d63ed91c28
|
@ -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 =
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue