diff --git a/os.hpp b/os.hpp
index f7e841b..78c5751 100644
--- a/os.hpp
+++ b/os.hpp
@@ -37,6 +37,7 @@
 #define _UNICODE // Set _T() macro to convert from narrow to wide strings.
 #endif
 
+#undef _WIN32_WINNT
 #define WINVER _WIN32_WINNT_WINXP
 #define _WIN32_WINNT _WIN32_WINNT_WINXP
 
diff --git a/system.cpp b/system.cpp
index b8f96cb..08c6139 100644
--- a/system.cpp
+++ b/system.cpp
@@ -126,7 +126,7 @@ bool SetPrivilege(LPCTSTR PrivName)
 #endif
 
 
-#if defined(_WIN_ALL) && !defined(SFX_MODULE)
+#if defined(_WIN_ALL) && !defined(SFX_MODULE) && !defined(RARDLL)
 void Shutdown(POWER_MODE Mode)
 {
   SetPrivilege(SE_SHUTDOWN_NAME);
