diff --git a/ide/vs2017/mimalloc-override.vcxproj b/ide/vs2017/mimalloc-override.vcxproj
index 82f0b432..7d452b55 100644
--- a/ide/vs2017/mimalloc-override.vcxproj
+++ b/ide/vs2017/mimalloc-override.vcxproj
@@ -35,7 +35,6 @@
DynamicLibrary
false
v141
- true
DynamicLibrary
@@ -46,7 +45,6 @@
DynamicLibrary
false
v141
- true
@@ -103,12 +101,14 @@
Default
- ../../bin/mimalloc-redirect32.lib;%(AdditionalDependencies)
+ %(AdditionalDependencies)
Default
+ DllEntry
+ false
@@ -124,12 +124,14 @@
Default
- ../../bin/mimalloc-redirect.lib;%(AdditionalDependencies)
+ %(AdditionalDependencies)
Default
+ DllEntry
+ false
COPY /Y $(SolutionDir)..\..\bin\mimalloc-redirect.dll $(OutputPath)
@@ -157,10 +159,12 @@
true
true
- ../../bin/mimalloc-redirect32.lib;%(AdditionalDependencies)
+ %(AdditionalDependencies)
Default
+ DllEntry
+ false
@@ -182,10 +186,12 @@
true
true
- ../../bin/mimalloc-redirect.lib;%(AdditionalDependencies)
+ %(AdditionalDependencies)
Default
+ DllEntry
+ false
COPY /Y $(SolutionDir)..\..\bin\mimalloc-redirect.dll $(OutputPath)
@@ -208,6 +214,7 @@
false
false
+
true
true
diff --git a/ide/vs2017/mimalloc-override.vcxproj.filters b/ide/vs2017/mimalloc-override.vcxproj.filters
index ffabddac..df0bf5ed 100644
--- a/ide/vs2017/mimalloc-override.vcxproj.filters
+++ b/ide/vs2017/mimalloc-override.vcxproj.filters
@@ -67,5 +67,8 @@
Source Files
+
+ Source Files
+
\ No newline at end of file
diff --git a/src/alloc-override-win.c b/src/alloc-override-win.c
index 7b0fe69f..56f8d149 100644
--- a/src/alloc-override-win.c
+++ b/src/alloc-override-win.c
@@ -143,7 +143,11 @@ static size_t mi__msize_term(void* p) {
}
-// Debug versions, forward to base versions (that get patched)
+// Debug versions, forward to base versions in ucrtbase (that get patched)
+void* _malloc_base(size_t size);
+void* _calloc_base(size_t size, size_t count);
+void* _realloc_base(void* p, size_t new_size);
+void _free_base(void* p);
static void* mi__malloc_dbg(size_t size, int block_type, const char* fname, int line) {
UNUSED(block_type); UNUSED(fname); UNUSED(line);
diff --git a/src/alloc-override.c b/src/alloc-override.c
index 345d396c..e5eeaab2 100644
--- a/src/alloc-override.c
+++ b/src/alloc-override.c
@@ -9,7 +9,7 @@ terms of the MIT license. A copy of the license can be found in the file
#error "this file should be included from 'alloc.c' (so aliases can work)"
#endif
-#if defined(MI_MALLOC_OVERRIDE) && defined(_WIN32) && !(defined(MI_SHARED_LIB) && defined(_DLL) && defined(_WIN64))
+#if defined(MI_MALLOC_OVERRIDE) && defined(_WIN32) && !(defined(MI_SHARED_LIB) && defined(_DLL))
#error "It is only possible to override "malloc" on Windows when building as a 64-bit DLL (and linking the C runtime as a DLL)"
#endif
diff --git a/src/init.c b/src/init.c
index 44e3c9cb..c202eb2b 100644
--- a/src/init.c
+++ b/src/init.c
@@ -385,7 +385,7 @@ bool _mi_preloading() {
}
// Communicate with the redirection module on Windows
-#if defined(_WIN32) && defined(MI_SHARED_LIB)
+#if defined(_WIN32) && defined(XMI_SHARED_LIB)
#ifdef __cplusplus
extern "C" {
#endif