better GetSystemPowerStatus stub
[reactos.git] / reactos / lib / kernel32 / misc / stubs.c
index da9ed59..f8e8f06 100644 (file)
@@ -1,6 +1,5 @@
-/* $Id: stubs.c,v 1.87 2004/09/22 09:31:01 weiden Exp $
- *
- * KERNEL32.DLL stubs (unimplemented functions)
+/*
+ * KERNEL32.DLL stubs (STUB functions)
  * Remove from this file, if you implement them.
  */
 
@@ -10,7 +9,9 @@
 #include "../include/debug.h"
 
 
-//#define _OLE2NLS_IN_BUILD_
+#define STUB \
+  SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
+  DPRINT1("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
 
 /*
  * @unimplemented
@@ -19,7 +20,7 @@ BOOL
 STDCALL
 BaseAttachCompleteThunk (VOID)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -29,7 +30,7 @@ BaseAttachCompleteThunk (VOID)
 VOID STDCALL
 BaseDumpAppcompatCache(VOID)
 {
-    DPRINT1("BaseDumpAppcompatCache: stub\n");
+    STUB;
 }
 
 /*
@@ -38,7 +39,7 @@ BaseDumpAppcompatCache(VOID)
 VOID STDCALL
 BaseFlushAppcompatCache(VOID)
 {
-    DPRINT1("BaseFlushAppcompatCache: stub\n");
+    STUB;
 }
 
 /*
@@ -47,7 +48,7 @@ BaseFlushAppcompatCache(VOID)
 VOID STDCALL
 BaseCheckAppcompatCache(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4)
 {
-    DPRINT1("BaseCheckAppcompatCache: stub\n");
+    STUB;
 }
 
 /*
@@ -56,7 +57,7 @@ BaseCheckAppcompatCache(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Un
 VOID STDCALL
 BaseUpdateAppcompatCache(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3)
 {
-    DPRINT1("BaseUpdateAppcompatCache: stub\n");
+    STUB;
 }
 
 /*
@@ -68,85 +69,11 @@ CmdBatNotification (
     DWORD   Unknown
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
 
-/*
- * @unimplemented
- */
-int
-STDCALL
-CompareStringA (
-    LCID    Locale,
-    DWORD   dwCmpFlags,
-    LPCSTR  lpString1,
-    int cchCount1,
-    LPCSTR  lpString2,
-    int cchCount2
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-CompareStringW (
-    LCID    Locale,
-    DWORD   dwCmpFlags,
-    LPCWSTR lpString1,
-    int cchCount1,
-    LPCWSTR lpString2,
-    int cchCount2
-    )
-{
-    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: Unimplemented 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;
-}
-
-
 /*
  * @unimplemented
  */
@@ -158,7 +85,7 @@ CreateVirtualBuffer (
     DWORD   Unknown2
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -173,7 +100,7 @@ ExitVDM (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -188,7 +115,7 @@ ExtendVirtualBuffer (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -206,7 +133,7 @@ FoldStringW (
     int cchDest
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -224,7 +151,7 @@ FoldStringA (
     int cchDest
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -238,15 +165,10 @@ FreeVirtualBuffer (
     HANDLE  hVirtualBuffer
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
-#ifndef _OLE2NLS_IN_BUILD_
-
-
-
-
 
 /*
  * @unimplemented
@@ -257,84 +179,11 @@ GetNextVDMCommand (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetStringTypeExW (
-    LCID    Locale,
-    DWORD   dwInfoType,
-    LPCWSTR lpSrcStr,
-    int cchSrc,
-    LPWORD  lpCharType
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetStringTypeExA (
-    LCID    Locale,
-    DWORD   dwInfoType,
-    LPCSTR  lpSrcStr,
-    int cchSrc,
-    LPWORD  lpCharType
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetStringTypeW (
-    DWORD   dwInfoType,
-    LPCWSTR lpSrcStr,
-    int cchSrc,
-    LPWORD  lpCharType
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetStringTypeA (
-    LCID    Locale,
-    DWORD   dwInfoType,
-    LPCSTR  lpSrcStr,
-    int cchSrc,
-    LPWORD  lpCharType
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return FALSE;
-}
-
-
-#endif
-
 /*
  * @unimplemented
  */
@@ -344,8 +193,14 @@ GetSystemPowerStatus (
     LPSYSTEM_POWER_STATUS PowerStatus
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+    STUB;
+    PowerStatus->ACLineStatus = 1;
+    PowerStatus->BatteryFlag = 128;
+    PowerStatus->BatteryLifePercent = 255;
+    PowerStatus->Reserved1 = 0;
+    PowerStatus->BatteryLifeTime = -1;
+    PowerStatus->BatteryFullLifeTime = -1;
+    return TRUE;
 }
 
 
@@ -359,7 +214,7 @@ GetVDMCurrentDirectories (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -383,7 +238,7 @@ RegisterConsoleVDM (
     DWORD   Unknown10
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -397,7 +252,7 @@ RegisterWowBaseHandlers (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -411,7 +266,7 @@ RegisterWowExec (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -425,7 +280,7 @@ SetSystemPowerState (
     BOOL fForce
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -440,7 +295,7 @@ SetVDMCurrentDirectories (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return FALSE;
 }
 
@@ -454,7 +309,7 @@ TrimVirtualBuffer (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -469,7 +324,7 @@ VDMConsoleOperation (
     DWORD   Unknown1
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -483,13 +338,11 @@ VDMOperationStarted (
     DWORD   Unknown0
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
 
-#ifndef _OLE2NLS_IN_BUILD_
-
 /*
  * @unimplemented
  */
@@ -501,7 +354,7 @@ VerLanguageNameA (
     DWORD   nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -517,11 +370,10 @@ VerLanguageNameW (
     DWORD   nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
-#endif
 
 /*
  * @unimplemented
@@ -534,7 +386,7 @@ VirtualBufferExceptionHandler (
     DWORD   Unknown2
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -548,7 +400,7 @@ ActivateActCtx(
     ULONG_PTR *lpCookie
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -561,7 +413,7 @@ AddRefActCtx(
     HANDLE hActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -572,24 +424,10 @@ STDCALL
 AllocateUserPhysicalPages(
     HANDLE hProcess,
     PULONG_PTR NumberOfPages,
-    PULONG_PTR PageArray
+    PULONG_PTR UserPfnArray
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-AssignProcessToJobObject(
-    HANDLE hJob,
-    HANDLE hProcess
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -604,7 +442,7 @@ BindIoCompletionCallback (
     ULONG Flags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -617,21 +455,7 @@ CancelDeviceWakeupRequest(
     HANDLE hDevice
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-CreateActCtxA(
-    PCACTCTXA pActCtx
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -644,8 +468,8 @@ CreateActCtxW(
     PCACTCTXW pActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+    STUB;
+    return INVALID_HANDLE_VALUE;
 }
 
 /*
@@ -658,7 +482,7 @@ CreateJobSet (
     PJOB_SET_ARRAY UserJobSet,
     ULONG Flags)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -672,8 +496,7 @@ DeactivateActCtx(
     ULONG_PTR ulCookie
     )
 {
-    DbgPrint("DeactivateActCtx: stub\n");
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -690,7 +513,7 @@ FindActCtxSectionGuid(
     PACTCTX_SECTION_KEYED_DATA ReturnedData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -703,7 +526,7 @@ FindVolumeClose(
     HANDLE hFindVolume
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -716,7 +539,7 @@ FindVolumeMountPointClose(
     HANDLE hFindVolumeMountPoint
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -731,7 +554,7 @@ FreeUserPhysicalPages(
     PULONG_PTR PageArray
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -743,7 +566,7 @@ STDCALL
 GetCurrentActCtx(
     HANDLE *lphActCtx)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -757,21 +580,10 @@ GetDevicePowerState(
     BOOL *pfOn
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
-/*
- * @unimplemented
- */
-VOID
-STDCALL
-GetNativeSystemInfo(
-    LPSYSTEM_INFO lpSystemInfo
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-}
 
 /*
  * @unimplemented
@@ -782,7 +594,7 @@ GetNumaHighestNodeNumber(
     PULONG HighestNodeNumber
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -796,7 +608,7 @@ GetNumaNodeProcessorMask(
     PULONGLONG ProcessorMask
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -810,21 +622,7 @@ GetNumaProcessorNode(
     PUCHAR NodeNumber
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetThreadIOPendingFlag(
-    HANDLE hThread,
-    PBOOL lpIOIsPending
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -842,7 +640,7 @@ GetWriteWatch(
     PULONG lpdwGranularity
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -852,14 +650,14 @@ GetWriteWatch(
 BOOL
 STDCALL
 HeapQueryInformation (
-    HANDLE HeapHandle, 
+    HANDLE HeapHandle,
     HEAP_INFORMATION_CLASS HeapInformationClass,
     PVOID HeapInformation OPTIONAL,
     SIZE_T HeapInformationLength OPTIONAL,
     PSIZE_T ReturnLength OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -869,28 +667,13 @@ HeapQueryInformation (
 BOOL
 STDCALL
 HeapSetInformation (
-    HANDLE HeapHandle, 
+    HANDLE HeapHandle,
     HEAP_INFORMATION_CLASS HeapInformationClass,
     PVOID HeapInformation OPTIONAL,
     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;
 }
 
@@ -903,7 +686,7 @@ IsSystemResumeAutomatic(
     VOID
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -917,8 +700,9 @@ IsWow64Process(
     PBOOL Wow64Process
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+    STUB;
+    *Wow64Process = FALSE;
+    return TRUE;
 }
 
 /*
@@ -929,10 +713,10 @@ STDCALL
 MapUserPhysicalPages(
     PVOID VirtualAddress,
     ULONG_PTR NumberOfPages,
-    PULONG_PTR PageArray OPTIONAL
+    PULONG_PTR PageArray  OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -944,10 +728,10 @@ STDCALL
 MapUserPhysicalPagesScatter(
     PVOID *VirtualAddresses,
     ULONG_PTR NumberOfPages,
-    PULONG_PTR PageArray OPTIONAL
+    PULONG_PTR PageArray  OPTIONAL
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -966,39 +750,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
- */
-DWORD
-STDCALL
-QueueUserAPC(
-    PAPCFUNC pfnAPC,
-    HANDLE hThread,
-    ULONG_PTR dwData
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1013,29 +765,12 @@ QueueUserWorkItem(
     ULONG Flags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-ReadDirectoryChangesW(
-    HANDLE hDirectory,
-    LPVOID lpBuffer,
-    DWORD nBufferLength,
-    BOOL bWatchSubtree,
-    DWORD dwNotifyFilter,
-    LPDWORD lpBytesReturned,
-    LPOVERLAPPED lpOverlapped,
-    LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
+
+
 
 /*
  * @unimplemented
@@ -1050,7 +785,7 @@ ReadFileScatter(
     LPOVERLAPPED lpOverlapped
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1068,7 +803,7 @@ RegisterWaitForSingleObject(
     ULONG dwFlags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1085,7 +820,7 @@ RegisterWaitForSingleObjectEx(
     ULONG dwFlags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1098,7 +833,7 @@ ReleaseActCtx(
     HANDLE hActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -1110,7 +845,7 @@ RemoveVectoredExceptionHandler(
     PVOID VectoredHandlerHandle
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1123,7 +858,7 @@ RequestDeviceWakeup(
     HANDLE hDevice
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1136,7 +871,7 @@ RequestWakeupLatency(
     LATENCY_TIME latency
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1150,7 +885,7 @@ ResetWriteWatch(
     SIZE_T dwRegionSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1163,24 +898,7 @@ RestoreLastError(
     DWORD dwErrCode
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetInformationJobObject(
-    HANDLE hJob,
-    JOBOBJECTINFOCLASS JobObjectInformationClass,
-    LPVOID lpJobObjectInformation,
-    DWORD cbJobObjectInformationLength
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+    STUB;
 }
 
 /*
@@ -1193,7 +911,7 @@ SetMessageWaitingIndicator(
     ULONG ulMsgCount
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1206,21 +924,7 @@ SetThreadExecutionState(
     EXECUTION_STATE esFlags
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-TerminateJobObject(
-    HANDLE hJob,
-    UINT uExitCode
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1235,7 +939,7 @@ TzSpecificLocalTimeToSystemTime(
     LPSYSTEMTIME lpUniversalTime
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1248,7 +952,7 @@ UnregisterWait(
     HANDLE WaitHandle
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1262,7 +966,7 @@ UnregisterWaitEx(
     HANDLE CompletionEvent
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1279,18 +983,7 @@ WriteFileGather(
     LPOVERLAPPED lpOverlapped
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-WTSGetActiveConsoleSessionId(VOID)
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1303,21 +996,7 @@ ZombifyActCtx(
     HANDLE hActCtx
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-CreateJobObjectW(
-    LPSECURITY_ATTRIBUTES lpJobAttributes,
-    LPCWSTR lpName
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1330,7 +1009,7 @@ DeleteVolumeMountPointW(
     LPCWSTR lpszVolumeMountPoint
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1345,7 +1024,7 @@ DnsHostnameToComputerNameW (
     LPDWORD nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1362,8 +1041,8 @@ FindActCtxSectionStringW(
     PACTCTX_SECTION_KEYED_DATA ReturnedData
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
+    STUB;
+    return FALSE;
 }
 
 /*
@@ -1376,7 +1055,7 @@ FindFirstVolumeW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1391,7 +1070,7 @@ FindFirstVolumeMountPointW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1406,7 +1085,7 @@ FindNextVolumeW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1421,21 +1100,7 @@ FindNextVolumeMountPointW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetDllDirectoryW(
-    DWORD nBufferLength,
-    LPWSTR lpBuffer
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1451,24 +1116,11 @@ GetFirmwareEnvironmentVariableW(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetLongPathNameW(
-    LPCWSTR lpszShortPath,
-    LPWSTR  lpszLongPath,
-    DWORD    cchBuffer
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
+
 
 /*
  * @unimplemented
@@ -1481,21 +1133,7 @@ GetModuleHandleExW(
     HMODULE*    phModule
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-UINT
-STDCALL
-GetSystemWow64DirectoryW(
-    LPWSTR lpBuffer,
-    UINT uSize
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1510,7 +1148,7 @@ GetVolumeNameForVolumeMountPointW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1525,7 +1163,7 @@ GetVolumePathNameW(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1541,22 +1179,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;
 }
 
@@ -1574,34 +1197,7 @@ ReplaceFileW(
     LPVOID  lpReserved
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetComputerNameExW (
-    COMPUTER_NAME_FORMAT NameType,
-    LPCWSTR lpBuffer
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetDllDirectoryW(
-    LPCWSTR lpPathName
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1617,7 +1213,7 @@ SetFirmwareEnvironmentVariableW(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1631,36 +1227,7 @@ SetVolumeMountPointW(
     LPCWSTR lpszVolumeName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-VerifyVersionInfoW(
-    LPOSVERSIONINFOEXW lpVersionInformation,
-    DWORD dwTypeMask,
-    DWORDLONG dwlConditionMask
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-CreateJobObjectA(
-    LPSECURITY_ATTRIBUTES lpJobAttributes,
-    LPCSTR lpName
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1673,7 +1240,7 @@ DeleteVolumeMountPointA(
     LPCSTR lpszVolumeMountPoint
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1688,24 +1255,7 @@ DnsHostnameToComputerNameA (
     LPDWORD nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-FindActCtxSectionStringA(
-    DWORD dwFlags,
-    const GUID *lpExtensionGuid,
-    ULONG ulSectionId,
-    LPCSTR lpStringToFind,
-    PACTCTX_SECTION_KEYED_DATA ReturnedData
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1719,7 +1269,7 @@ FindFirstVolumeA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1734,7 +1284,7 @@ FindFirstVolumeMountPointA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1749,7 +1299,7 @@ FindNextVolumeA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1764,21 +1314,7 @@ FindNextVolumeMountPointA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetDllDirectoryA(
-    DWORD nBufferLength,
-    LPSTR lpBuffer
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1794,24 +1330,11 @@ GetFirmwareEnvironmentVariableA(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetLongPathNameA(
-    LPCSTR lpszShortPath,
-    LPSTR  lpszLongPath,
-    DWORD    cchBuffer
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
+
 
 /*
  * @unimplemented
@@ -1824,21 +1347,7 @@ GetModuleHandleExA(
     HMODULE*    phModule
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-UINT
-STDCALL
-GetSystemWow64DirectoryA(
-    LPSTR lpBuffer,
-    UINT uSize
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1853,7 +1362,7 @@ GetVolumeNameForVolumeMountPointA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1868,7 +1377,7 @@ GetVolumePathNameA(
     DWORD cchBufferLength
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1884,22 +1393,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;
 }
 
@@ -1917,34 +1411,7 @@ ReplaceFileA(
     LPVOID  lpReserved
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetComputerNameExA (
-    COMPUTER_NAME_FORMAT NameType,
-    LPCSTR lpBuffer
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetDllDirectoryA(
-    LPCSTR lpPathName
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1960,7 +1427,7 @@ SetFirmwareEnvironmentVariableA(
     DWORD    nSize
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -1974,51 +1441,7 @@ SetVolumeMountPointA(
     LPCSTR lpszVolumeName
     )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-VerifyVersionInfoA(
-    LPOSVERSIONINFOEXA lpVersionInformation,
-    DWORD dwTypeMask,
-    DWORDLONG dwlConditionMask
-    )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-EnumSystemLanguageGroupsW(
-    LANGUAGEGROUP_ENUMPROCW lpLanguageGroupEnumProc,
-    DWORD                   dwFlags,
-    LONG_PTR                lParam)
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-ULONGLONG
-STDCALL
-VerSetConditionMask(
-        ULONGLONG   ConditionMask,
-        DWORD   TypeMask,
-        BYTE    Condition
-        )
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2027,7 +1450,7 @@ VerSetConditionMask(
  */
 BOOL STDCALL GetConsoleKeyboardLayoutNameA(LPSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2036,7 +1459,7 @@ BOOL STDCALL GetConsoleKeyboardLayoutNameA(LPSTR name)
  */
 BOOL STDCALL GetConsoleKeyboardLayoutNameW(LPWSTR name)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2045,7 +1468,7 @@ BOOL STDCALL GetConsoleKeyboardLayoutNameW(LPWSTR name)
  */
 DWORD STDCALL GetHandleContext(HANDLE hnd)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2054,7 +1477,7 @@ DWORD STDCALL GetHandleContext(HANDLE hnd)
  */
 HANDLE STDCALL CreateSocketHandle(VOID)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2063,25 +1486,7 @@ HANDLE STDCALL CreateSocketHandle(VOID)
  */
 BOOL STDCALL SetHandleContext(HANDLE hnd,DWORD context)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL SetConsoleInputExeNameA(LPCSTR name)
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL SetConsoleInputExeNameW(LPCWSTR name)
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2093,7 +1498,7 @@ BOOL STDCALL UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
                         FARPROC *ppfn32Thunk, FARPROC pfnUT32CallBack,
                         LPVOID lpBuff )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2102,7 +1507,7 @@ BOOL STDCALL UTRegister( HMODULE hModule, LPSTR lpsz16BITDLL,
  */
 VOID STDCALL UTUnRegister( HMODULE hModule )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
 }
 
 /*
@@ -2114,7 +1519,7 @@ FARPROC STDCALL DelayLoadFailureHook(unsigned int dliNotify, PDelayLoadInfo pdli
 FARPROC STDCALL DelayLoadFailureHook(unsigned int dliNotify, PVOID pdli)
 #endif
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2123,25 +1528,7 @@ FARPROC STDCALL DelayLoadFailureHook(unsigned int dliNotify, PVOID pdli)
  */
 NTSTATUS STDCALL CreateNlsSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescriptor,ULONG Size,ULONG AccessMask)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL GetConsoleInputExeNameA(ULONG length,LPCSTR name)
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL GetConsoleInputExeNameW(ULONG length,LPCWSTR name)
-{
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2150,7 +1537,7 @@ BOOL STDCALL GetConsoleInputExeNameW(ULONG length,LPCWSTR name)
  */
 BOOL STDCALL IsValidUILanguage(LANGID langid)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2159,7 +1546,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;
 }
 
 /*
@@ -2167,7 +1554,7 @@ VOID STDCALL NlsConvertIntegerToString(ULONG Value,ULONG Base,ULONG strsize, LPW
  */
 UINT STDCALL SetCPGlobal(UINT CodePage)
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
 
@@ -2180,6 +1567,30 @@ SetClientTimeZoneInformation(
                       CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation
                       )
 {
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    STUB;
     return 0;
 }
+
+ULONG
+WINAPI
+NlsGetCacheUpdateCount(VOID)
+{
+    STUB;
+    return 0;
+}
+
+BOOL
+STDCALL
+Wow64DisableWow64FsRedirection (VOID ** pv)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+STDCALL
+Wow64RevertWow64FsRedirection (VOID * pv)
+{
+    STUB;
+    return FALSE;
+}