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
d361fa79
Commit
d361fa79
authored
May 24, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Add SHLoadIndirectString().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
88ffcd5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
1 deletion
+49
-1
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+1
-1
string.c
dlls/kernelbase/string.c
+48
-0
No files found.
dlls/kernelbase/kernelbase.spec
View file @
d361fa79
...
...
@@ -1354,7 +1354,7 @@
# @ stub SHCoCreateInstance
@ stdcall SHExpandEnvironmentStringsA(str ptr long) kernel32.ExpandEnvironmentStringsA
@ stdcall SHExpandEnvironmentStringsW(wstr ptr long) kernel32.ExpandEnvironmentStringsW
@ stdcall SHLoadIndirectString(wstr ptr long ptr)
shlwapi.SHLoadIndirectString
@ stdcall SHLoadIndirectString(wstr ptr long ptr)
# @ stub SHLoadIndirectStringInternal
@ stdcall SHRegCloseUSKey(ptr) shlwapi.SHRegCloseUSKey
@ stdcall SHRegCreateUSKeyA(str long long ptr long) shlwapi.SHRegCreateUSKeyA
...
...
dlls/kernelbase/string.c
View file @
d361fa79
...
...
@@ -1426,3 +1426,51 @@ DWORD WINAPI SHTruncateString(char *str, DWORD size)
return
size
;
}
HRESULT
WINAPI
SHLoadIndirectString
(
const
WCHAR
*
src
,
WCHAR
*
dst
,
UINT
dst_len
,
void
**
reserved
)
{
WCHAR
*
dllname
=
NULL
;
HMODULE
hmod
=
NULL
;
HRESULT
hr
=
E_FAIL
;
TRACE
(
"%s, %p, %#x, %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 indices (%d)
\n
"
,
index
);
}
else
{
if
(
dst
!=
src
)
lstrcpynW
(
dst
,
src
,
dst_len
);
hr
=
S_OK
;
}
TRACE
(
"returning %s
\n
"
,
debugstr_w
(
dst
));
end:
if
(
hmod
)
FreeLibrary
(
hmod
);
LocalFree
(
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