Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
0d735ac9
Commit
0d735ac9
authored
20 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
- handle IFileSystemBindData in IShellFolder::ParseDisplayName
- convert IShellFolder::ParseDisplayName to use Unicode
parent
78a04e39
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/shell32/pidl.h
+2
-0
2 additions, 0 deletions
dlls/shell32/pidl.h
dlls/shell32/shfldr_fs.c
+54
-7
54 additions, 7 deletions
dlls/shell32/shfldr_fs.c
with
56 additions
and
7 deletions
dlls/shell32/pidl.h
+
2
−
0
View file @
0d735ac9
...
...
@@ -212,7 +212,9 @@ LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID);
/* Commonly used PIDLs representing file system objects. */
LPITEMIDLIST
_ILCreateDesktop
(
void
);
LPITEMIDLIST
_ILCreateFromFindDataA
(
WIN32_FIND_DATAA
*
stffile
);
LPITEMIDLIST
_ILCreateFromFindDataW
(
WIN32_FIND_DATAW
*
stffile
);
HRESULT
_ILCreateFromPathA
(
LPCSTR
szPath
,
LPITEMIDLIST
*
ppidl
);
HRESULT
_ILCreateFromPathW
(
LPCWSTR
szPath
,
LPITEMIDLIST
*
ppidl
);
/* Other helpers */
LPITEMIDLIST
_ILCreateMyComputer
(
void
);
...
...
This diff is collapsed.
Click to expand it.
dlls/shell32/shfldr_fs.c
+
54
−
7
View file @
0d735ac9
...
...
@@ -295,6 +295,50 @@ static ULONG WINAPI IShellFolder_fnRelease (IShellFolder2 * iface)
return
IUnknown_Release
(
This
->
pUnkOuter
);
}
/**************************************************************************
* SHELL32_CreatePidlFromBindCtx [internal]
*
* If the caller bound File System Bind Data, assume it is the
* find data for the path.
* This allows binding of pathes that don't exist.
*/
LPITEMIDLIST
SHELL32_CreatePidlFromBindCtx
(
IBindCtx
*
pbc
,
LPCWSTR
path
)
{
static
const
WCHAR
szfsbc
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
' '
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
' '
,
'B'
,
'i'
,
'n'
,
'd'
,
' '
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
IFileSystemBindData
*
fsbd
=
NULL
;
LPITEMIDLIST
pidl
=
NULL
;
IUnknown
*
param
=
NULL
;
WIN32_FIND_DATAW
wfd
;
HRESULT
r
;
TRACE
(
"%p %s
\n
"
,
pbc
,
debugstr_w
(
path
));
if
(
!
pbc
)
return
NULL
;
/* see if the caller bound File System Bind Data */
r
=
IBindCtx_GetObjectParam
(
pbc
,
(
LPOLESTR
)
szfsbc
,
&
param
);
if
(
FAILED
(
r
))
return
NULL
;
r
=
IUnknown_QueryInterface
(
param
,
&
IID_IFileSystemBindData
,
(
LPVOID
*
)
&
fsbd
);
if
(
SUCCEEDED
(
r
))
{
r
=
IFileSystemBindData_GetFindData
(
fsbd
,
&
wfd
);
if
(
SUCCEEDED
(
r
))
{
lstrcpynW
(
&
wfd
.
cFileName
[
0
],
path
,
MAX_PATH
);
pidl
=
_ILCreateFromFindDataW
(
&
wfd
);
}
IFileSystemBindData_Release
(
fsbd
);
}
return
pidl
;
}
/**************************************************************************
* IShellFolder_ParseDisplayName {SHELL32}
*
...
...
@@ -332,7 +376,7 @@ IShellFolder_fnParseDisplayName (IShellFolder2 * iface,
HRESULT
hr
=
E_INVALIDARG
;
LPCWSTR
szNext
=
NULL
;
WCHAR
szElement
[
MAX_PATH
];
CHAR
szPath
[
MAX_PATH
];
W
CHAR
szPath
[
MAX_PATH
];
LPITEMIDLIST
pidlTemp
=
NULL
;
DWORD
len
;
...
...
@@ -345,18 +389,21 @@ IShellFolder_fnParseDisplayName (IShellFolder2 * iface,
if
(
pchEaten
)
*
pchEaten
=
0
;
/* strange but like the original */
if
(
*
lpszDisplayName
)
{
pidlTemp
=
SHELL32_CreatePidlFromBindCtx
(
pbc
,
lpszDisplayName
);
if
(
!
pidlTemp
&&
*
lpszDisplayName
)
{
/* get the next element */
szNext
=
GetNextElementW
(
lpszDisplayName
,
szElement
,
MAX_PATH
);
/* build the full pathname to the element */
lstrcpyA
(
szPath
,
This
->
sPathTarget
);
PathAddBackslashA
(
szPath
);
len
=
lstrlenA
(
szPath
);
WideCharToMultiByte
(
CP_ACP
,
0
,
szElement
,
-
1
,
szPath
+
len
,
MAX_PATH
-
len
,
NULL
,
NULL
);
/* lstrcpyW(szPath, This->sPathTarget); */
MultiByteToWideChar
(
CP_ACP
,
0
,
This
->
sPathTarget
,
-
1
,
szPath
,
MAX_PATH
);
PathAddBackslashW
(
szPath
);
len
=
lstrlenW
(
szPath
);
lstrcpynW
(
szPath
+
len
,
szElement
,
MAX_PATH
-
len
);
/* get the pidl */
hr
=
_ILCreateFromPath
A
(
szPath
,
&
pidlTemp
);
hr
=
_ILCreateFromPath
W
(
szPath
,
&
pidlTemp
);
if
(
SUCCEEDED
(
hr
))
{
if
(
szNext
&&
*
szNext
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment