Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
784a74c9
Commit
784a74c9
authored
May 31, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Added missing ASSOCF enum members.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fff5dca7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
22 deletions
+26
-22
assoc.c
dlls/shell32/tests/assoc.c
+10
-10
shlwapi.h
include/shlwapi.h
+16
-12
No files found.
dlls/shell32/tests/assoc.c
View file @
784a74c9
...
...
@@ -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
);
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
);
hr
=
IQueryAssociations_GetString
(
assoc
,
0
,
str
,
NULL
,
NULL
,
&
len
);
hr
=
IQueryAssociations_GetString
(
assoc
,
ASSOCF_NONE
,
str
,
NULL
,
NULL
,
&
len
);
if
(
hr
!=
S_FALSE
)
{
if
(
expected_string
)
{
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
));
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
)
{
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
);
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
);
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
(
len
>
0
,
"got wrong needed length, %d
\n
"
,
len
);
...
...
@@ -195,7 +195,7 @@ static void test_IQueryAssociations_GetString(void)
WCHAR
buffW
[
MAX_PATH
];
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
);
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
);
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
);
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
);
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
);
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
);
IQueryAssociations_Release
(
assoc
);
...
...
include/shlwapi.h
View file @
784a74c9
...
...
@@ -210,18 +210,22 @@ int WINAPI SHRegGetIntW(HKEY,LPCWSTR,int);
/* IQueryAssociation and helpers */
enum
{
ASSOCF_INIT_NOREMAPCLSID
=
0x001
,
/* Don't map clsid->progid */
ASSOCF_INIT_BYEXENAME
=
0x002
,
/* .exe name given */
ASSOCF_OPEN_BYEXENAME
=
0x002
,
/* Synonym */
ASSOCF_INIT_DEFAULTTOSTAR
=
0x004
,
/* Use * as base */
ASSOCF_INIT_DEFAULTTOFOLDER
=
0x008
,
/* Use folder as base */
ASSOCF_NOUSERSETTINGS
=
0x010
,
/* No HKCU reads */
ASSOCF_NOTRUNCATE
=
0x020
,
/* Don't truncate return */
ASSOCF_VERIFY
=
0x040
,
/* Verify data */
ASSOCF_REMAPRUNDLL
=
0x080
,
/* Get rundll args */
ASSOCF_NOFIXUPS
=
0x100
,
/* Don't fixup errors */
ASSOCF_IGNOREBASECLASS
=
0x200
,
/* Don't read baseclass */
ASSOCF_INIT_IGNOREUNKNOWN
=
0x400
,
/* Fail for unknown progid */
ASSOCF_NONE
=
0x0000
,
ASSOCF_INIT_NOREMAPCLSID
=
0x0001
,
/* Don't map clsid->progid */
ASSOCF_INIT_BYEXENAME
=
0x0002
,
/* .exe name given */
ASSOCF_OPEN_BYEXENAME
=
0x0002
,
/* Synonym */
ASSOCF_INIT_DEFAULTTOSTAR
=
0x0004
,
/* Use * as base */
ASSOCF_INIT_DEFAULTTOFOLDER
=
0x0008
,
/* Use folder as base */
ASSOCF_NOUSERSETTINGS
=
0x0010
,
/* No HKCU reads */
ASSOCF_NOTRUNCATE
=
0x0020
,
/* Don't truncate return */
ASSOCF_VERIFY
=
0x0040
,
/* Verify data */
ASSOCF_REMAPRUNDLL
=
0x0080
,
/* Get rundll args */
ASSOCF_NOFIXUPS
=
0x0100
,
/* Don't fixup errors */
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment