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
2407c138
Commit
2407c138
authored
Sep 15, 2003
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Sep 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure the bind context is forwarded in
ShellFolder_ParseDisplayName.
parent
9c74339c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
24 deletions
+32
-24
shfldr.h
dlls/shell32/shfldr.h
+2
-2
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+19
-10
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+3
-3
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+3
-3
shlfolder.c
dlls/shell32/shlfolder.c
+5
-6
No files found.
dlls/shell32/shfldr.h
View file @
2407c138
...
...
@@ -32,8 +32,8 @@ typedef struct {
#define GET_SHGDN_RELATION(dwFlags) ((DWORD)dwFlags & (DWORD)0x000000FF)
LPCWSTR
GetNextElementW
(
LPCWSTR
pszNext
,
LPWSTR
pszOut
,
DWORD
dwOut
);
HRESULT
SHELL32_ParseNextElement
(
HWND
hwndOwner
,
IShellFolder2
*
psf
,
LPITEMIDLIST
*
pidlInOut
,
LPOLESTR
szNex
t
,
DWORD
*
pEaten
,
DWORD
*
pdwAttributes
);
HRESULT
SHELL32_ParseNextElement
(
IShellFolder2
*
psf
,
HWND
hwndOwner
,
LPBC
pbc
,
LPITEMIDLIST
*
pidlInOu
t
,
LPOLESTR
szNext
,
DWORD
*
pEaten
,
DWORD
*
pdwAttributes
);
HRESULT
SHELL32_GetItemAttributes
(
IShellFolder
*
psf
,
LPCITEMIDLIST
pidl
,
LPDWORD
pdwAttributes
);
HRESULT
SHELL32_CoCreateInitSF
(
LPCITEMIDLIST
pidlRoot
,
LPCITEMIDLIST
pidlChild
,
REFCLSID
clsid
,
REFIID
iid
,
LPVOID
*
ppvOut
);
...
...
dlls/shell32/shfldr_desktop.c
View file @
2407c138
...
...
@@ -189,7 +189,7 @@ static ULONG WINAPI ISF_Desktop_fnRelease (IShellFolder2 * iface)
*/
static
HRESULT
WINAPI
ISF_Desktop_fnParseDisplayName
(
IShellFolder2
*
iface
,
HWND
hwndOwner
,
LPBC
pbc
Reserved
,
LPBC
pbc
,
LPOLESTR
lpszDisplayName
,
DWORD
*
pchEaten
,
LPITEMIDLIST
*
ppidl
,
DWORD
*
pdwAttributes
)
{
...
...
@@ -198,13 +198,19 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
WCHAR
szElement
[
MAX_PATH
];
LPCWSTR
szNext
=
NULL
;
LPITEMIDLIST
pidlTemp
=
NULL
;
HRESULT
hr
=
E_OUTOFMEMORY
;
HRESULT
hr
=
E_INVALIDARG
;
char
szPath
[
MAX_PATH
];
DWORD
len
;
CLSID
clsid
;
TRACE
(
"(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)
\n
"
,
This
,
hwndOwner
,
pbcReserved
,
lpszDisplayName
,
debugstr_w
(
lpszDisplayName
),
pchEaten
,
ppidl
,
pdwAttributes
);
This
,
hwndOwner
,
pbc
,
lpszDisplayName
,
debugstr_w
(
lpszDisplayName
),
pchEaten
,
ppidl
,
pdwAttributes
);
if
(
!
lpszDisplayName
||
!
ppidl
)
return
E_INVALIDARG
;
*
ppidl
=
0
;
if
(
pchEaten
)
*
pchEaten
=
0
;
/* strange but like the original */
...
...
@@ -217,21 +223,24 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
/* it's a filesystem path with a drive. Let MyComputer parse it */
pidlTemp
=
_ILCreateMyComputer
();
szNext
=
lpszDisplayName
;
}
else
if
(
PathIsUNCW
(
lpszDisplayName
))
{
pidlTemp
=
_ILCreateNetwork
();
szNext
=
lpszDisplayName
;
}
else
{
/* it's a filesystem path on the desktop. Let a FSFolder parse it */
WCHAR
szCompletePath
[
MAX_PATH
];
/* build a complete path to create a simpel pidl */
MultiByteToWideChar
(
CP_ACP
,
0
,
This
->
sPathTarget
,
-
1
,
szCompletePath
,
MAX_PATH
);
PathAddBackslashW
(
szCompletePath
);
lstrcatW
(
szCompletePath
,
lpszDisplayName
);
pidlTemp
=
SHSimpleIDListFromPathW
(
lpszDisplayName
);
/* build a complete path to create a simple pidl */
lstrcpyA
(
szPath
,
This
->
sPathTarget
);
PathAddBackslashA
(
szPath
);
len
=
lstrlenA
(
szPath
);
WideCharToMultiByte
(
CP_ACP
,
0
,
lpszDisplayName
,
-
1
,
szPath
+
len
,
MAX_PATH
-
len
,
NULL
,
NULL
);
pidlTemp
=
_ILCreateFromPathA
(
szPath
);
szNext
=
lpszDisplayName
;
}
if
(
pidlTemp
)
{
if
(
szNext
&&
*
szNext
)
{
hr
=
SHELL32_ParseNextElement
(
hwndOwner
,
iface
,
&
pidlTemp
,
(
LPOLESTR
)
szNext
,
pchEaten
,
pdwAttributes
);
hr
=
SHELL32_ParseNextElement
(
iface
,
hwndOwner
,
pbc
,
&
pidlTemp
,
(
LPOLESTR
)
szNext
,
pchEaten
,
pdwAttributes
);
}
else
{
hr
=
S_OK
;
if
(
pdwAttributes
&&
*
pdwAttributes
)
{
...
...
dlls/shell32/shfldr_fs.c
View file @
2407c138
...
...
@@ -319,7 +319,7 @@ static ULONG WINAPI IShellFolder_fnRelease (IShellFolder2 * iface)
static
HRESULT
WINAPI
IShellFolder_fnParseDisplayName
(
IShellFolder2
*
iface
,
HWND
hwndOwner
,
LPBC
pbc
Reserved
,
LPBC
pbc
,
LPOLESTR
lpszDisplayName
,
DWORD
*
pchEaten
,
LPITEMIDLIST
*
ppidl
,
DWORD
*
pdwAttributes
)
{
...
...
@@ -333,7 +333,7 @@ IShellFolder_fnParseDisplayName (IShellFolder2 * iface,
DWORD
len
;
TRACE
(
"(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)
\n
"
,
This
,
hwndOwner
,
pbc
Reserved
,
lpszDisplayName
,
debugstr_w
(
lpszDisplayName
),
pchEaten
,
ppidl
,
pdwAttributes
);
This
,
hwndOwner
,
pbc
,
lpszDisplayName
,
debugstr_w
(
lpszDisplayName
),
pchEaten
,
ppidl
,
pdwAttributes
);
if
(
!
lpszDisplayName
||
!
ppidl
)
return
E_INVALIDARG
;
...
...
@@ -356,7 +356,7 @@ IShellFolder_fnParseDisplayName (IShellFolder2 * iface,
if
(
pidlTemp
)
{
if
(
szNext
&&
*
szNext
)
{
/* try to analyse the next element */
hr
=
SHELL32_ParseNextElement
(
hwndOwner
,
iface
,
&
pidlTemp
,
(
LPOLESTR
)
szNext
,
pchEaten
,
pdwAttributes
);
hr
=
SHELL32_ParseNextElement
(
iface
,
hwndOwner
,
pbc
,
&
pidlTemp
,
(
LPOLESTR
)
szNext
,
pchEaten
,
pdwAttributes
);
}
else
{
/* it's the last element */
if
(
pdwAttributes
&&
*
pdwAttributes
)
{
...
...
dlls/shell32/shfldr_mycomp.c
View file @
2407c138
...
...
@@ -189,7 +189,7 @@ static ULONG WINAPI ISF_MyComputer_fnRelease (IShellFolder2 * iface)
static
HRESULT
WINAPI
ISF_MyComputer_fnParseDisplayName
(
IShellFolder2
*
iface
,
HWND
hwndOwner
,
LPBC
pbc
Reserved
,
LPBC
pbc
,
LPOLESTR
lpszDisplayName
,
DWORD
*
pchEaten
,
LPITEMIDLIST
*
ppidl
,
DWORD
*
pdwAttributes
)
{
...
...
@@ -202,7 +202,7 @@ ISF_MyComputer_fnParseDisplayName (IShellFolder2 * iface,
LPITEMIDLIST
pidlTemp
;
TRACE
(
"(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)
\n
"
,
This
,
hwndOwner
,
pbc
Reserved
,
lpszDisplayName
,
debugstr_w
(
lpszDisplayName
),
pchEaten
,
ppidl
,
pdwAttributes
);
This
,
hwndOwner
,
pbc
,
lpszDisplayName
,
debugstr_w
(
lpszDisplayName
),
pchEaten
,
ppidl
,
pdwAttributes
);
*
ppidl
=
0
;
if
(
pchEaten
)
...
...
@@ -215,7 +215,7 @@ ISF_MyComputer_fnParseDisplayName (IShellFolder2 * iface,
pidlTemp
=
_ILCreateDrive
(
szTempA
);
if
(
szNext
&&
*
szNext
)
{
hr
=
SHELL32_ParseNextElement
(
hwndOwner
,
iface
,
&
pidlTemp
,
(
LPOLESTR
)
szNext
,
pchEaten
,
pdwAttributes
);
hr
=
SHELL32_ParseNextElement
(
iface
,
hwndOwner
,
pbc
,
&
pidlTemp
,
(
LPOLESTR
)
szNext
,
pchEaten
,
pdwAttributes
);
}
else
{
if
(
pdwAttributes
&&
*
pdwAttributes
)
{
SHELL32_GetItemAttributes
(
_IShellFolder_
(
This
),
pidlTemp
,
pdwAttributes
);
...
...
dlls/shell32/shlfolder.c
View file @
2407c138
...
...
@@ -105,8 +105,7 @@ LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut)
return
pszTail
;
}
HRESULT
SHELL32_ParseNextElement
(
HWND
hwndOwner
,
IShellFolder2
*
psf
,
HRESULT
SHELL32_ParseNextElement
(
IShellFolder2
*
psf
,
HWND
hwndOwner
,
LPBC
pbc
,
LPITEMIDLIST
*
pidlInOut
,
LPOLESTR
szNext
,
DWORD
*
pEaten
,
DWORD
*
pdwAttributes
)
{
HRESULT
hr
=
E_OUTOFMEMORY
;
...
...
@@ -114,13 +113,13 @@ HRESULT SHELL32_ParseNextElement (HWND hwndOwner,
pidlTemp
=
NULL
;
IShellFolder
*
psfChild
;
TRACE
(
"(%p, %p, %
s)
\n
"
,
psf
,
pidlInOut
?
*
pidlInOut
:
NULL
,
debugstr_w
(
szNext
));
TRACE
(
"(%p, %p, %
p, %s)
\n
"
,
psf
,
pbc
,
pidlInOut
?
*
pidlInOut
:
NULL
,
debugstr_w
(
szNext
));
/* get the shellfolder for the child pidl and let it analyse further */
hr
=
IShellFolder_BindToObject
(
psf
,
*
pidlInOut
,
NULL
,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfChild
);
hr
=
IShellFolder_BindToObject
(
psf
,
*
pidlInOut
,
pbc
,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfChild
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IShellFolder_ParseDisplayName
(
psfChild
,
hwndOwner
,
NULL
,
szNext
,
pEaten
,
&
pidlOut
,
pdwAttributes
);
hr
=
IShellFolder_ParseDisplayName
(
psfChild
,
hwndOwner
,
pbc
,
szNext
,
pEaten
,
&
pidlOut
,
pdwAttributes
);
IShellFolder_Release
(
psfChild
);
pidlTemp
=
ILCombine
(
*
pidlInOut
,
pidlOut
);
...
...
@@ -390,7 +389,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWO
}
/***********************************************************************
* SHELL32_
GetItemAttribute
s
* SHELL32_
CompareID
s
*/
HRESULT
SHELL32_CompareIDs
(
IShellFolder
*
iface
,
LPARAM
lParam
,
LPCITEMIDLIST
pidl1
,
LPCITEMIDLIST
pidl2
)
{
...
...
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