Emanuele Aliberti <ea@reactos.com>
[reactos.git] / reactos / lib / kernel32 / misc / stubs.c
index dbc3daf..cdd9dea 100644 (file)
@@ -1,11 +1,18 @@
-/* $Id: stubs.c,v 1.70 2004/03/18 18:29:19 weiden Exp $
+/* $Id: stubs.c,v 1.92 2004/09/23 21:01:23 ea Exp $
  *
- * KERNEL32.DLL stubs (unimplemented functions)
+ * KERNEL32.DLL stubs (STUB functions)
  * Remove from this file, if you implement them.
  */
+
 #include <k32.h>
 
-//#define _OLE2NLS_IN_BUILD_
+#define NDEBUG
+#include "../include/debug.h"
+
+
+#define STUB \
+  SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
+  DPRINT1("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
 
 /*
  * @unimplemented
@@ -14,10 +21,45 @@ BOOL
 STDCALL
 BaseAttachCompleteThunk (VOID)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+BaseDumpAppcompatCache(VOID)
+{
+    STUB;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+BaseFlushAppcompatCache(VOID)
+{
+    STUB;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+BaseCheckAppcompatCache(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4)
+{
+    STUB;
+}
+
+/*
+ * @unimplemented
+ */
+VOID STDCALL
+BaseUpdateAppcompatCache(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
+{
+    STUB;
+}
 
 /*
  * @unimplemented
@@ -28,7 +70,7 @@ CmdBatNotification (
     DWORD   Unknown
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -47,7 +89,7 @@ CompareStringA (
     int cchCount2
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -66,8 +108,44 @@ CompareStringW (
     int cchCount2
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+    INT Result;
+    UNICODE_STRING String1, String2;
+
+    if (!lpString1 || !lpString2)
+    {
+        SetLastError(ERROR_INVALID_PARAMETER);
+        return 0;
+    }
+
+    if (dwCmpFlags & ~(NORM_IGNORECASE | NORM_IGNORENONSPACE |
+        NORM_IGNORESYMBOLS | SORT_STRINGSORT | NORM_IGNOREKANATYPE |
+        NORM_IGNOREWIDTH | 0x10000000))
+    {
+        SetLastError(ERROR_INVALID_FLAGS);
+        return 0;
+    }
+
+    if (dwCmpFlags & ~NORM_IGNORECASE)
+    {
+        DPRINT1("CompareString: STUB flags - 0x%x\n",
+           dwCmpFlags & ~NORM_IGNORECASE);
+    }
+
+    if (cchCount1 < 0) cchCount1 = lstrlenW(lpString1);
+    if (cchCount2 < 0) cchCount2 = lstrlenW(lpString2);
+
+    String1.Length = String1.MaximumLength = cchCount1 * sizeof(WCHAR);
+    String1.Buffer = (LPWSTR)lpString1;
+    String2.Length = String2.MaximumLength = cchCount2 * sizeof(WCHAR);
+    String2.Buffer = (LPWSTR)lpString2;
+
+    Result = RtlCompareUnicodeString(
+       &String1, &String2, dwCmpFlags & NORM_IGNORECASE);
+
+    if (Result) /* need to translate result */
+        return (Result < 0) ? CSTR_LESS_THAN : CSTR_GREATER_THAN;
+
+    return CSTR_EQUAL;
 }
 
 
@@ -82,7 +160,7 @@ CreateVirtualBuffer (
     DWORD   Unknown2
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -97,7 +175,7 @@ ExitVDM (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -112,7 +190,7 @@ ExtendVirtualBuffer (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -130,7 +208,7 @@ FoldStringW (
     int cchDest
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -148,7 +226,7 @@ FoldStringA (
     int cchDest
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -162,44 +240,10 @@ FreeVirtualBuffer (
     HANDLE  hVirtualBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetBinaryTypeW (
-    LPCWSTR lpApplicationName,
-    LPDWORD lpBinaryType
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetBinaryTypeA (
-    LPCSTR  lpApplicationName,
-    LPDWORD lpBinaryType
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
-#ifndef _OLE2NLS_IN_BUILD_
-
-
-
-
 
 /*
  * @unimplemented
@@ -210,7 +254,7 @@ GetNextVDMCommand (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -228,7 +272,7 @@ GetStringTypeExW (
     LPWORD  lpCharType
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -246,7 +290,7 @@ GetStringTypeExA (
     LPWORD  lpCharType
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -263,7 +307,7 @@ GetStringTypeW (
     LPWORD  lpCharType
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -281,23 +325,21 @@ GetStringTypeA (
     LPWORD  lpCharType
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
 
-#endif
-
 /*
  * @unimplemented
  */
 BOOL
 STDCALL
 GetSystemPowerStatus (
-    DWORD   Unknown0
+    LPSYSTEM_POWER_STATUS PowerStatus
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -312,53 +354,7 @@ GetVDMCurrentDirectories (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-#ifndef _OLE2NLS_IN_BUILD_
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-IsDBCSLeadByte (
-    BYTE    TestChar
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-IsDBCSLeadByteEx (
-    UINT    CodePage,
-    BYTE    TestChar
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-#endif
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-LoadModule (
-    LPCSTR  lpModuleName,
-    LPVOID  lpParameterBlock
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -382,7 +378,7 @@ RegisterConsoleVDM (
     DWORD   Unknown10
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -396,7 +392,7 @@ RegisterWowBaseHandlers (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -410,7 +406,7 @@ RegisterWowExec (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -424,7 +420,7 @@ SetSystemPowerState (
     BOOL fForce
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -439,7 +435,7 @@ SetVDMCurrentDirectories (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -453,7 +449,7 @@ TrimVirtualBuffer (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -468,7 +464,7 @@ VDMConsoleOperation (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -482,13 +478,11 @@ VDMOperationStarted (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
 
-#ifndef _OLE2NLS_IN_BUILD_
-
 /*
  * @unimplemented
  */
@@ -500,7 +494,7 @@ VerLanguageNameA (
     DWORD   nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -516,11 +510,10 @@ VerLanguageNameW (
     DWORD   nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
-#endif
 
 /*
  * @unimplemented
@@ -533,7 +526,7 @@ VirtualBufferExceptionHandler (
     DWORD   Unknown2
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -547,7 +540,7 @@ ActivateActCtx(
     ULONG_PTR *lpCookie
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -560,7 +553,7 @@ AddRefActCtx(
     HANDLE hActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -574,21 +567,7 @@ AllocateUserPhysicalPages(
     PULONG_PTR PageArray
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-AssignProcessToJobObject(
-    HANDLE hJob,
-    HANDLE hProcess
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -603,7 +582,7 @@ BindIoCompletionCallback (
     ULONG Flags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -616,39 +595,10 @@ CancelDeviceWakeupRequest(
     HANDLE hDevice
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-CancelTimerQueueTimer(
-    HANDLE TimerQueue,
-    HANDLE Timer
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
-/*
- * @unimplemented
- */
 
-BOOL
-STDCALL
-ChangeTimerQueueTimer(
-    HANDLE TimerQueue,
-    HANDLE Timer,
-    ULONG DueTime,
-    ULONG Period
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
 
 /*
  * @unimplemented
@@ -659,7 +609,7 @@ CreateActCtxA(
     PCACTCTXA pActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -672,7 +622,7 @@ CreateActCtxW(
     PCACTCTXW pActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -686,52 +636,7 @@ CreateJobSet (
     PJOB_SET_ARRAY UserJobSet,
     ULONG Flags)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-CreateMemoryResourceNotification(
-    MEMORY_RESOURCE_NOTIFICATION_TYPE NotificationType
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-CreateTimerQueue(
-    VOID
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-CreateTimerQueueTimer(
-    PHANDLE phNewTimer,
-    HANDLE TimerQueue,
-    WAITORTIMERCALLBACK Callback,
-    PVOID Parameter,
-    DWORD DueTime,
-    DWORD Period,
-    ULONG Flags
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -745,49 +650,7 @@ DeactivateActCtx(
     ULONG_PTR ulCookie
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-DeleteTimerQueue(
-    HANDLE TimerQueue
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-DeleteTimerQueueEx(
-    HANDLE TimerQueue,
-    HANDLE CompletionEvent
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-DeleteTimerQueueTimer(
-    HANDLE TimerQueue,
-    HANDLE Timer,
-    HANDLE CompletionEvent
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -804,7 +667,7 @@ FindActCtxSectionGuid(
     PACTCTX_SECTION_KEYED_DATA ReturnedData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -817,7 +680,7 @@ FindVolumeClose(
     HANDLE hFindVolume
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -830,7 +693,7 @@ FindVolumeMountPointClose(
     HANDLE hFindVolumeMountPoint
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -845,7 +708,7 @@ FreeUserPhysicalPages(
     PULONG_PTR PageArray
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -857,7 +720,7 @@ STDCALL
 GetCurrentActCtx(
     HANDLE *lphActCtx)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -871,7 +734,7 @@ GetDevicePowerState(
     BOOL *pfOn
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -884,7 +747,7 @@ GetNativeSystemInfo(
     LPSYSTEM_INFO lpSystemInfo
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -896,7 +759,7 @@ GetNumaHighestNodeNumber(
     PULONG HighestNodeNumber
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -910,7 +773,7 @@ GetNumaNodeProcessorMask(
     PULONGLONG ProcessorMask
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -924,64 +787,7 @@ GetNumaProcessorNode(
     PUCHAR NodeNumber
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetProcessHandleCount(
-    HANDLE hProcess,
-    PDWORD pdwHandleCount
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetProcessPriorityBoost(
-    HANDLE hProcess,
-    PBOOL pDisablePriorityBoost
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetSystemRegistryQuota(
-    PDWORD pdwQuotaAllowed,
-    PDWORD pdwQuotaUsed
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetSystemTimes(
-    LPFILETIME lpIdleTime,
-    LPFILETIME lpKernelTime,
-    LPFILETIME lpUserTime
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -995,7 +801,7 @@ GetThreadIOPendingFlag(
     PBOOL lpIOIsPending
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1013,20 +819,7 @@ GetWriteWatch(
     PULONG lpdwGranularity
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GlobalMemoryStatusEx(
-    LPMEMORYSTATUSEX lpBuffer
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1043,7 +836,7 @@ HeapQueryInformation (
     PSIZE_T ReturnLength OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1059,22 +852,7 @@ HeapSetInformation (
     SIZE_T HeapInformationLength OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-IsProcessInJob (
-    HANDLE ProcessHandle,
-    HANDLE JobHandle,
-    PBOOL Result
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1087,7 +865,7 @@ IsSystemResumeAutomatic(
     VOID
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1101,7 +879,7 @@ IsWow64Process(
     PBOOL Wow64Process
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1116,7 +894,7 @@ MapUserPhysicalPages(
     PULONG_PTR PageArray OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1131,22 +909,7 @@ MapUserPhysicalPagesScatter(
     PULONG_PTR PageArray OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-OpenThread(
-    DWORD dwDesiredAccess,
-    BOOL bInheritHandle,
-    DWORD dwThreadId
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1165,38 +928,7 @@ QueryActCtxW(
     SIZE_T *pcbWrittenOrRequired OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-QueryInformationJobObject(
-    HANDLE hJob,
-    JOBOBJECTINFOCLASS JobObjectInformationClass,
-    LPVOID lpJobObjectInformation,
-    DWORD cbJobObjectInformationLength,
-    LPDWORD lpReturnLength
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-QueryMemoryResourceNotification(
-     HANDLE ResourceNotificationHandle,
-    PBOOL  ResourceState
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1211,7 +943,7 @@ QueueUserAPC(
     ULONG_PTR dwData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1226,7 +958,7 @@ QueueUserWorkItem(
     ULONG Flags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1246,7 +978,7 @@ ReadDirectoryChangesW(
     LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1263,7 +995,7 @@ ReadFileScatter(
     LPOVERLAPPED lpOverlapped
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1281,7 +1013,7 @@ RegisterWaitForSingleObject(
     ULONG dwFlags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1298,7 +1030,7 @@ RegisterWaitForSingleObjectEx(
     ULONG dwFlags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1311,7 +1043,7 @@ ReleaseActCtx(
     HANDLE hActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -1323,7 +1055,7 @@ RemoveVectoredExceptionHandler(
     PVOID VectoredHandlerHandle
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1336,7 +1068,7 @@ RequestDeviceWakeup(
     HANDLE hDevice
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1349,7 +1081,7 @@ RequestWakeupLatency(
     LATENCY_TIME latency
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1363,7 +1095,7 @@ ResetWriteWatch(
     SIZE_T dwRegionSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1376,37 +1108,7 @@ RestoreLastError(
     DWORD dwErrCode
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-SetCriticalSectionSpinCount(
-    LPCRITICAL_SECTION lpCriticalSection,
-    DWORD dwSpinCount
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetInformationJobObject(
-    HANDLE hJob,
-    JOBOBJECTINFOCLASS JobObjectInformationClass,
-    LPVOID lpJobObjectInformation,
-    DWORD cbJobObjectInformationLength
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+    STUB;
 }
 
 /*
@@ -1419,21 +1121,7 @@ SetMessageWaitingIndicator(
     ULONG ulMsgCount
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetProcessPriorityBoost(
-    HANDLE hProcess,
-    BOOL bDisablePriorityBoost
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1446,39 +1134,7 @@ SetThreadExecutionState(
     EXECUTION_STATE esFlags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-SetTimerQueueTimer(
-    HANDLE TimerQueue,
-    WAITORTIMERCALLBACK Callback,
-    PVOID Parameter,
-    DWORD DueTime,
-    DWORD Period,
-    BOOL PreferIo
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-TerminateJobObject(
-    HANDLE hJob,
-    UINT uExitCode
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1493,7 +1149,7 @@ TzSpecificLocalTimeToSystemTime(
     LPSYSTEMTIME lpUniversalTime
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1506,7 +1162,7 @@ UnregisterWait(
     HANDLE WaitHandle
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1520,7 +1176,7 @@ UnregisterWaitEx(
     HANDLE CompletionEvent
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1537,18 +1193,7 @@ WriteFileGather(
     LPOVERLAPPED lpOverlapped
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-WTSGetActiveConsoleSessionId(VOID)
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1561,38 +1206,7 @@ ZombifyActCtx(
     HANDLE hActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-CheckNameLegalDOS8Dot3W(
-    LPCWSTR lpName,
-    LPSTR lpOemName OPTIONAL,
-    DWORD OemNameSize OPTIONAL,
-    PBOOL pbNameContainsSpaces OPTIONAL,
-    PBOOL pbNameLegal
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-CreateJobObjectW(
-    LPSECURITY_ATTRIBUTES lpJobAttributes,
-    LPCWSTR lpName
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1605,7 +1219,7 @@ DeleteVolumeMountPointW(
     LPCWSTR lpszVolumeMountPoint
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1620,7 +1234,7 @@ DnsHostnameToComputerNameW (
     LPDWORD nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1637,7 +1251,7 @@ FindActCtxSectionStringW(
     PACTCTX_SECTION_KEYED_DATA ReturnedData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1647,11 +1261,11 @@ FindActCtxSectionStringW(
 HANDLE
 STDCALL
 FindFirstVolumeW(
-    LPWSTR lpszVolumeName,
+    LPCWSTR lpszVolumeName,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1661,12 +1275,12 @@ FindFirstVolumeW(
 HANDLE
 STDCALL
 FindFirstVolumeMountPointW(
-    LPCWSTR lpszRootPathName,
+    LPWSTR lpszRootPathName,
     LPWSTR lpszVolumeMountPoint,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1681,7 +1295,7 @@ FindNextVolumeW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1696,7 +1310,7 @@ FindNextVolumeMountPointW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1710,7 +1324,7 @@ GetDllDirectoryW(
     LPWSTR lpBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1726,7 +1340,7 @@ GetFirmwareEnvironmentVariableW(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1741,7 +1355,7 @@ GetLongPathNameW(
     DWORD    cchBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1756,7 +1370,7 @@ GetModuleHandleExW(
     HMODULE*    phModule
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1770,7 +1384,7 @@ GetSystemWow64DirectoryW(
     UINT uSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1785,7 +1399,7 @@ GetVolumeNameForVolumeMountPointW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1800,7 +1414,7 @@ GetVolumePathNameW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1816,22 +1430,7 @@ GetVolumePathNamesForVolumeNameW(
     PDWORD lpcchReturnLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-OpenJobObjectW(
-    DWORD dwDesiredAccess,
-    BOOL bInheritHandle,
-    LPCWSTR lpName
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1849,7 +1448,7 @@ ReplaceFileW(
     LPVOID  lpReserved
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1863,7 +1462,7 @@ SetComputerNameExW (
     LPCWSTR lpBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1876,7 +1475,7 @@ SetDllDirectoryW(
     LPCWSTR lpPathName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1892,7 +1491,7 @@ SetFirmwareEnvironmentVariableW(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1906,7 +1505,7 @@ SetVolumeMountPointW(
     LPCWSTR lpszVolumeName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1921,38 +1520,7 @@ VerifyVersionInfoW(
     DWORDLONG dwlConditionMask
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-CheckNameLegalDOS8Dot3A(
-    LPCSTR lpName,
-    LPSTR lpOemName OPTIONAL,
-    DWORD OemNameSize OPTIONAL,
-    PBOOL pbNameContainsSpaces OPTIONAL,
-    PBOOL pbNameLegal
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-CreateJobObjectA(
-    LPSECURITY_ATTRIBUTES lpJobAttributes,
-    LPCSTR lpName
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1965,7 +1533,7 @@ DeleteVolumeMountPointA(
     LPCSTR lpszVolumeMountPoint
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1980,7 +1548,7 @@ DnsHostnameToComputerNameA (
     LPDWORD nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1997,7 +1565,7 @@ FindActCtxSectionStringA(
     PACTCTX_SECTION_KEYED_DATA ReturnedData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2007,11 +1575,11 @@ FindActCtxSectionStringA(
 HANDLE
 STDCALL
 FindFirstVolumeA(
-    LPSTR lpszVolumeName,
+    LPCSTR lpszVolumeName,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2021,12 +1589,12 @@ FindFirstVolumeA(
 HANDLE
 STDCALL
 FindFirstVolumeMountPointA(
-    LPCSTR lpszRootPathName,
+    LPSTR lpszRootPathName,
     LPSTR lpszVolumeMountPoint,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2037,11 +1605,11 @@ BOOL
 STDCALL
 FindNextVolumeA(
     HANDLE hFindVolume,
-    LPSTR lpszVolumeName,
+    LPCSTR lpszVolumeName,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2056,7 +1624,7 @@ FindNextVolumeMountPointA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2070,7 +1638,7 @@ GetDllDirectoryA(
     LPSTR lpBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2086,7 +1654,7 @@ GetFirmwareEnvironmentVariableA(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2101,7 +1669,7 @@ GetLongPathNameA(
     DWORD    cchBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2116,7 +1684,7 @@ GetModuleHandleExA(
     HMODULE*    phModule
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2130,7 +1698,7 @@ GetSystemWow64DirectoryA(
     UINT uSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2145,7 +1713,7 @@ GetVolumeNameForVolumeMountPointA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2160,7 +1728,7 @@ GetVolumePathNameA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2176,22 +1744,7 @@ GetVolumePathNamesForVolumeNameA(
     PDWORD lpcchReturnLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-OpenJobObjectA(
-    DWORD dwDesiredAccess,
-    BOOL bInheritHandle,
-    LPCSTR lpName
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2209,7 +1762,7 @@ ReplaceFileA(
     LPVOID  lpReserved
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2223,7 +1776,7 @@ SetComputerNameExA (
     LPCSTR lpBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2236,7 +1789,7 @@ SetDllDirectoryA(
     LPCSTR lpPathName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2252,7 +1805,7 @@ SetFirmwareEnvironmentVariableA(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2266,7 +1819,7 @@ SetVolumeMountPointA(
     LPCSTR lpszVolumeName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2281,7 +1834,7 @@ VerifyVersionInfoA(
     DWORDLONG dwlConditionMask
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2295,7 +1848,7 @@ EnumSystemLanguageGroupsW(
     DWORD                   dwFlags,
     LONG_PTR                lParam)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2310,7 +1863,7 @@ VerSetConditionMask(
         BYTE    Condition
         )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2319,7 +1872,7 @@ VerSetConditionMask(
  */
 BOOL STDCALL GetConsoleKeyboardLayoutNameA(LPSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2328,7 +1881,7 @@ BOOL STDCALL GetConsoleKeyboardLayoutNameA(LPSTR name)
  */
 BOOL STDCALL GetConsoleKeyboardLayoutNameW(LPWSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2337,7 +1890,7 @@ BOOL STDCALL GetConsoleKeyboardLayoutNameW(LPWSTR name)
  */
 DWORD STDCALL GetHandleContext(HANDLE hnd)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2346,7 +1899,7 @@ DWORD STDCALL GetHandleContext(HANDLE hnd)
  */
 HANDLE STDCALL CreateSocketHandle(VOID)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2355,7 +1908,7 @@ HANDLE STDCALL CreateSocketHandle(VOID)
  */
 BOOL STDCALL SetHandleContext(HANDLE hnd,DWORD context)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2364,7 +1917,7 @@ BOOL STDCALL SetHandleContext(HANDLE hnd,DWORD context)
  */
 BOOL STDCALL SetConsoleInputExeNameA(LPCSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2373,7 +1926,7 @@ BOOL STDCALL SetConsoleInputExeNameA(LPCSTR name)
  */
 BOOL STDCALL SetConsoleInputExeNameW(LPCWSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2385,7 +1938,7 @@ BOOL STDCALL UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
                         FARPROC *ppfn32Thunk, FARPROC pfnUT32CallBack,
                         LPVOID lpBuff )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2394,15 +1947,19 @@ BOOL STDCALL UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
  */
 VOID STDCALL UTUnRegister( HMODULE hModule )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
  * @unimplemented
  */
+#if 0
 FARPROC STDCALL DelayLoadFailureHook(unsigned int dliNotify, PDelayLoadInfo pdli)
+#else
+FARPROC STDCALL DelayLoadFailureHook(unsigned int dliNotify, PVOID pdli)
+#endif
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2411,7 +1968,7 @@ FARPROC STDCALL DelayLoadFailureHook(unsigned int dliNotify, PDelayLoadInfo pdli
  */
 NTSTATUS STDCALL CreateNlsSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,ULONG Size,ULONG AccessMask)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2420,7 +1977,7 @@ NTSTATUS STDCALL CreateNlsSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescri
  */
 BOOL STDCALL GetConsoleInputExeNameA(ULONG length,LPCSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2429,7 +1986,7 @@ BOOL STDCALL GetConsoleInputExeNameA(ULONG length,LPCSTR name)
  */
 BOOL STDCALL GetConsoleInputExeNameW(ULONG length,LPCWSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2438,7 +1995,7 @@ BOOL STDCALL GetConsoleInputExeNameW(ULONG length,LPCWSTR name)
  */
 BOOL STDCALL IsValidUILanguage(LANGID langid)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2447,7 +2004,7 @@ BOOL STDCALL IsValidUILanguage(LANGID langid)
  */
 VOID STDCALL NlsConvertIntegerToString(ULONG Value,ULONG Base,ULONG strsize, LPWSTR str, ULONG strsize2)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -2455,7 +2012,7 @@ VOID STDCALL NlsConvertIntegerToString(ULONG Value,ULONG Base,ULONG strsize, LPW
  */
 UINT STDCALL SetCPGlobal(UINT CodePage)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2468,6 +2025,6 @@ SetClientTimeZoneInformation(
                       CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation
                       )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }