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
e100866c
Commit
e100866c
authored
Sep 07, 2001
by
Guy Albertelli
Committed by
Alexandre Julliard
Sep 07, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace calls to StrRetToBuf{A|W} with duplicate code to eliminate
problems between native and built-in DLLs.
parent
6bf2abfa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
3 deletions
+59
-3
shellstring.c
dlls/shell32/shellstring.c
+59
-3
No files found.
dlls/shell32/shellstring.c
View file @
e100866c
...
...
@@ -28,12 +28,68 @@ DEFAULT_DEBUG_CHANNEL(shell);
*/
HRESULT
WINAPI
StrRetToStrNA
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
)
{
return
StrRetToBufA
(
src
,
pidl
,
dest
,
len
);
TRACE
(
"dest=0x%p len=0x%lx strret=0x%p pidl=%p stub
\n
"
,
dest
,
len
,
src
,
pidl
);
switch
(
src
->
uType
)
{
case
STRRET_WSTR
:
WideCharToMultiByte
(
CP_ACP
,
0
,
src
->
u
.
pOleStr
,
-
1
,
(
LPSTR
)
dest
,
len
,
NULL
,
NULL
);
/* SHFree(src->u.pOleStr); FIXME: is this right? */
break
;
case
STRRET_CSTRA
:
lstrcpynA
((
LPSTR
)
dest
,
src
->
u
.
cStr
,
len
);
break
;
case
STRRET_OFFSETA
:
lstrcpynA
((
LPSTR
)
dest
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
u
.
uOffset
,
len
);
break
;
default:
FIXME
(
"unknown type!
\n
"
);
if
(
len
)
{
*
(
LPSTR
)
dest
=
'\0'
;
}
return
(
FALSE
);
}
return
S_OK
;
}
HRESULT
WINAPI
StrRetToStrNW
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
)
HRESULT
WINAPI
StrRetToStrNW
(
LPVOID
dest
1
,
DWORD
len
,
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
)
{
return
StrRetToBufW
(
src
,
pidl
,
dest
,
len
);
LPWSTR
dest
=
(
LPWSTR
)
dest1
;
TRACE
(
"dest=0x%p len=0x%lx strret=0x%p pidl=%p stub
\n
"
,
dest
,
len
,
src
,
pidl
);
switch
(
src
->
uType
)
{
case
STRRET_WSTR
:
lstrcpynW
((
LPWSTR
)
dest
,
src
->
u
.
pOleStr
,
len
);
/* SHFree(src->u.pOleStr); FIXME: is this right? */
break
;
case
STRRET_CSTRA
:
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
src
->
u
.
cStr
,
-
1
,
dest
,
len
)
&&
len
)
dest
[
len
-
1
]
=
0
;
break
;
case
STRRET_OFFSETA
:
if
(
pidl
)
{
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
u
.
uOffset
,
-
1
,
dest
,
len
)
&&
len
)
dest
[
len
-
1
]
=
0
;
}
break
;
default:
FIXME
(
"unknown type!
\n
"
);
if
(
len
)
{
*
(
LPSTR
)
dest
=
'\0'
;
}
return
(
FALSE
);
}
return
S_OK
;
}
HRESULT
WINAPI
StrRetToStrNAW
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
const
ITEMIDLIST
*
pidl
)
...
...
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