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
50c1e46d
Commit
50c1e46d
authored
Jan 16, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell: Convert SHELL32_GetDisplayNameOfChild to unicode.
parent
8cfa507f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
14 deletions
+51
-14
cpanelfolder.c
dlls/shell32/cpanelfolder.c
+8
-5
shfldr.h
dlls/shell32/shfldr.h
+1
-1
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+16
-2
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+7
-1
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+16
-2
shlfolder.c
dlls/shell32/shlfolder.c
+3
-3
No files found.
dlls/shell32/cpanelfolder.c
View file @
50c1e46d
...
...
@@ -652,7 +652,8 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface,
{
ICPanelImpl
*
This
=
(
ICPanelImpl
*
)
iface
;
CHAR
szPath
[
MAX_PATH
*
2
];
CHAR
szPath
[
MAX_PATH
];
WCHAR
wszPath
[
MAX_PATH
+
1
];
/* +1 for potential backslash */
PIDLCPanelStruct
*
pcpanel
;
*
szPath
=
'\0'
;
...
...
@@ -676,7 +677,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface,
BOOL
bSimplePidl
=
_ILIsPidlSimple
(
pidl
);
if
(
bSimplePidl
)
{
_ILSimpleGetText
(
pidl
,
szPath
,
MAX_PATH
);
/* append my own path */
_ILSimpleGetText
W
(
pidl
,
w
szPath
,
MAX_PATH
);
/* append my own path */
}
else
{
FIXME
(
"special pidl
\n
"
);
}
...
...
@@ -684,12 +685,14 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 * iface,
if
((
dwFlags
&
SHGDN_FORPARSING
)
&&
!
bSimplePidl
)
{
/* go deeper if needed */
int
len
=
0
;
PathAddBackslash
A
(
szPath
);
/*FIXME*/
len
=
lstrlen
A
(
szPath
);
PathAddBackslash
W
(
wszPath
);
len
=
lstrlen
W
(
w
szPath
);
if
(
!
SUCCEEDED
(
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
|
SHGDN_INFOLDER
,
szPath
+
len
,
MAX_PATH
-
len
)))
(
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
|
SHGDN_INFOLDER
,
wszPath
+
len
,
MAX_PATH
+
1
-
len
)))
return
E_OUTOFMEMORY
;
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
wszPath
,
-
1
,
szPath
,
MAX_PATH
,
NULL
,
NULL
))
wszPath
[
0
]
=
'\0'
;
}
}
...
...
dlls/shell32/shfldr.h
View file @
50c1e46d
...
...
@@ -39,7 +39,7 @@ LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut);
HRESULT
SHELL32_ParseNextElement
(
IShellFolder2
*
psf
,
HWND
hwndOwner
,
LPBC
pbc
,
LPITEMIDLIST
*
pidlInOut
,
LPOLESTR
szNext
,
DWORD
*
pEaten
,
DWORD
*
pdwAttributes
);
HRESULT
SHELL32_GetItemAttributes
(
IShellFolder
*
psf
,
LPCITEMIDLIST
pidl
,
LPDWORD
pdwAttributes
);
HRESULT
SHELL32_GetDisplayNameOfChild
(
IShellFolder2
*
psf
,
LPCITEMIDLIST
pidl
,
DWORD
dwFlags
,
LPSTR
szOut
,
HRESULT
SHELL32_GetDisplayNameOfChild
(
IShellFolder2
*
psf
,
LPCITEMIDLIST
pidl
,
DWORD
dwFlags
,
LP
W
STR
szOut
,
DWORD
dwOutLen
);
HRESULT
SHELL32_BindToChild
(
LPCITEMIDLIST
pidlRoot
,
...
...
dlls/shell32/shfldr_desktop.c
View file @
50c1e46d
...
...
@@ -562,6 +562,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
HRESULT
hr
=
S_OK
;
WCHAR
wszPath
[
MAX_PATH
];
TRACE
(
"(%p)->(pidl=%p,0x%08lx,%p)
\n
"
,
This
,
pidl
,
dwFlags
,
strRet
);
pdump
(
pidl
);
...
...
@@ -645,13 +646,20 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
if
((
GET_SHGDN_RELATION
(
dwFlags
)
==
SHGDN_NORMAL
)
&&
bWantsForParsing
)
{
WCHAR
wszPath
[
MAX_PATH
];
/*
* we need the filesystem path to the destination folder.
* Only the folder itself can know it
*/
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
strRet
->
u
.
cStr
,
wszPath
,
MAX_PATH
);
if
(
SUCCEEDED
(
hr
))
{
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
wszPath
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
NULL
,
NULL
))
wszPath
[
0
]
=
'\0'
;
}
}
else
{
...
...
@@ -690,7 +698,13 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
{
/* a complex pidl, let the subfolder do the work */
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
strRet
->
u
.
cStr
,
MAX_PATH
);
wszPath
,
MAX_PATH
);
if
(
SUCCEEDED
(
hr
))
{
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
wszPath
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
NULL
,
NULL
))
wszPath
[
0
]
=
'\0'
;
}
}
TRACE
(
"-- (%p)->(%s,0x%08lx)
\n
"
,
This
,
...
...
dlls/shell32/shfldr_fs.c
View file @
50c1e46d
...
...
@@ -816,7 +816,13 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl,
_ILSimpleGetText
(
pidl
,
strRet
->
u
.
cStr
+
len
,
MAX_PATH
-
len
);
if
(
!
_ILIsFolder
(
pidl
))
SHELL_FS_ProcessDisplayFilename
(
strRet
->
u
.
cStr
,
dwFlags
);
}
else
{
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
strRet
->
u
.
cStr
,
MAX_PATH
);
WCHAR
wszPath
[
MAX_PATH
];
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
wszPath
,
MAX_PATH
);
if
(
SUCCEEDED
(
hr
))
{
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
wszPath
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
NULL
,
NULL
))
wszPath
[
0
]
=
'\0'
;
}
}
TRACE
(
"-- (%p)->(%s)
\n
"
,
This
,
strRet
->
u
.
cStr
);
...
...
dlls/shell32/shfldr_mycomp.c
View file @
50c1e46d
...
...
@@ -617,12 +617,19 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
if
((
GET_SHGDN_RELATION
(
dwFlags
)
==
SHGDN_NORMAL
)
&&
bWantsForParsing
)
{
WCHAR
wszPath
[
MAX_PATH
];
/*
* We need the filesystem path to the destination folder
* Only the folder itself can know it
*/
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
szPath
,
MAX_PATH
);
dwFlags
,
wszPath
,
MAX_PATH
);
if
(
SUCCEEDED
(
hr
))
{
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
wszPath
,
-
1
,
szPath
,
MAX_PATH
,
NULL
,
NULL
))
wszPath
[
0
]
=
'\0'
;
}
}
else
{
...
...
@@ -677,9 +684,16 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
}
else
{
WCHAR
wszPath
[
MAX_PATH
];
/* Complex pidl. Let the child folder do the work */
strRet
->
uType
=
STRRET_CSTR
;
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
szPath
,
MAX_PATH
);
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
wszPath
,
MAX_PATH
);
if
(
SUCCEEDED
(
hr
))
{
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
wszPath
,
-
1
,
szPath
,
MAX_PATH
,
NULL
,
NULL
))
wszPath
[
0
]
=
'\0'
;
}
}
if
(
SUCCEEDED
(
hr
))
...
...
dlls/shell32/shlfolder.c
View file @
50c1e46d
...
...
@@ -331,7 +331,7 @@ HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot,
* virtual folders with the registry key WantsFORPARSING set.
*/
HRESULT
SHELL32_GetDisplayNameOfChild
(
IShellFolder2
*
psf
,
LPCITEMIDLIST
pidl
,
DWORD
dwFlags
,
LPSTR
szOut
,
DWORD
dwOutLen
)
LPCITEMIDLIST
pidl
,
DWORD
dwFlags
,
LP
W
STR
szOut
,
DWORD
dwOutLen
)
{
LPITEMIDLIST
pidlFirst
;
HRESULT
hr
=
E_INVALIDARG
;
...
...
@@ -350,7 +350,7 @@ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf,
hr
=
IShellFolder_GetDisplayNameOf
(
psfChild
,
pidlNext
,
dwFlags
,
&
strTemp
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
StrRetToStrN
A
(
szOut
,
dwOutLen
,
&
strTemp
,
pidlNext
);
hr
=
StrRetToStrN
W
(
szOut
,
dwOutLen
,
&
strTemp
,
pidlNext
);
}
IShellFolder_Release
(
psfChild
);
}
...
...
@@ -358,7 +358,7 @@ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf,
}
else
hr
=
E_OUTOFMEMORY
;
TRACE
(
"-- ret=0x%08lx %s
\n
"
,
hr
,
szOut
);
TRACE
(
"-- ret=0x%08lx %s
\n
"
,
hr
,
debugstr_w
(
szOut
)
);
return
hr
;
}
...
...
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