Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
907f94e1
Commit
907f94e1
authored
Jul 29, 2011
by
Octavian Voicu
Committed by
Alexandre Julliard
Jul 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Disable WOW64 redirection when converting pidls to UNIX paths.
parent
db35da73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
shfldr_unixfs.c
dlls/shell32/shfldr_unixfs.c
+4
-1
shlfolder.c
dlls/shell32/tests/shlfolder.c
+23
-2
No files found.
dlls/shell32/shfldr_unixfs.c
View file @
907f94e1
...
...
@@ -371,7 +371,8 @@ static BOOL UNIXFS_get_unix_path(LPCWSTR pszDosPath, char *pszCanonicalPath)
char
*
pPathTail
,
*
pElement
,
*
pCanonicalTail
,
szPath
[
FILENAME_MAX
],
*
pszUnixPath
,
has_failed
=
0
,
mb_path
[
FILENAME_MAX
];
WCHAR
wszDrive
[]
=
{
'?'
,
':'
,
'\\'
,
0
},
dospath
[
PATH_MAX
],
*
dospath_end
;
int
cDriveSymlinkLen
;
void
*
redir
;
TRACE
(
"(pszDosPath=%s, pszCanonicalPath=%p)
\n
"
,
debugstr_w
(
pszDosPath
),
pszCanonicalPath
);
if
(
!
pszDosPath
||
pszDosPath
[
1
]
!=
':'
)
...
...
@@ -392,6 +393,7 @@ static BOOL UNIXFS_get_unix_path(LPCWSTR pszDosPath, char *pszCanonicalPath)
dospath_end
=
dospath
+
lstrlenW
(
dospath
);
/* search for the most valid UNIX path possible, then append missing
* path parts */
Wow64DisableWow64FsRedirection
(
&
redir
);
while
(
!
(
pszUnixPath
=
wine_get_unix_file_name
(
dospath
))){
if
(
has_failed
){
*
dospath_end
=
'/'
;
...
...
@@ -405,6 +407,7 @@ static BOOL UNIXFS_get_unix_path(LPCWSTR pszDosPath, char *pszCanonicalPath)
}
*
dospath_end
=
'\0'
;
}
Wow64RevertWow64FsRedirection
(
redir
);
if
(
dospath_end
<
dospath
)
return
FALSE
;
strcat
(
szPath
,
pszUnixPath
+
cDriveSymlinkLen
);
...
...
dlls/shell32/tests/shlfolder.c
View file @
907f94e1
...
...
@@ -70,6 +70,7 @@ static HRESULT (WINAPI *pSHGetItemFromDataObject)(IDataObject*,DATAOBJ_GET_ITEM_
static
HRESULT
(
WINAPI
*
pSHGetIDListFromObject
)(
IUnknown
*
,
PIDLIST_ABSOLUTE
*
);
static
HRESULT
(
WINAPI
*
pSHGetItemFromObject
)(
IUnknown
*
,
REFIID
,
void
**
);
static
BOOL
(
WINAPI
*
pIsWow64Process
)(
HANDLE
,
PBOOL
);
static
UINT
(
WINAPI
*
pGetSystemWow64DirectoryW
)(
LPWSTR
,
UINT
);
static
WCHAR
*
make_wstr
(
const
char
*
str
)
{
...
...
@@ -165,7 +166,9 @@ static void init_function_pointers(void)
hmod
=
GetModuleHandleA
(
"shlwapi.dll"
);
pStrRetToBufW
=
(
void
*
)
GetProcAddress
(
hmod
,
"StrRetToBufW"
);
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"kernel32.dll"
),
"IsWow64Process"
);
hmod
=
GetModuleHandleA
(
"kernel32.dll"
);
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
hmod
,
"IsWow64Process"
);
pGetSystemWow64DirectoryW
=
(
void
*
)
GetProcAddress
(
hmod
,
"GetSystemWow64DirectoryW"
);
hr
=
SHGetMalloc
(
&
ppM
);
ok
(
hr
==
S_OK
,
"SHGetMalloc failed %08x
\n
"
,
hr
);
...
...
@@ -3727,7 +3730,7 @@ static void test_SHParseDisplayName(void)
WCHAR
dirW
[
MAX_PATH
];
WCHAR
nameW
[
10
];
HRESULT
hr
;
BOOL
ret
;
BOOL
ret
,
is_wow64
;
if
(
!
pSHParseDisplayName
)
{
...
...
@@ -3775,6 +3778,24 @@ if (0)
pILFree
(
pidl1
);
pILFree
(
pidl2
);
/* system32 is not redirected to syswow64 on WOW64 */
if
(
!
pIsWow64Process
||
!
pIsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
))
is_wow64
=
FALSE
;
if
(
is_wow64
&&
pGetSystemWow64DirectoryW
)
{
*
dirW
=
0
;
ok
(
GetSystemDirectoryW
(
dirW
,
MAX_PATH
)
>
0
,
"GetSystemDirectoryW failed: %u
\n
"
,
GetLastError
());
hr
=
pSHParseDisplayName
(
dirW
,
NULL
,
&
pidl1
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"failed %08x
\n
"
,
hr
);
*
dirW
=
0
;
ok
(
pGetSystemWow64DirectoryW
(
dirW
,
MAX_PATH
)
>
0
,
"GetSystemWow64DirectoryW failed: %u
\n
"
,
GetLastError
());
hr
=
pSHParseDisplayName
(
dirW
,
NULL
,
&
pidl2
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"failed %08x
\n
"
,
hr
);
ret
=
pILIsEqual
(
pidl1
,
pidl2
);
ok
(
ret
==
FALSE
,
"expected different idls
\n
"
);
pILFree
(
pidl1
);
pILFree
(
pidl2
);
}
IShellFolder_Release
(
desktop
);
}
...
...
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