include: Added missing ASSOCF enum members.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fff5dca787
commit
784a74c933
|
@ -109,10 +109,10 @@ static void getstring_test(LPCWSTR assocName, HKEY progIdKey, ASSOCSTR str, LPCW
|
||||||
|
|
||||||
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc);
|
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc);
|
||||||
ok_(__FILE__, line)(hr == S_OK, "failed to create IQueryAssociations, 0x%x\n", hr);
|
ok_(__FILE__, line)(hr == S_OK, "failed to create IQueryAssociations, 0x%x\n", hr);
|
||||||
hr = IQueryAssociations_Init(assoc, 0, assocName, progIdKey, NULL);
|
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, assocName, progIdKey, NULL);
|
||||||
ok_(__FILE__, line)(hr == S_OK, "IQueryAssociations::Init failed, 0x%x\n", hr);
|
ok_(__FILE__, line)(hr == S_OK, "IQueryAssociations::Init failed, 0x%x\n", hr);
|
||||||
|
|
||||||
hr = IQueryAssociations_GetString(assoc, 0, str, NULL, NULL, &len);
|
hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, str, NULL, NULL, &len);
|
||||||
if (hr != S_FALSE) {
|
if (hr != S_FALSE) {
|
||||||
if (expected_string) {
|
if (expected_string) {
|
||||||
ok_(__FILE__, line)(SUCCEEDED(hr), "GetString returned 0x%x, expected success\n", hr);
|
ok_(__FILE__, line)(SUCCEEDED(hr), "GetString returned 0x%x, expected success\n", hr);
|
||||||
|
@ -123,7 +123,7 @@ static void getstring_test(LPCWSTR assocName, HKEY progIdKey, ASSOCSTR str, LPCW
|
||||||
|
|
||||||
buffer = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
buffer = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||||
ok_(__FILE__, line)(buffer != NULL, "out of memory\n");
|
ok_(__FILE__, line)(buffer != NULL, "out of memory\n");
|
||||||
hr = IQueryAssociations_GetString(assoc, 0, str, NULL, buffer, &len);
|
hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, str, NULL, buffer, &len);
|
||||||
|
|
||||||
if (expected_string) {
|
if (expected_string) {
|
||||||
ok_(__FILE__, line)(lstrcmpW(buffer, expected_string) == 0, "GetString returned %s, expected %s\n",
|
ok_(__FILE__, line)(lstrcmpW(buffer, expected_string) == 0, "GetString returned %s, expected %s\n",
|
||||||
|
@ -182,11 +182,11 @@ static void test_IQueryAssociations_GetString(void)
|
||||||
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc);
|
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc);
|
||||||
ok(hr == S_OK, "failed to create object, 0x%x\n", hr);
|
ok(hr == S_OK, "failed to create object, 0x%x\n", hr);
|
||||||
|
|
||||||
hr = IQueryAssociations_Init(assoc, 0, httpW, NULL, NULL);
|
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, httpW, NULL, NULL);
|
||||||
ok(hr == S_OK, "Init failed, 0x%x\n", hr);
|
ok(hr == S_OK, "Init failed, 0x%x\n", hr);
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
hr = IQueryAssociations_GetString(assoc, 0, ASSOCSTR_EXECUTABLE, NULL, NULL, &len);
|
hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, ASSOCSTR_EXECUTABLE, NULL, NULL, &len);
|
||||||
ok(hr == S_FALSE, "got 0x%08x\n", hr);
|
ok(hr == S_FALSE, "got 0x%08x\n", hr);
|
||||||
ok(len > 0, "got wrong needed length, %d\n", len);
|
ok(len > 0, "got wrong needed length, %d\n", len);
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ static void test_IQueryAssociations_GetString(void)
|
||||||
WCHAR buffW[MAX_PATH];
|
WCHAR buffW[MAX_PATH];
|
||||||
DWORD len;
|
DWORD len;
|
||||||
|
|
||||||
hr = IQueryAssociations_Init(assoc, 0, ptr->key, NULL, NULL);
|
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, ptr->key, NULL, NULL);
|
||||||
ok(hr == S_OK, "%d: Init failed, 0x%x\n", i, hr);
|
ok(hr == S_OK, "%d: Init failed, 0x%x\n", i, hr);
|
||||||
|
|
||||||
len = ptr->len;
|
len = ptr->len;
|
||||||
|
@ -232,17 +232,17 @@ static void test_IQueryAssociations_Init(void)
|
||||||
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc);
|
hr = CoCreateInstance(&CLSID_QueryAssociations, NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (void*)&assoc);
|
||||||
ok(hr == S_OK, "failed to create object, 0x%x\n", hr);
|
ok(hr == S_OK, "failed to create object, 0x%x\n", hr);
|
||||||
|
|
||||||
hr = IQueryAssociations_Init(assoc, 0, NULL, NULL, NULL);
|
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, NULL, NULL, NULL);
|
||||||
ok(hr == E_INVALIDARG, "Init failed, 0x%08x\n", hr);
|
ok(hr == E_INVALIDARG, "Init failed, 0x%08x\n", hr);
|
||||||
|
|
||||||
hr = IQueryAssociations_Init(assoc, 0, httpW, NULL, NULL);
|
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, httpW, NULL, NULL);
|
||||||
ok(hr == S_OK, "Init failed, 0x%08x\n", hr);
|
ok(hr == S_OK, "Init failed, 0x%08x\n", hr);
|
||||||
|
|
||||||
hr = IQueryAssociations_Init(assoc, 0, badW, NULL, NULL);
|
hr = IQueryAssociations_Init(assoc, ASSOCF_NONE, badW, NULL, NULL);
|
||||||
ok(hr == S_OK || broken(hr == S_FALSE) /* pre-vista */, "Init failed, 0x%08x\n", hr);
|
ok(hr == S_OK || broken(hr == S_FALSE) /* pre-vista */, "Init failed, 0x%08x\n", hr);
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
hr = IQueryAssociations_GetString(assoc, 0, ASSOCSTR_EXECUTABLE, NULL, NULL, &len);
|
hr = IQueryAssociations_GetString(assoc, ASSOCF_NONE, ASSOCSTR_EXECUTABLE, NULL, NULL, &len);
|
||||||
ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) || broken(hr == E_FAIL) /* pre-vista */, "got 0x%08x\n", hr);
|
ok(hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) || broken(hr == E_FAIL) /* pre-vista */, "got 0x%08x\n", hr);
|
||||||
|
|
||||||
IQueryAssociations_Release(assoc);
|
IQueryAssociations_Release(assoc);
|
||||||
|
|
|
@ -210,18 +210,22 @@ int WINAPI SHRegGetIntW(HKEY,LPCWSTR,int);
|
||||||
/* IQueryAssociation and helpers */
|
/* IQueryAssociation and helpers */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ASSOCF_INIT_NOREMAPCLSID = 0x001, /* Don't map clsid->progid */
|
ASSOCF_NONE = 0x0000,
|
||||||
ASSOCF_INIT_BYEXENAME = 0x002, /* .exe name given */
|
ASSOCF_INIT_NOREMAPCLSID = 0x0001, /* Don't map clsid->progid */
|
||||||
ASSOCF_OPEN_BYEXENAME = 0x002, /* Synonym */
|
ASSOCF_INIT_BYEXENAME = 0x0002, /* .exe name given */
|
||||||
ASSOCF_INIT_DEFAULTTOSTAR = 0x004, /* Use * as base */
|
ASSOCF_OPEN_BYEXENAME = 0x0002, /* Synonym */
|
||||||
ASSOCF_INIT_DEFAULTTOFOLDER = 0x008, /* Use folder as base */
|
ASSOCF_INIT_DEFAULTTOSTAR = 0x0004, /* Use * as base */
|
||||||
ASSOCF_NOUSERSETTINGS = 0x010, /* No HKCU reads */
|
ASSOCF_INIT_DEFAULTTOFOLDER = 0x0008, /* Use folder as base */
|
||||||
ASSOCF_NOTRUNCATE = 0x020, /* Don't truncate return */
|
ASSOCF_NOUSERSETTINGS = 0x0010, /* No HKCU reads */
|
||||||
ASSOCF_VERIFY = 0x040, /* Verify data */
|
ASSOCF_NOTRUNCATE = 0x0020, /* Don't truncate return */
|
||||||
ASSOCF_REMAPRUNDLL = 0x080, /* Get rundll args */
|
ASSOCF_VERIFY = 0x0040, /* Verify data */
|
||||||
ASSOCF_NOFIXUPS = 0x100, /* Don't fixup errors */
|
ASSOCF_REMAPRUNDLL = 0x0080, /* Get rundll args */
|
||||||
ASSOCF_IGNOREBASECLASS = 0x200, /* Don't read baseclass */
|
ASSOCF_NOFIXUPS = 0x0100, /* Don't fixup errors */
|
||||||
ASSOCF_INIT_IGNOREUNKNOWN = 0x400, /* Fail for unknown progid */
|
ASSOCF_IGNOREBASECLASS = 0x0200, /* Don't read baseclass */
|
||||||
|
ASSOCF_INIT_IGNOREUNKNOWN = 0x0400, /* Fail for unknown progid */
|
||||||
|
ASSOCF_INIT_FIXED_PROGID = 0x0800, /* Used passed string as progid, don't try to map it */
|
||||||
|
ASSOCF_IS_PROTOCOL = 0x1000, /* Treat as protocol, that should be mapped */
|
||||||
|
ASSOCF_INIT_FOR_FILE = 0x2000, /* progid is for file extension association */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef DWORD ASSOCF;
|
typedef DWORD ASSOCF;
|
||||||
|
|
Loading…
Reference in New Issue