[RFC PATCH] msvcp140: Add MSVC 2015 C++ support DLL

Martin Storsjö martin at martin.st
Fri Nov 6 04:42:15 CST 2015

On Fri, 6 Nov 2015, Piotr Caban wrote:

> On 11/06/15 11:25, Martin Storsjö wrote:
>> Thanks, this does indeed seem to be implementable without too much
>> effort in the end. The new/delete functions also seem to be pretty
>> simple to reimplement based on malloc (which does the same
>> msvcrt_heap_alloc(0, size) as MSVCRT_operator_new), _callnewh and free.
> The hard part may be related to exception throwing in case of failure (I was 
> not looking on it - it may be easy).

msvcp also seems to have a bad_alloc exception (the one in msvcrt isn't 
exposed in ucrtbase, where they seem to have removed most of all the C++ 
stuff that used to be in msvcrt), so it turned out to be as simple as 
throw_exception(EXCEPTION_BAD_ALLOC, "bad allocation"); instead of 
throw_bad_alloc("bad allocation");.

// Martin

More information about the wine-devel mailing list