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
554357ec
Commit
554357ec
authored
Aug 11, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Aug 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement SHLoadIndirectString.
parent
b5940f72
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
0 deletions
+56
-0
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+1
-0
string.c
dlls/shlwapi/string.c
+55
-0
No files found.
dlls/shlwapi/shlwapi.spec
View file @
554357ec
...
@@ -699,6 +699,7 @@
...
@@ -699,6 +699,7 @@
@ stdcall SHGetValueA ( long str str ptr ptr ptr )
@ stdcall SHGetValueA ( long str str ptr ptr ptr )
@ stdcall SHGetValueW ( long wstr wstr ptr ptr ptr )
@ stdcall SHGetValueW ( long wstr wstr ptr ptr ptr )
@ stdcall SHIsLowMemoryMachine(long)
@ stdcall SHIsLowMemoryMachine(long)
@ stdcall SHLoadIndirectString(wstr ptr long ptr)
@ stdcall SHOpenRegStream2A(long str str long)
@ stdcall SHOpenRegStream2A(long str str long)
@ stdcall SHOpenRegStream2W(long wstr str long)
@ stdcall SHOpenRegStream2W(long wstr str long)
@ stdcall SHOpenRegStreamA(long str str long)
@ stdcall SHOpenRegStreamA(long str str long)
...
...
dlls/shlwapi/string.c
View file @
554357ec
...
@@ -2698,3 +2698,58 @@ BOOL WINAPI DoesStringRoundTripW(LPCWSTR lpSrcStr, LPSTR lpDst, INT iLen)
...
@@ -2698,3 +2698,58 @@ BOOL WINAPI DoesStringRoundTripW(LPCWSTR lpSrcStr, LPSTR lpDst, INT iLen)
SHAnsiToUnicode
(
lpDst
,
szBuff
,
MAX_PATH
);
SHAnsiToUnicode
(
lpDst
,
szBuff
,
MAX_PATH
);
return
!
strcmpW
(
lpSrcStr
,
szBuff
);
return
!
strcmpW
(
lpSrcStr
,
szBuff
);
}
}
/*************************************************************************
* SHLoadIndirectString [SHLWAPI.@]
*
* If passed a string that begins with a '@' extract the string from the
* appropriate resource, otherwise do a straight copy.
*
*/
HRESULT
WINAPI
SHLoadIndirectString
(
LPCWSTR
src
,
LPWSTR
dst
,
UINT
dst_len
,
void
**
reserved
)
{
WCHAR
*
dllname
=
NULL
;
HMODULE
hmod
=
NULL
;
HRESULT
hr
=
E_FAIL
;
TRACE
(
"(%s %p %08x %p)
\n
"
,
debugstr_w
(
src
),
dst
,
dst_len
,
reserved
);
if
(
src
[
0
]
==
'@'
)
{
WCHAR
*
index_str
;
int
index
;
dst
[
0
]
=
0
;
dllname
=
StrDupW
(
src
+
1
);
index_str
=
strchrW
(
dllname
,
','
);
if
(
!
index_str
)
goto
end
;
*
index_str
=
0
;
index_str
++
;
index
=
atoiW
(
index_str
);
hmod
=
LoadLibraryW
(
dllname
);
if
(
!
hmod
)
goto
end
;
if
(
index
<
0
)
{
if
(
LoadStringW
(
hmod
,
-
index
,
dst
,
dst_len
))
hr
=
S_OK
;
}
else
FIXME
(
"can't handle non-negative indicies (%d)
\n
"
,
index
);
}
else
{
if
(
dst
!=
src
)
lstrcpynW
(
dst
,
src
,
dst_len
);
hr
=
S_OK
;
}
TRACE
(
"returing %s
\n
"
,
debugstr_w
(
dst
));
end:
if
(
hmod
)
FreeLibrary
(
hmod
);
HeapFree
(
GetProcessHeap
(),
0
,
dllname
);
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