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
6f3d5805
Commit
6f3d5805
authored
Jul 28, 1999
by
Juergen Schmied
Committed by
Alexandre Julliard
Jul 28, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StrRetToStrN[A|W|AW] new independent unicode/ascii/export functions.
parent
a34aef10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
14 deletions
+47
-14
shell32.spec
dlls/shell32/shell32.spec
+1
-1
shellord.c
dlls/shell32/shellord.c
+46
-13
No files found.
dlls/shell32/shell32.spec
View file @
6f3d5805
...
...
@@ -101,7 +101,7 @@ init Shell32LibMain
93 stub Win32CreateDirectory
94 stub Win32RemoveDirectory
95 stdcall SHLogILFromFSIL (ptr) SHLogILFromFSIL
96 stdcall StrRetToStrN (long long long long) StrRetToStrN
96 stdcall StrRetToStrN (long long long long) StrRetToStrN
AW
97 stdcall SHWaitForFileToOpen (long long long) SHWaitForFileToOpen
98 stdcall SHGetRealIDL (long long long) SHGetRealIDL
99 stdcall SetAppStartingCursor (long long) SetAppStartingCursor
...
...
dlls/shell32/shellord.c
View file @
6f3d5805
...
...
@@ -909,30 +909,57 @@ HRESULT WINAPI IsUserAdmin(void)
* NOTES
* the pidl is for STRRET OFFSET
*/
HRESULT
WINAPI
StrRetToStrN
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
LPITEMIDLIST
pidl
)
{
TRACE
(
"dest=0x%p len=0x%lx strret=0x%p pidl=%p stub
\n
"
,
dest
,
len
,
src
,
pidl
);
HRESULT
WINAPI
StrRetToStrNA
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
LPITEMIDLIST
pidl
)
{
TRACE
(
"dest=0x%p len=0x%lx strret=0x%p pidl=%p stub
\n
"
,
dest
,
len
,
src
,
pidl
);
switch
(
src
->
uType
)
{
case
STRRET_WSTR
:
{
case
STRRET_WSTR
:
WideCharToMultiByte
(
CP_ACP
,
0
,
src
->
u
.
pOleStr
,
-
1
,
(
LPSTR
)
dest
,
len
,
NULL
,
NULL
);
SHFree
(
src
->
u
.
pOleStr
);
break
;
case
STRRET_CSTRA
:
if
(
VERSION_OsIsUnicode
())
lstrcpynAtoW
((
LPWSTR
)
dest
,
src
->
u
.
cStr
,
len
);
else
lstrcpynA
((
LPSTR
)
dest
,
src
->
u
.
cStr
,
len
);
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
,
LPITEMIDLIST
pidl
)
{
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
);
break
;
case
STRRET_CSTRA
:
lstrcpynAtoW
((
LPWSTR
)
dest
,
src
->
u
.
cStr
,
len
);
break
;
case
STRRET_OFFSETA
:
if
(
pidl
)
{
if
(
VERSION_OsIsUnicode
())
lstrcpynAtoW
((
LPWSTR
)
dest
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
u
.
uOffset
,
len
);
else
lstrcpynA
((
LPSTR
)
dest
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
u
.
uOffset
,
len
);
break
;
{
lstrcpynAtoW
((
LPWSTR
)
dest
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
u
.
uOffset
,
len
);
}
break
;
default:
FIXME
(
"unknown type!
\n
"
);
...
...
@@ -941,7 +968,13 @@ HRESULT WINAPI StrRetToStrN (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST
}
return
(
FALSE
);
}
return
(
TRUE
);
return
S_OK
;
}
HRESULT
WINAPI
StrRetToStrNAW
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
LPITEMIDLIST
pidl
)
{
if
(
VERSION_OsIsUnicode
())
return
StrRetToStrNW
(
dest
,
len
,
src
,
pidl
);
return
StrRetToStrNA
(
dest
,
len
,
src
,
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