--- a/src/makefile.mingw
+++ b/src/makefile.mingw
@@ -35,9 +35,7 @@
 
 PADIR = $(pd_src)/portaudio
 ASIODIR = $(pd_src)/asio/ASIOSDK2
-# there is some old code in ASIO/common/combase.h that needs to be ignored, we
-# do this by setting the WINVER macro
-ASIOINC = -I$(ASIODIR)/common -I$(ASIODIR)/host -I$(ASIODIR)/host/pc -DWINVER=0xffff
+ASIOINC = -I$(ASIODIR)/common -I$(ASIODIR)/host -I$(ASIODIR)/host/pc
 INCPA = -I$(PADIR) -I$(PADIR)/include -I$(PADIR)/src/common -I$(PADIR)/src/os/win $(ASIOINC)
 INCLUDE = -I$(pd_src)/src 
 GINCLUDE = -I/usr/local/include $(INCLUDE)
@@ -49,7 +47,12 @@
 
 WARN_CFLAGS = -Wall -W -Wstrict-prototypes -Wno-unused \
     -Wno-unused-parameter -Wno-parentheses -Wno-switch
-ARCH_CFLAGS = -DPD -DPD_INTERNAL -DMSW -D_WIN32 -DPA_USE_ASIO -DPA_USE_WMME \
+# Some old code in asio/ASIOSDK2/common/combase.h needs to be ignored,
+# we do this by setting the WINVER macro to min Windows XP aka 5.1.
+# Also, for SetDllDirectory() s_loader.c, we need a minium of Windows
+# XP SP1.  WINVER isnt' fine-grained enough for that, so we use the
+# next minor version of Windows, 5.2.
+ARCH_CFLAGS = -DPD -DPD_INTERNAL -DPA_USE_ASIO -DPA_USE_WMME -DWINVER=0x0502 \
 	-DUSEAPI_MMIO -DUSEAPI_PORTAUDIO -mms-bitfields -DWISHAPP='"wish85.exe"'
 
 CFLAGS += $(ARCH_CFLAGS) $(WARN_CFLAGS) $(OPT_CFLAGS) $(MORECFLAGS)