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
c69eba92
Commit
c69eba92
authored
Oct 03, 2018
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp140: Added _Winerror_message implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c3445197
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
msvcp140.spec
dlls/msvcp140/msvcp140.spec
+2
-2
msvcp140.c
dlls/msvcp140/tests/msvcp140.c
+23
-0
misc.c
dlls/msvcp90/misc.c
+12
-0
No files found.
dlls/msvcp140/msvcp140.spec
View file @
c69eba92
...
...
@@ -1670,8 +1670,8 @@
@ stub -arch=i386 ?_W_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ
@ stub -arch=win64 ?_W_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ
@ stub ?_Winerror_map@std@@YAHH@Z
@
stub -arch=win32 ?_Winerror_message@std@@YAKKPADK@Z
@
stub -arch=win64 ?_Winerror_message@std@@YAKKPEADK@Z
@
cdecl -arch=win32 ?_Winerror_message@std@@YAKKPADK@Z(long ptr long) _Winerror_message
@
cdecl -arch=win64 ?_Winerror_message@std@@YAKKPEADK@Z(long ptr long) _Winerror_message
@ stub ?_XGetLastError@std@@YAXXZ
@ stub ?_XLgamma@std@@YAMM@Z
@ stub ?_XLgamma@std@@YANN@Z
...
...
dlls/msvcp140/tests/msvcp140.c
View file @
c69eba92
...
...
@@ -191,6 +191,7 @@ static WCHAR* (__cdecl *p_Temp_get)(WCHAR *);
static
int
(
__cdecl
*
p_To_byte
)(
const
WCHAR
*
src
,
char
*
dst
);
static
int
(
__cdecl
*
p_To_wide
)(
const
char
*
src
,
WCHAR
*
dst
);
static
int
(
__cdecl
*
p_Unlink
)(
WCHAR
const
*
);
static
ULONG
(
__cdecl
*
p__Winerror_message
)(
ULONG
,
char
*
,
ULONG
);
static
BOOLEAN
(
WINAPI
*
pCreateSymbolicLinkW
)(
const
WCHAR
*
,
const
WCHAR
*
,
DWORD
);
...
...
@@ -227,6 +228,7 @@ static BOOL init(void)
SET
(
p__Schedule_chore
,
"?_Schedule_chore@details@Concurrency@@YAHPEAU_Threadpool_chore@12@@Z"
);
SET
(
p__Reschedule_chore
,
"?_Reschedule_chore@details@Concurrency@@YAHPEBU_Threadpool_chore@12@@Z"
);
SET
(
p__Release_chore
,
"?_Release_chore@details@Concurrency@@YAXPEAU_Threadpool_chore@12@@Z"
);
SET
(
p__Winerror_message
,
"?_Winerror_message@std@@YAKKPEADK@Z"
);
}
else
{
#ifdef __arm__
SET
(
p_task_continuation_context_ctor
,
"??0task_continuation_context@Concurrency@@AAA@XZ"
);
...
...
@@ -256,6 +258,7 @@ static BOOL init(void)
SET
(
p__Schedule_chore
,
"?_Schedule_chore@details@Concurrency@@YAHPAU_Threadpool_chore@12@@Z"
);
SET
(
p__Reschedule_chore
,
"?_Reschedule_chore@details@Concurrency@@YAHPBU_Threadpool_chore@12@@Z"
);
SET
(
p__Release_chore
,
"?_Release_chore@details@Concurrency@@YAXPAU_Threadpool_chore@12@@Z"
);
SET
(
p__Winerror_message
,
"?_Winerror_message@std@@YAKKPADK@Z"
);
}
SET
(
p_Close_dir
,
"_Close_dir"
);
...
...
@@ -1281,6 +1284,25 @@ static void test_Last_write_time(void)
ok
(
SetCurrentDirectoryW
(
origin_path
),
"SetCurrentDirectoryW to origin_path failed
\n
"
);
}
static
void
test__Winerror_message
(
void
)
{
char
buf
[
256
],
buf_fm
[
256
];
ULONG
ret
,
ret_fm
;
ret_fm
=
FormatMessageA
(
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
NULL
,
0
,
0
,
buf_fm
,
sizeof
(
buf_fm
),
NULL
);
memset
(
buf
,
'a'
,
sizeof
(
buf
));
ret
=
p__Winerror_message
(
0
,
buf
,
sizeof
(
buf
));
ok
(
ret
==
ret_fm
,
"ret = %u, expected %u
\n
"
,
ret
,
ret_fm
);
ok
(
!
strcmp
(
buf
,
buf_fm
),
"buf = %s, expected %s
\n
"
,
buf
,
buf_fm
);
memset
(
buf
,
'a'
,
sizeof
(
buf
));
ret
=
p__Winerror_message
(
0
,
buf
,
2
);
ok
(
!
ret
,
"ret = %u
\n
"
,
ret
);
ok
(
buf
[
0
]
==
'a'
,
"buf = %s
\n
"
,
buf
);
}
START_TEST
(
msvcp140
)
{
if
(
!
init
())
return
;
...
...
@@ -1302,5 +1324,6 @@ START_TEST(msvcp140)
test_Temp_get
();
test_Rename
();
test_Last_write_time
();
test__Winerror_message
();
FreeLibrary
(
msvcp
);
}
dlls/msvcp90/misc.c
View file @
c69eba92
...
...
@@ -2790,3 +2790,15 @@ const char* __cdecl _Syserror_map(int err)
return
NULL
;
}
#endif
#if _MSVCP_VER >= 140
/* ?_Winerror_message@std@@YAKKPADK@Z */
/* ?_Winerror_message@std@@YAKKPEADK@Z */
ULONG
__cdecl
_Winerror_message
(
ULONG
err
,
char
*
buf
,
ULONG
size
)
{
TRACE
(
"(%u %p %u)
\n
"
,
err
,
buf
,
size
);
return
FormatMessageA
(
FORMAT_MESSAGE_FROM_SYSTEM
|
FORMAT_MESSAGE_IGNORE_INSERTS
,
NULL
,
err
,
0
,
buf
,
size
,
NULL
);
}
#endif
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