Emanuele Aliberti <ea@reactos.com>
[reactos.git] / reactos / lib / kernel32 / misc / stubs.c
index 6bb2e5d..cdd9dea 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: stubs.c,v 1.73 2004/04/22 02:20:52 jimtabor 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.
  */
 
@@ -10,7 +10,9 @@
 #include "../include/debug.h"
 
 
-//#define _OLE2NLS_IN_BUILD_
+#define STUB \
+  SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
+  DPRINT1("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
 
 /*
  * @unimplemented
@@ -19,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
@@ -33,7 +70,7 @@ CmdBatNotification (
     DWORD   Unknown
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -52,7 +89,7 @@ CompareStringA (
     int cchCount2
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -71,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;
 }
 
 
@@ -87,7 +160,7 @@ CreateVirtualBuffer (
     DWORD   Unknown2
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -102,7 +175,7 @@ ExitVDM (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -117,7 +190,7 @@ ExtendVirtualBuffer (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -135,7 +208,7 @@ FoldStringW (
     int cchDest
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -153,7 +226,7 @@ FoldStringA (
     int cchDest
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -167,45 +240,11 @@ FreeVirtualBuffer (
     HANDLE  hVirtualBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetBinaryTypeW (
-    LPCWSTR lpApplicationName,
-    LPDWORD lpBinaryType
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetBinaryTypeA (
-    LPCSTR  lpApplicationName,
-    LPDWORD lpBinaryType
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-#ifndef _OLE2NLS_IN_BUILD_
-
-
-
-
-
 /*
  * @unimplemented
  */
@@ -215,7 +254,7 @@ GetNextVDMCommand (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -233,7 +272,7 @@ GetStringTypeExW (
     LPWORD  lpCharType
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -251,7 +290,7 @@ GetStringTypeExA (
     LPWORD  lpCharType
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -268,7 +307,7 @@ GetStringTypeW (
     LPWORD  lpCharType
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -286,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;
 }
 
@@ -317,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;
 }
 
@@ -387,7 +378,7 @@ RegisterConsoleVDM (
     DWORD   Unknown10
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -401,7 +392,7 @@ RegisterWowBaseHandlers (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -415,7 +406,7 @@ RegisterWowExec (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -429,7 +420,7 @@ SetSystemPowerState (
     BOOL fForce
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -444,7 +435,7 @@ SetVDMCurrentDirectories (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -458,7 +449,7 @@ TrimVirtualBuffer (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -473,7 +464,7 @@ VDMConsoleOperation (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -487,13 +478,11 @@ VDMOperationStarted (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
 
-#ifndef _OLE2NLS_IN_BUILD_
-
 /*
  * @unimplemented
  */
@@ -505,7 +494,7 @@ VerLanguageNameA (
     DWORD   nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -521,11 +510,10 @@ VerLanguageNameW (
     DWORD   nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
-#endif
 
 /*
  * @unimplemented
@@ -538,7 +526,7 @@ VirtualBufferExceptionHandler (
     DWORD   Unknown2
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -552,7 +540,7 @@ ActivateActCtx(
     ULONG_PTR *lpCookie
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -565,7 +553,7 @@ AddRefActCtx(
     HANDLE hActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -579,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;
 }
 
@@ -608,7 +582,7 @@ BindIoCompletionCallback (
     ULONG Flags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -621,39 +595,10 @@ CancelDeviceWakeupRequest(
     HANDLE hDevice
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-CancelTimerQueueTimer(
-    HANDLE TimerQueue,
-    HANDLE Timer
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-/*
- * @unimplemented
- */
-
-BOOL
-STDCALL
-ChangeTimerQueueTimer(
-    HANDLE TimerQueue,
-    HANDLE Timer,
-    ULONG DueTime,
-    ULONG Period
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
 
 /*
  * @unimplemented
@@ -664,7 +609,7 @@ CreateActCtxA(
     PCACTCTXA pActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -677,7 +622,7 @@ CreateActCtxW(
     PCACTCTXW pActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -691,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;
 }
 
@@ -750,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;
 }
 
@@ -809,7 +667,7 @@ FindActCtxSectionGuid(
     PACTCTX_SECTION_KEYED_DATA ReturnedData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -822,7 +680,7 @@ FindVolumeClose(
     HANDLE hFindVolume
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -835,7 +693,7 @@ FindVolumeMountPointClose(
     HANDLE hFindVolumeMountPoint
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -850,7 +708,7 @@ FreeUserPhysicalPages(
     PULONG_PTR PageArray
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -862,7 +720,7 @@ STDCALL
 GetCurrentActCtx(
     HANDLE *lphActCtx)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -876,7 +734,7 @@ GetDevicePowerState(
     BOOL *pfOn
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -889,7 +747,7 @@ GetNativeSystemInfo(
     LPSYSTEM_INFO lpSystemInfo
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -901,7 +759,7 @@ GetNumaHighestNodeNumber(
     PULONG HighestNodeNumber
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -915,7 +773,7 @@ GetNumaNodeProcessorMask(
     PULONGLONG ProcessorMask
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -929,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;
 }
 
@@ -1000,7 +801,7 @@ GetThreadIOPendingFlag(
     PBOOL lpIOIsPending
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1018,7 +819,7 @@ GetWriteWatch(
     PULONG lpdwGranularity
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1035,7 +836,7 @@ HeapQueryInformation (
     PSIZE_T ReturnLength OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1051,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;
 }
 
@@ -1079,7 +865,7 @@ IsSystemResumeAutomatic(
     VOID
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1093,7 +879,7 @@ IsWow64Process(
     PBOOL Wow64Process
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1108,7 +894,7 @@ MapUserPhysicalPages(
     PULONG_PTR PageArray OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1123,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;
 }
 
@@ -1157,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;
 }
 
@@ -1203,7 +943,7 @@ QueueUserAPC(
     ULONG_PTR dwData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1218,7 +958,7 @@ QueueUserWorkItem(
     ULONG Flags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1238,7 +978,7 @@ ReadDirectoryChangesW(
     LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1255,7 +995,7 @@ ReadFileScatter(
     LPOVERLAPPED lpOverlapped
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1273,7 +1013,7 @@ RegisterWaitForSingleObject(
     ULONG dwFlags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1290,7 +1030,7 @@ RegisterWaitForSingleObjectEx(
     ULONG dwFlags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1303,7 +1043,7 @@ ReleaseActCtx(
     HANDLE hActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -1315,7 +1055,7 @@ RemoveVectoredExceptionHandler(
     PVOID VectoredHandlerHandle
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1328,7 +1068,7 @@ RequestDeviceWakeup(
     HANDLE hDevice
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1341,7 +1081,7 @@ RequestWakeupLatency(
     LATENCY_TIME latency
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1355,7 +1095,7 @@ ResetWriteWatch(
     SIZE_T dwRegionSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1368,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;
 }
 
 /*
@@ -1411,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;
 }
 
@@ -1438,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;
 }
 
@@ -1485,7 +1149,7 @@ TzSpecificLocalTimeToSystemTime(
     LPSYSTEMTIME lpUniversalTime
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1498,7 +1162,7 @@ UnregisterWait(
     HANDLE WaitHandle
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1512,7 +1176,7 @@ UnregisterWaitEx(
     HANDLE CompletionEvent
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1529,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;
 }
 
@@ -1553,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;
 }
 
@@ -1597,7 +1219,7 @@ DeleteVolumeMountPointW(
     LPCWSTR lpszVolumeMountPoint
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1612,7 +1234,7 @@ DnsHostnameToComputerNameW (
     LPDWORD nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1629,7 +1251,7 @@ FindActCtxSectionStringW(
     PACTCTX_SECTION_KEYED_DATA ReturnedData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1639,11 +1261,11 @@ FindActCtxSectionStringW(
 HANDLE
 STDCALL
 FindFirstVolumeW(
-    LPWSTR lpszVolumeName,
+    LPCWSTR lpszVolumeName,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1653,12 +1275,12 @@ FindFirstVolumeW(
 HANDLE
 STDCALL
 FindFirstVolumeMountPointW(
-    LPCWSTR lpszRootPathName,
+    LPWSTR lpszRootPathName,
     LPWSTR lpszVolumeMountPoint,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1673,7 +1295,7 @@ FindNextVolumeW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1688,7 +1310,7 @@ FindNextVolumeMountPointW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1702,7 +1324,7 @@ GetDllDirectoryW(
     LPWSTR lpBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1718,7 +1340,7 @@ GetFirmwareEnvironmentVariableW(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1733,7 +1355,7 @@ GetLongPathNameW(
     DWORD    cchBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1748,7 +1370,7 @@ GetModuleHandleExW(
     HMODULE*    phModule
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1762,7 +1384,7 @@ GetSystemWow64DirectoryW(
     UINT uSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1777,7 +1399,7 @@ GetVolumeNameForVolumeMountPointW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1792,7 +1414,7 @@ GetVolumePathNameW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1808,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;
 }
 
@@ -1841,7 +1448,7 @@ ReplaceFileW(
     LPVOID  lpReserved
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1855,7 +1462,7 @@ SetComputerNameExW (
     LPCWSTR lpBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1868,7 +1475,7 @@ SetDllDirectoryW(
     LPCWSTR lpPathName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1884,7 +1491,7 @@ SetFirmwareEnvironmentVariableW(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1898,7 +1505,7 @@ SetVolumeMountPointW(
     LPCWSTR lpszVolumeName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1913,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;
 }
 
@@ -1957,7 +1533,7 @@ DeleteVolumeMountPointA(
     LPCSTR lpszVolumeMountPoint
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1972,7 +1548,7 @@ DnsHostnameToComputerNameA (
     LPDWORD nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1989,7 +1565,7 @@ FindActCtxSectionStringA(
     PACTCTX_SECTION_KEYED_DATA ReturnedData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1999,11 +1575,11 @@ FindActCtxSectionStringA(
 HANDLE
 STDCALL
 FindFirstVolumeA(
-    LPSTR lpszVolumeName,
+    LPCSTR lpszVolumeName,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2013,12 +1589,12 @@ FindFirstVolumeA(
 HANDLE
 STDCALL
 FindFirstVolumeMountPointA(
-    LPCSTR lpszRootPathName,
+    LPSTR lpszRootPathName,
     LPSTR lpszVolumeMountPoint,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2029,11 +1605,11 @@ BOOL
 STDCALL
 FindNextVolumeA(
     HANDLE hFindVolume,
-    LPSTR lpszVolumeName,
+    LPCSTR lpszVolumeName,
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2048,7 +1624,7 @@ FindNextVolumeMountPointA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2062,7 +1638,7 @@ GetDllDirectoryA(
     LPSTR lpBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2078,7 +1654,7 @@ GetFirmwareEnvironmentVariableA(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2093,7 +1669,7 @@ GetLongPathNameA(
     DWORD    cchBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2108,7 +1684,7 @@ GetModuleHandleExA(
     HMODULE*    phModule
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2122,7 +1698,7 @@ GetSystemWow64DirectoryA(
     UINT uSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2137,7 +1713,7 @@ GetVolumeNameForVolumeMountPointA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2152,7 +1728,7 @@ GetVolumePathNameA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2168,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;
 }
 
@@ -2201,7 +1762,7 @@ ReplaceFileA(
     LPVOID  lpReserved
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2215,7 +1776,7 @@ SetComputerNameExA (
     LPCSTR lpBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2228,7 +1789,7 @@ SetDllDirectoryA(
     LPCSTR lpPathName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2244,7 +1805,7 @@ SetFirmwareEnvironmentVariableA(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2258,7 +1819,7 @@ SetVolumeMountPointA(
     LPCSTR lpszVolumeName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2273,7 +1834,7 @@ VerifyVersionInfoA(
     DWORDLONG dwlConditionMask
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2287,7 +1848,7 @@ EnumSystemLanguageGroupsW(
     DWORD                   dwFlags,
     LONG_PTR                lParam)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2302,7 +1863,7 @@ VerSetConditionMask(
         BYTE    Condition
         )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2311,7 +1872,7 @@ VerSetConditionMask(
  */
 BOOL STDCALL GetConsoleKeyboardLayoutNameA(LPSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2320,7 +1881,7 @@ BOOL STDCALL GetConsoleKeyboardLayoutNameA(LPSTR name)
  */
 BOOL STDCALL GetConsoleKeyboardLayoutNameW(LPWSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2329,7 +1890,7 @@ BOOL STDCALL GetConsoleKeyboardLayoutNameW(LPWSTR name)
  */
 DWORD STDCALL GetHandleContext(HANDLE hnd)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2338,7 +1899,7 @@ DWORD STDCALL GetHandleContext(HANDLE hnd)
  */
 HANDLE STDCALL CreateSocketHandle(VOID)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2347,7 +1908,7 @@ HANDLE STDCALL CreateSocketHandle(VOID)
  */
 BOOL STDCALL SetHandleContext(HANDLE hnd,DWORD context)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2356,7 +1917,7 @@ BOOL STDCALL SetHandleContext(HANDLE hnd,DWORD context)
  */
 BOOL STDCALL SetConsoleInputExeNameA(LPCSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2365,7 +1926,7 @@ BOOL STDCALL SetConsoleInputExeNameA(LPCSTR name)
  */
 BOOL STDCALL SetConsoleInputExeNameW(LPCWSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2377,7 +1938,7 @@ BOOL STDCALL UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
                         FARPROC *ppfn32Thunk, FARPROC pfnUT32CallBack,
                         LPVOID lpBuff )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2386,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;
 }
 
@@ -2403,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;
 }
 
@@ -2412,7 +1977,7 @@ NTSTATUS STDCALL CreateNlsSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescri
  */
 BOOL STDCALL GetConsoleInputExeNameA(ULONG length,LPCSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2421,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;
 }
 
@@ -2430,7 +1995,7 @@ BOOL STDCALL GetConsoleInputExeNameW(ULONG length,LPCWSTR name)
  */
 BOOL STDCALL IsValidUILanguage(LANGID langid)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2439,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;
 }
 
 /*
@@ -2447,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;
 }
 
@@ -2460,6 +2025,6 @@ SetClientTimeZoneInformation(
                       CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation
                       )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }