Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
042bdefe
Commit
042bdefe
authored
Jul 07, 2007
by
Thomas Weidenmueller
Committed by
Alexandre Julliard
Jul 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Set current directory when executing files in a shell view.
parent
2d7cd213
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
shlview.c
dlls/shell32/shlview.c
+14
-5
No files found.
dlls/shell32/shlview.c
View file @
042bdefe
...
...
@@ -854,6 +854,9 @@ static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This)
STGMEDIUM
stgm
;
LPIDA
pIDList
;
LPCITEMIDLIST
parent_pidl
;
WCHAR
parent_path
[
MAX_PATH
];
LPCWSTR
parent_dir
=
NULL
;
SFGAOF
attribs
;
int
i
;
if
(
0
==
ShellView_GetSelections
(
This
))
...
...
@@ -887,10 +890,16 @@ static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This)
pIDList
=
GlobalLock
(
stgm
.
u
.
hGlobal
);
parent_pidl
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pIDList
+
pIDList
->
aoffset
[
0
]);
hr
=
IShellFolder_GetAttributesOf
(
This
->
pSFParent
,
1
,
&
parent_pidl
,
&
attribs
);
if
(
SUCCEEDED
(
hr
)
&&
(
attribs
&
SFGAO_FILESYSTEM
)
&&
SHGetPathFromIDListW
(
parent_pidl
,
parent_path
))
{
parent_dir
=
parent_path
;
}
for
(
i
=
pIDList
->
cidl
;
i
>
0
;
--
i
)
{
LPCITEMIDLIST
pidl
;
SFGAOF
attribs
;
pidl
=
(
LPCITEMIDLIST
)((
LPBYTE
)
pIDList
+
pIDList
->
aoffset
[
i
]);
...
...
@@ -899,19 +908,19 @@ static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This)
if
(
SUCCEEDED
(
hr
)
&&
!
(
attribs
&
SFGAO_FOLDER
))
{
SHELLEXECUTEINFO
A
shexinfo
;
SHELLEXECUTEINFO
W
shexinfo
;
shexinfo
.
cbSize
=
sizeof
(
SHELLEXECUTEINFO
A
);
shexinfo
.
cbSize
=
sizeof
(
SHELLEXECUTEINFO
W
);
shexinfo
.
fMask
=
SEE_MASK_INVOKEIDLIST
;
/* SEE_MASK_IDLIST is also possible. */
shexinfo
.
hwnd
=
NULL
;
shexinfo
.
lpVerb
=
NULL
;
shexinfo
.
lpFile
=
NULL
;
shexinfo
.
lpParameters
=
NULL
;
shexinfo
.
lpDirectory
=
NULL
;
shexinfo
.
lpDirectory
=
parent_dir
;
shexinfo
.
nShow
=
SW_NORMAL
;
shexinfo
.
lpIDList
=
ILCombine
(
parent_pidl
,
pidl
);
ShellExecuteEx
A
(
&
shexinfo
);
/* Discard error/success info */
ShellExecuteEx
W
(
&
shexinfo
);
/* Discard error/success info */
ILFree
((
LPITEMIDLIST
)
shexinfo
.
lpIDList
);
}
...
...
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