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
36a24b93
Commit
36a24b93
authored
Jan 20, 2009
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Jan 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Support the command file type association query.
parent
540febec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
9 deletions
+30
-9
assoc.c
dlls/shlwapi/assoc.c
+30
-9
No files found.
dlls/shlwapi/assoc.c
View file @
36a24b93
...
...
@@ -594,9 +594,8 @@ static HRESULT ASSOC_GetValue(HKEY hkey, WCHAR ** pszText)
return
S_OK
;
}
static
HRESULT
ASSOC_GetExecutable
(
IQueryAssociationsImpl
*
This
,
LPCWSTR
pszExtra
,
LPWSTR
path
,
DWORD
pathlen
,
DWORD
*
len
)
static
HRESULT
ASSOC_GetCommand
(
IQueryAssociationsImpl
*
This
,
LPCWSTR
pszExtra
,
WCHAR
**
ppszCommand
)
{
HKEY
hkeyCommand
;
HKEY
hkeyFile
;
...
...
@@ -604,16 +603,11 @@ static HRESULT ASSOC_GetExecutable(IQueryAssociationsImpl *This,
HKEY
hkeyVerb
;
HRESULT
hr
;
LONG
ret
;
WCHAR
*
pszCommand
;
WCHAR
*
pszEnd
;
WCHAR
*
pszExtraFromReg
=
NULL
;
WCHAR
*
pszFileType
;
WCHAR
*
pszStart
;
static
const
WCHAR
commandW
[]
=
{
'c'
,
'o'
,
'm'
,
'm'
,
'a'
,
'n'
,
'd'
,
0
};
static
const
WCHAR
shellW
[]
=
{
's'
,
'h'
,
'e'
,
'l'
,
'l'
,
0
};
assert
(
len
);
hr
=
ASSOC_GetValue
(
This
->
hkeySource
,
&
pszFileType
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -672,8 +666,23 @@ static HRESULT ASSOC_GetExecutable(IQueryAssociationsImpl *This,
RegCloseKey
(
hkeyVerb
);
if
(
ret
!=
ERROR_SUCCESS
)
return
HRESULT_FROM_WIN32
(
ret
);
hr
=
ASSOC_GetValue
(
hkeyCommand
,
&
pszCommand
);
hr
=
ASSOC_GetValue
(
hkeyCommand
,
p
pszCommand
);
RegCloseKey
(
hkeyCommand
);
return
hr
;
}
static
HRESULT
ASSOC_GetExecutable
(
IQueryAssociationsImpl
*
This
,
LPCWSTR
pszExtra
,
LPWSTR
path
,
DWORD
pathlen
,
DWORD
*
len
)
{
WCHAR
*
pszCommand
;
WCHAR
*
pszStart
;
WCHAR
*
pszEnd
;
HRESULT
hr
;
assert
(
len
);
hr
=
ASSOC_GetCommand
(
This
,
pszExtra
,
&
pszCommand
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -763,6 +772,18 @@ static HRESULT WINAPI IQueryAssociations_fnGetString(
switch
(
str
)
{
case
ASSOCSTR_COMMAND
:
{
WCHAR
*
command
;
hr
=
ASSOC_GetCommand
(
This
,
pszExtra
,
&
command
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ASSOC_ReturnData
(
pszOut
,
pcchOut
,
command
,
strlenW
(
command
)
+
1
);
HeapFree
(
GetProcessHeap
(),
0
,
command
);
}
return
hr
;
}
case
ASSOCSTR_EXECUTABLE
:
{
hr
=
ASSOC_GetExecutable
(
This
,
pszExtra
,
path
,
MAX_PATH
,
&
len
);
...
...
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