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
6c4c4e35
Commit
6c4c4e35
authored
Jun 19, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jun 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Convert ISF_Desktop_fnGetDisplayNameOf to Unicode.
parent
db8169b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
39 deletions
+25
-39
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+25
-39
No files found.
dlls/shell32/shfldr_desktop.c
View file @
6c4c4e35
...
...
@@ -570,33 +570,13 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
if
(
!
strRet
)
return
E_INVALIDARG
;
strRet
->
uType
=
STRRET_CSTR
;
if
(
_ILIsDesktop
(
pidl
))
{
if
((
GET_SHGDN_RELATION
(
dwFlags
)
==
SHGDN_NORMAL
)
&&
(
GET_SHGDN_FOR
(
dwFlags
)
&
SHGDN_FORPARSING
))
{
BOOL
defCharUsed
;
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
sPathTarget
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
NULL
,
&
defCharUsed
);
if
(
defCharUsed
)
{
strRet
->
u
.
pOleStr
=
SHAlloc
((
lstrlenW
(
This
->
sPathTarget
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
strRet
->
u
.
pOleStr
)
hr
=
E_OUTOFMEMORY
;
else
{
strcpyW
(
strRet
->
u
.
pOleStr
,
This
->
sPathTarget
);
strRet
->
uType
=
STRRET_WSTR
;
}
}
}
strcpyW
(
wszPath
,
This
->
sPathTarget
);
else
{
HCR_GetClassNameA
(
&
CLSID_ShellDesktop
,
strRet
->
u
.
cStr
,
MAX_PATH
);
}
HCR_GetClassNameW
(
&
CLSID_ShellDesktop
,
wszPath
,
MAX_PATH
);
}
else
if
(
_ILIsPidlSimple
(
pidl
))
{
...
...
@@ -646,7 +626,6 @@ 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
...
...
@@ -654,24 +633,19 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
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'
;
}
}
else
{
/* parsing name like ::{...} */
lstrcpyA
(
strRet
->
u
.
cStr
,
"::"
);
SHELL32_GUIDToStringA
(
clsid
,
&
strRet
->
u
.
cStr
[
2
]);
wszPath
[
0
]
=
':'
;
wszPath
[
1
]
=
':'
;
SHELL32_GUIDToStringW
(
clsid
,
&
wszPath
[
2
]);
}
}
else
{
/* user friendly name */
HCR_GetClassName
A
(
clsid
,
strRet
->
u
.
cStr
,
MAX_PATH
);
HCR_GetClassName
W
(
clsid
,
wszPath
,
MAX_PATH
);
}
}
else
...
...
@@ -691,9 +665,6 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
if
(
!
_ILIsFolder
(
pidl
))
SHELL_FS_ProcessDisplayFilename
(
wszPath
,
dwFlags
);
WideCharToMultiByte
(
CP_ACP
,
0
,
wszPath
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
NULL
,
NULL
);
}
}
else
...
...
@@ -701,11 +672,26 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
/* a complex pidl, let the subfolder do the work */
hr
=
SHELL32_GetDisplayNameOfChild
(
iface
,
pidl
,
dwFlags
,
wszPath
,
MAX_PATH
);
if
(
SUCCEEDED
(
hr
))
}
if
(
SUCCEEDED
(
hr
))
{
BOOL
defCharUsed
;
strRet
->
uType
=
STRRET_CSTR
;
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
wszPath
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
NULL
,
&
defCharUsed
))
strRet
->
u
.
cStr
[
0
]
=
'\0'
;
if
(
defCharUsed
)
{
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
wszPath
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
NULL
,
NULL
))
wszPath
[
0
]
=
'\0'
;
strRet
->
u
.
pOleStr
=
SHAlloc
((
lstrlenW
(
This
->
sPathTarget
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
strRet
->
u
.
pOleStr
)
hr
=
E_OUTOFMEMORY
;
else
{
strcpyW
(
strRet
->
u
.
pOleStr
,
This
->
sPathTarget
);
strRet
->
uType
=
STRRET_WSTR
;
}
}
}
...
...
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