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
870d35c6
Commit
870d35c6
authored
Sep 13, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: Added set_new_handler implementation.
parent
45dc6c0e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
+35
-2
misc.c
dlls/msvcp90/misc.c
+28
-0
msvcp90.h
dlls/msvcp90/msvcp90.h
+1
-0
msvcp90.spec
dlls/msvcp90/msvcp90.spec
+2
-2
msvcp90_main.c
dlls/msvcp90/msvcp90_main.c
+4
-0
No files found.
dlls/msvcp90/misc.c
View file @
870d35c6
...
...
@@ -25,6 +25,8 @@
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcp90
);
/* ??0_Mutex@std@@QAE@XZ */
/* ??0_Mutex@std@@QEAA@XZ */
...
...
@@ -191,3 +193,29 @@ unsigned short __cdecl wctype(const char *property)
return
0
;
}
typedef
void
(
__cdecl
*
MSVCP_new_handler_func
)(
void
);
static
MSVCP_new_handler_func
MSVCP_new_handler
;
static
int
__cdecl
new_handler_wrapper
(
MSVCP_size_t
unused
)
{
MSVCP_new_handler
();
return
1
;
}
/* ?set_new_handler@std@@YAP6AXXZP6AXXZ@Z */
MSVCP_new_handler_func
__cdecl
set_new_handler
(
MSVCP_new_handler_func
new_handler
)
{
MSVCP_new_handler_func
old_handler
=
MSVCP_new_handler
;
TRACE
(
"%p
\n
"
,
new_handler
);
MSVCP_new_handler
=
new_handler
;
MSVCRT_set_new_handler
(
new_handler
?
new_handler_wrapper
:
NULL
);
return
old_handler
;
}
/* ?set_new_handler@std@@YAP6AXXZH@Z */
MSVCP_new_handler_func
__cdecl
set_new_handler_reset
(
int
unused
)
{
return
set_new_handler
(
NULL
);
}
dlls/msvcp90/msvcp90.h
View file @
870d35c6
...
...
@@ -29,6 +29,7 @@ void __cdecl _invalid_parameter(const wchar_t*, const wchar_t*,
extern
void
*
(
__cdecl
*
MSVCRT_operator_new
)(
MSVCP_size_t
);
extern
void
(
__cdecl
*
MSVCRT_operator_delete
)(
void
*
);
extern
void
*
(
__cdecl
*
MSVCRT_set_new_handler
)(
void
*
);
/* Copied from dlls/msvcrt/cpp.c */
#ifdef __i386__
/* thiscall functions are i386-specific */
...
...
dlls/msvcp90/msvcp90.spec
View file @
870d35c6
...
...
@@ -5310,8 +5310,8 @@
@ stub -arch=win64 ?seekpos@?$basic_stringbuf@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@MEAA?AV?$fpos@H@2@V32@H@Z
@ stub -arch=win32 ?seekpos@strstreambuf@std@@MAE?AV?$fpos@H@2@V32@H@Z
@ stub -arch=win64 ?seekpos@strstreambuf@std@@MEAA?AV?$fpos@H@2@V32@H@Z
@
stub ?set_new_handler@std@@YAP6AXXZH@Z
@
stub ?set_new_handler@std@@YAP6AXXZP6AXXZ@Z
@
cdecl ?set_new_handler@std@@YAP6AXXZH@Z(long) set_new_handler_reset
@
cdecl ?set_new_handler@std@@YAP6AXXZP6AXXZ@Z(ptr) set_new_handler
@ stub ?setbase@std@@YA?AU?$_Smanip@H@1@H@Z
@ stub -arch=win32 ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MAEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PADH@Z
@ stub -arch=win64 ?setbuf@?$basic_filebuf@DU?$char_traits@D@std@@@std@@MEAAPEAV?$basic_streambuf@DU?$char_traits@D@std@@@2@PEAD_J@Z
...
...
dlls/msvcp90/msvcp90_main.c
View file @
870d35c6
...
...
@@ -30,6 +30,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcp90);
void
*
(
__cdecl
*
MSVCRT_operator_new
)(
MSVCP_size_t
);
void
(
__cdecl
*
MSVCRT_operator_delete
)(
void
*
);
void
*
(
__cdecl
*
MSVCRT_set_new_handler
)(
void
*
);
static
void
init_cxx_funcs
(
void
)
{
HMODULE
hmod
=
GetModuleHandleA
(
"msvcrt.dll"
);
...
...
@@ -38,11 +40,13 @@ static void init_cxx_funcs(void)
{
MSVCRT_operator_new
=
(
void
*
)
GetProcAddress
(
hmod
,
"??2@YAPEAX_K@Z"
);
MSVCRT_operator_delete
=
(
void
*
)
GetProcAddress
(
hmod
,
"??3@YAXPEAX@Z"
);
MSVCRT_set_new_handler
=
(
void
*
)
GetProcAddress
(
hmod
,
"?_set_new_handler@@YAP6AH_K@ZP6AH0@Z@Z"
);
}
else
{
MSVCRT_operator_new
=
(
void
*
)
GetProcAddress
(
hmod
,
"??2@YAPAXI@Z"
);
MSVCRT_operator_delete
=
(
void
*
)
GetProcAddress
(
hmod
,
"??3@YAXPAX@Z"
);
MSVCRT_set_new_handler
=
(
void
*
)
GetProcAddress
(
hmod
,
"?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z"
);
}
}
...
...
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