Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8c9f593e
Commit
8c9f593e
authored
Jun 20, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shcore: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aa79882a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
Makefile.in
dlls/shcore/Makefile.in
+2
-0
main.c
dlls/shcore/main.c
+8
-10
No files found.
dlls/shcore/Makefile.in
View file @
8c9f593e
MODULE
=
shcore.dll
IMPORTS
=
user32 gdi32 ole32 advapi32
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
main.c
dlls/shcore/main.c
View file @
8c9f593e
...
...
@@ -17,7 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#define COBJMACROS
...
...
@@ -33,7 +32,6 @@
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
shcore
);
...
...
@@ -389,12 +387,12 @@ WCHAR** WINAPI CommandLineToArgvW(const WCHAR *cmdline, int *numargs)
* with it. This way the caller can make a single LocalFree() call to free
* both, as per MSDN.
*/
argv
=
LocalAlloc
(
LMEM_FIXED
,
(
argc
+
1
)
*
sizeof
(
WCHAR
*
)
+
(
strlenW
(
cmdline
)
+
1
)
*
sizeof
(
WCHAR
));
argv
=
LocalAlloc
(
LMEM_FIXED
,
(
argc
+
1
)
*
sizeof
(
WCHAR
*
)
+
(
l
strlenW
(
cmdline
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
argv
)
return
NULL
;
/* --- Then split and copy the arguments */
argv
[
0
]
=
d
=
strcpyW
((
WCHAR
*
)(
argv
+
argc
+
1
),
cmdline
);
argv
[
0
]
=
d
=
l
strcpyW
((
WCHAR
*
)(
argv
+
argc
+
1
),
cmdline
);
argc
=
1
;
/* The first argument, the executable path, follows special rules */
if
(
*
d
==
'"'
)
...
...
@@ -1005,7 +1003,7 @@ static HRESULT WINAPI filestream_Stat(IStream *iface, STATSTG *statstg, DWORD fl
statstg
->
pwcsName
=
NULL
;
else
{
int
len
=
strlenW
(
stream
->
u
.
file
.
path
);
int
len
=
l
strlenW
(
stream
->
u
.
file
.
path
);
if
((
statstg
->
pwcsName
=
CoTaskMemAlloc
((
len
+
1
)
*
sizeof
(
WCHAR
))))
memcpy
(
statstg
->
pwcsName
,
stream
->
u
.
file
.
path
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
}
...
...
@@ -1116,7 +1114,7 @@ HRESULT WINAPI SHCreateStreamOnFileEx(const WCHAR *path, DWORD mode, DWORD attri
stream
->
u
.
file
.
handle
=
hFile
;
stream
->
u
.
file
.
mode
=
mode
;
len
=
strlenW
(
path
);
len
=
l
strlenW
(
path
);
stream
->
u
.
file
.
path
=
heap_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
stream
->
u
.
file
.
path
,
path
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
...
...
@@ -1651,7 +1649,7 @@ HRESULT WINAPI SHStrDupW(const WCHAR *src, WCHAR **dest)
if
(
!
src
)
return
E_INVALIDARG
;
len
=
(
strlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
);
len
=
(
l
strlenW
(
src
)
+
1
)
*
sizeof
(
WCHAR
);
*
dest
=
CoTaskMemAlloc
(
len
);
if
(
!*
dest
)
return
E_OUTOFMEMORY
;
...
...
@@ -1741,7 +1739,7 @@ DWORD WINAPI SHUnicodeToUnicode(const WCHAR *src, WCHAR *dest, int dest_len)
return
0
;
lstrcpynW
(
dest
,
src
,
dest_len
);
ret
=
strlenW
(
dest
);
ret
=
l
strlenW
(
dest
);
return
src
[
ret
]
?
0
:
ret
+
1
;
}
...
...
@@ -2077,7 +2075,7 @@ DWORD WINAPI SHQueryValueExW(HKEY hkey, const WCHAR *name, DWORD *reserved, DWOR
}
else
{
length
=
(
strlenW
(
buff
)
+
1
)
*
sizeof
(
WCHAR
);
length
=
(
l
strlenW
(
buff
)
+
1
)
*
sizeof
(
WCHAR
);
value
=
heap_alloc
(
length
);
memcpy
(
value
,
buff
,
length
);
length
=
ExpandEnvironmentStringsW
(
value
,
buff
,
*
buff_len
/
sizeof
(
WCHAR
));
...
...
@@ -2208,7 +2206,7 @@ int WINAPI SHRegGetIntW(HKEY hkey, const WCHAR *value, int default_value)
return
default_value
;
if
(
*
buff
>=
'0'
&&
*
buff
<=
'9'
)
return
atoiW
(
buff
);
return
wcstol
(
buff
,
NULL
,
10
);
return
default_value
;
}
...
...
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