Index: /trunk/src/VBox/Runtime/.scm-settings
===================================================================
--- /trunk/src/VBox/Runtime/.scm-settings	(revision 83861)
+++ /trunk/src/VBox/Runtime/.scm-settings	(revision 83862)
@@ -42,5 +42,6 @@
 
 # Small C and ASM header, no copyright or license text for now.
-/r3/win/vcc100-kernel32-fakes.h: --external-copyright --no-update-license
+/r3/win/vcc-fakes-kernel32-100.h: --external-copyright --no-update-license
+/r3/win/vcc-fakes-kernel32-141.h: --external-copyright --no-update-license
 
 # external code
Index: /trunk/src/VBox/Runtime/r3/win/vcc-fakes-kernel32-141.h
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/vcc-fakes-kernel32-141.h	(revision 83861)
+++ /trunk/src/VBox/Runtime/r3/win/vcc-fakes-kernel32-141.h	(revision 83862)
@@ -1,43 +1,21 @@
-COMMENT("XP SP2 / W2K3 SP1 / VISTA")
 MAKE_IMPORT_ENTRY(6,0, DecodePointer, 4)
 MAKE_IMPORT_ENTRY(6,0, EncodePointer, 4)
-COMMENT("XP")
-MAKE_IMPORT_ENTRY(5,1, HeapSetInformation, 16)
-MAKE_IMPORT_ENTRY(5,1, HeapQueryInformation, 20)
 MAKE_IMPORT_ENTRY(5,1, InitializeSListHead, 4)
-MAKE_IMPORT_ENTRY(5,1, InterlockedFlushSList, 4)
-MAKE_IMPORT_ENTRY(5,1, InterlockedPopEntrySList, 4)
-MAKE_IMPORT_ENTRY(5,1, InterlockedPushEntrySList, 8)
-MAKE_IMPORT_ENTRY(5,1, QueryDepthSList, 4)
 MAKE_IMPORT_ENTRY(5,1, GetModuleHandleExW, 12)
-COMMENT("NT 4 SP4+")
 MAKE_IMPORT_ENTRY(5,0, VerifyVersionInfoA, 16)
-COMMENT("NT 4 SP3+")
-MAKE_IMPORT_ENTRY(5,0, CreateTimerQueue, 0)
-MAKE_IMPORT_ENTRY(5,0, CreateTimerQueueTimer, 28)
-MAKE_IMPORT_ENTRY(5,0, DeleteTimerQueueTimer, 12)
-MAKE_IMPORT_ENTRY(5,0, VerSetConditionMask, 16)
 MAKE_IMPORT_ENTRY(5,0, SetFilePointerEx, 20)
 MAKE_IMPORT_ENTRY(5,0, GetFileSizeEx, 8)
 MAKE_IMPORT_ENTRY(5,0, InitializeCriticalSectionAndSpinCount, 8)
-COMMENT("NT 4.0")
 MAKE_IMPORT_ENTRY(4,0, FindFirstFileExW, 24)
 MAKE_IMPORT_ENTRY(4,0, IsProcessorFeaturePresent, 4)
 MAKE_IMPORT_ENTRY(4,0, CancelIo, 4)
-COMMENT("NT 3.51")
 MAKE_IMPORT_ENTRY(3,51, FreeLibraryAndExitThread, 8)
-MAKE_IMPORT_ENTRY(3,51, PostQueuedCompletionStatus, 16)
-MAKE_IMPORT_ENTRY(3,51, EnumSystemLocalesW, 8)
 MAKE_IMPORT_ENTRY(3,51, IsDebuggerPresent, 0)
 MAKE_IMPORT_ENTRY(3,51, GetSystemTimeAsFileTime, 4)
-MAKE_IMPORT_ENTRY(3,51, CreateIoCompletionPort, 16)
-MAKE_IMPORT_ENTRY(3,51, GetQueuedCompletionStatus, 20)
-COMMENT("NT 3.50")
+MAKE_IMPORT_ENTRY(3,50, EnumSystemLocalesW, 8)
 MAKE_IMPORT_ENTRY(3,50, GetVersionExA, 4)
 MAKE_IMPORT_ENTRY(3,50, GetVersionExW, 4)
 MAKE_IMPORT_ENTRY(3,50, GetEnvironmentStringsW, 0)
 MAKE_IMPORT_ENTRY(3,50, FreeEnvironmentStringsW, 4)
-MAKE_IMPORT_ENTRY(3,50, GetLocaleInfoA, 16)
-MAKE_IMPORT_ENTRY(3,50, EnumSystemLocalesA, 8)
 MAKE_IMPORT_ENTRY(3,50, IsValidLocale, 8)
 MAKE_IMPORT_ENTRY(3,50, SetThreadAffinityMask, 8)
@@ -46,2 +24,19 @@
 MAKE_IMPORT_ENTRY(3,50, SetHandleInformation, 12)
 
+COMMENT("Not needed (usually)")
+MAKE_IMPORT_ENTRY(5,1, HeapSetInformation, 16)
+MAKE_IMPORT_ENTRY(5,1, HeapQueryInformation, 20)
+MAKE_IMPORT_ENTRY(5,1, InterlockedFlushSList, 4)
+MAKE_IMPORT_ENTRY(5,1, InterlockedPopEntrySList, 4)
+MAKE_IMPORT_ENTRY(5,1, InterlockedPushEntrySList, 8)
+MAKE_IMPORT_ENTRY(5,1, QueryDepthSList, 4)
+MAKE_IMPORT_ENTRY(5,0, CreateTimerQueue, 0)
+MAKE_IMPORT_ENTRY(5,0, CreateTimerQueueTimer, 28)
+MAKE_IMPORT_ENTRY(5,0, DeleteTimerQueueTimer, 12)
+MAKE_IMPORT_ENTRY(5,0, VerSetConditionMask, 16)
+MAKE_IMPORT_ENTRY(3,51, PostQueuedCompletionStatus, 16)
+MAKE_IMPORT_ENTRY(3,51, CreateIoCompletionPort, 16)
+MAKE_IMPORT_ENTRY(3,51, GetQueuedCompletionStatus, 20)
+MAKE_IMPORT_ENTRY(3,50, GetLocaleInfoA, 16)
+MAKE_IMPORT_ENTRY(3,50, EnumSystemLocalesA, 8)
+
Index: /trunk/src/VBox/Runtime/r3/win/vcc-fakes-kernel32.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/vcc-fakes-kernel32.cpp	(revision 83861)
+++ /trunk/src/VBox/Runtime/r3/win/vcc-fakes-kernel32.cpp	(revision 83862)
@@ -508,9 +508,9 @@
     // CRT/_findfile:      FindFirstFileExW(, FindExInfoStandard, , FindExSearchNameMatch, NULL, 0);
     // CRT/argv_wildcards: FindFirstFileExW(, FindExInfoStandard, , FindExSearchNameMatch, NULL, 0);
-    AssertReturnStmt(dwAdditionalFlags == 0, SetLastError(ERROR_INVALID_PARAMETER), INVALID_HANDLE_VALUE);
-    AssertReturnStmt(pvSearchFilter == NULL, SetLastError(ERROR_INVALID_PARAMETER), INVALID_HANDLE_VALUE);
-    AssertReturnStmt(enmSearchOp == FindExSearchNameMatch, SetLastError(ERROR_INVALID_PARAMETER), INVALID_HANDLE_VALUE);
-    AssertReturnStmt(enmInfoLevel == FindExInfoStandard || enmInfoLevel == FindExInfoBasic,
-                     SetLastError(ERROR_INVALID_PARAMETER), INVALID_HANDLE_VALUE);
+    MY_ASSERT_STMT_RETURN(dwAdditionalFlags == 0, SetLastError(ERROR_INVALID_PARAMETER), INVALID_HANDLE_VALUE);
+    MY_ASSERT_STMT_RETURN(pvSearchFilter == NULL, SetLastError(ERROR_INVALID_PARAMETER), INVALID_HANDLE_VALUE);
+    MY_ASSERT_STMT_RETURN(enmSearchOp == FindExSearchNameMatch, SetLastError(ERROR_INVALID_PARAMETER), INVALID_HANDLE_VALUE);
+    MY_ASSERT_STMT_RETURN(enmInfoLevel == FindExInfoStandard || enmInfoLevel == FindExInfoBasic,
+                          SetLastError(ERROR_INVALID_PARAMETER), INVALID_HANDLE_VALUE);
 
     return FindFirstFileW(pwszFileName, (WIN32_FIND_DATAW *)pvFindFileData);
@@ -559,15 +559,4 @@
         FreeModule(hLibModule);
     ExitThread(dwExitCode);
-}
-#endif /* VCC_FAKES_TARGET >= 141 */
-
-
-#if VCC_FAKES_TARGET >= 141
-/** @since 3.51 */
-DECL_KERNEL32(BOOL) Fake_EnumSystemLocalesW(LOCALE_ENUMPROCW pfnLocaleEnum, DWORD dwFlags)
-{
-    RT_NOREF(pfnLocaleEnum, dwFlags);
-    SetLastError(ERROR_NOT_SUPPORTED);
-    return FALSE;
 }
 #endif /* VCC_FAKES_TARGET >= 141 */
@@ -743,4 +732,15 @@
 
 
+#if VCC_FAKES_TARGET >= 141
+/** @since 3.51 */
+DECL_KERNEL32(BOOL) Fake_EnumSystemLocalesW(LOCALE_ENUMPROCW pfnLocaleEnum, DWORD dwFlags)
+{
+    RT_NOREF(pfnLocaleEnum, dwFlags);
+    SetLastError(ERROR_NOT_SUPPORTED);
+    return FALSE;
+}
+#endif /* VCC_FAKES_TARGET >= 141 */
+
+
 DECL_KERNEL32(BOOL) Fake_EnumSystemLocalesA(LOCALE_ENUMPROCA pfnCallback, DWORD fFlags)
 {
Index: /trunk/src/VBox/Runtime/r3/win/vcc-fakes.h
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/vcc-fakes.h	(revision 83861)
+++ /trunk/src/VBox/Runtime/r3/win/vcc-fakes.h	(revision 83862)
@@ -56,4 +56,16 @@
         } \
     } while (0)
+# define MY_ASSERT_STMT_RETURN(a_Expr, a_Stmt, a_rc) \
+    do { \
+        if (a_Expr) \
+        { /* likely */ } \
+        else \
+        { \
+            OutputDebugStringA("Assertion failed on line " RT_XSTR(__LINE__) ": " RT_XSTR(a_Expr) "\n"); \
+            RT_BREAKPOINT(); \
+            a_Stmt; \
+            return (a_rc); \
+        } \
+    } while (0)
 # else
 #  define MY_ASSERT(a_Expr, ...) \
@@ -74,4 +86,6 @@
 #else
 # define MY_ASSERT(a_Expr, ...) do { } while (0)
+# define MY_ASSERT_STMT_RETURN(a_Expr, a_Stmt, a_rc) \
+    do { if (a_Expr) { /* likely */ } else { a_Stmt; return (a_rc); }} while (0)
 #endif
 
