- If MSDN says "BOOLEAN", let it be "BOOLEAN". Fixes build.
[reactos.git] / reactos / dll / win32 / kernel32 / misc / stubs.c
index 61cfaf4..c852f34 100644 (file)
@@ -153,26 +153,6 @@ GetNextVDMCommand (
 }
 
 
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetSystemPowerStatus (
-    LPSYSTEM_POWER_STATUS PowerStatus
-    )
-{
-    STUB;
-    PowerStatus->ACLineStatus = 1;
-    PowerStatus->BatteryFlag = 128;
-    PowerStatus->BatteryLifePercent = 255;
-    PowerStatus->Reserved1 = 0;
-    PowerStatus->BatteryLifeTime = -1;
-    PowerStatus->BatteryFullLifeTime = -1;
-    return TRUE;
-}
-
-
 /*
  * @unimplemented
  */
@@ -240,20 +220,6 @@ RegisterWowExec (
 }
 
 
-/*
- * @unimplemented
- */
-BOOL WINAPI
-SetSystemPowerState (
-    BOOL fSuspend,
-    BOOL fForce
-    )
-{
-    STUB;
-    return FALSE;
-}
-
-
 /*
  * @unimplemented
  */
@@ -326,21 +292,6 @@ VirtualBufferExceptionHandler (
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-AllocateUserPhysicalPages(
-    HANDLE hProcess,
-    PULONG_PTR NumberOfPages,
-    PULONG_PTR UserPfnArray
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @implemented
  */
@@ -367,19 +318,6 @@ BindIoCompletionCallback(HANDLE FileHandle,
     return TRUE;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-CancelDeviceWakeupRequest(
-    HANDLE hDevice
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -407,36 +345,6 @@ FindVolumeMountPointClose(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-FreeUserPhysicalPages(
-    HANDLE hProcess,
-    PULONG_PTR NumberOfPages,
-    PULONG_PTR PageArray
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetDevicePowerState(
-    HANDLE hDevice,
-    BOOL *pfOn
-    )
-{
-    STUB;
-    return 0;
-}
-
-
 /*
  * @unimplemented
  */
@@ -478,100 +386,6 @@ GetNumaProcessorNode(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-UINT
-WINAPI
-GetWriteWatch(
-    DWORD  dwFlags,
-    PVOID  lpBaseAddress,
-    SIZE_T dwRegionSize,
-    PVOID *lpAddresses,
-    PULONG_PTR lpdwCount,
-    PULONG lpdwGranularity
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-HeapQueryInformation (
-    HANDLE HeapHandle,
-    HEAP_INFORMATION_CLASS HeapInformationClass,
-    PVOID HeapInformation OPTIONAL,
-    SIZE_T HeapInformationLength OPTIONAL,
-    PSIZE_T ReturnLength OPTIONAL
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-HeapSetInformation (
-    HANDLE HeapHandle,
-    HEAP_INFORMATION_CLASS HeapInformationClass,
-    PVOID HeapInformation OPTIONAL,
-    SIZE_T HeapInformationLength OPTIONAL
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-IsSystemResumeAutomatic(
-    VOID
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-MapUserPhysicalPages(
-    PVOID VirtualAddress,
-    ULONG_PTR NumberOfPages,
-    PULONG_PTR PageArray  OPTIONAL
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-MapUserPhysicalPagesScatter(
-    PVOID *VirtualAddresses,
-    ULONG_PTR NumberOfPages,
-    PULONG_PTR PageArray  OPTIONAL
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @implemented
  */
@@ -614,59 +428,6 @@ ReadFileScatter(HANDLE hFile,
     return TRUE;
 }
 
-/*
- * @unimplemented
- */
-ULONG
-WINAPI
-RemoveVectoredExceptionHandler(
-    PVOID VectoredHandlerHandle
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-RequestDeviceWakeup(
-    HANDLE hDevice
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-RequestWakeupLatency(
-    LATENCY_TIME latency
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-UINT
-WINAPI
-ResetWriteWatch(
-    LPVOID lpBaseAddress,
-    SIZE_T dwRegionSize
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -679,40 +440,6 @@ RestoreLastError(
     STUB;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetMessageWaitingIndicator(
-    HANDLE hMsgIndicator,
-    ULONG ulMsgCount
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-EXECUTION_STATE
-WINAPI
-SetThreadExecutionState(
-    EXECUTION_STATE esFlags
-    )
-{
-    static EXECUTION_STATE current =
-        ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED | ES_USER_PRESENT;
-    EXECUTION_STATE old = current;
-
-    DPRINT1("(0x%x): stub, harmless.\n", esFlags);
-
-    if (!(current & ES_CONTINUOUS) || (esFlags & ES_CONTINUOUS))
-        current = esFlags;
-    return old;
-}
-
 /*
  * @implemented
  */
@@ -851,22 +578,6 @@ GetFirmwareEnvironmentVariableW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetVolumePathNameW(
-    LPCWSTR lpszFileName,
-    LPWSTR lpszVolumePathName,
-    DWORD cchBufferLength
-    )
-{
-    STUB;
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -883,24 +594,6 @@ GetVolumePathNamesForVolumeNameW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-ReplaceFileW(
-    LPCWSTR lpReplacedFileName,
-    LPCWSTR lpReplacementFileName,
-    LPCWSTR lpBackupFileName,
-    DWORD   dwReplaceFlags,
-    LPVOID  lpExclude,
-    LPVOID  lpReserved
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -968,9 +661,15 @@ FindNextVolumeA(HANDLE handle,
                 LPSTR volume,
                 DWORD len)
 {
-    WCHAR *buffer = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+    WCHAR *buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, len * sizeof(WCHAR));
     BOOL ret;
 
+    if (!buffer)
+    {
+        SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+        return FALSE;
+    }
+
     if ((ret = FindNextVolumeW( handle, buffer, len )))
     {
         if (!WideCharToMultiByte( CP_ACP, 0, buffer, -1, volume, len, NULL, NULL )) ret = FALSE;
@@ -1011,21 +710,6 @@ GetFirmwareEnvironmentVariableA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetVolumePathNameA(
-    LPCSTR lpszFileName,
-    LPSTR lpszVolumePathName,
-    DWORD cchBufferLength
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1042,24 +726,6 @@ GetVolumePathNamesForVolumeNameA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-ReplaceFileA(
-    LPCSTR  lpReplacedFileName,
-    LPCSTR  lpReplacementFileName,
-    LPCSTR  lpBackupFileName,
-    DWORD   dwReplaceFlags,
-    LPVOID  lpExclude,
-    LPVOID  lpReserved
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1123,7 +789,7 @@ DWORD WINAPI GetHandleContext(HANDLE hnd)
 HANDLE WINAPI CreateSocketHandle(VOID)
 {
     STUB;
-    return 0;
+    return INVALID_HANDLE_VALUE;
 }
 
 /*
@@ -1158,14 +824,10 @@ VOID WINAPI UTUnRegister( HMODULE hModule )
 /*
  * @unimplemented
  */
-#if 0
-FARPROC WINAPI DelayLoadFailureHook(unsigned int dliNotify, PDelayLoadInfo pdli)
-#else
-FARPROC WINAPI DelayLoadFailureHook(unsigned int dliNotify, PVOID pdli)
-#endif
+FARPROC WINAPI DelayLoadFailureHook(LPCSTR pszDllName, LPCSTR pszProcName)
 {
     STUB;
-    return 0;
+    return NULL;
 }
 
 /*
@@ -1223,9 +885,9 @@ NlsGetCacheUpdateCount(VOID)
     return 0;
 }
 
-BOOL
+BOOLEAN
 WINAPI
-Wow64EnableWow64FsRedirection (BOOL Wow64EnableWow64FsRedirection)
+Wow64EnableWow64FsRedirection (BOOLEAN Wow64EnableWow64FsRedirection)
 {
     STUB;
     return FALSE;
@@ -1332,8 +994,8 @@ GetProcessWorkingSetSizeEx(IN HANDLE hProcess,
 
 BOOL
 WINAPI
-GetLogicalProcessorInformation(OUT PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,
-                               IN OUT PDWORD ReturnLength)
+GetNumaAvailableMemoryNode(IN UCHAR Node,
+                           OUT PULONGLONG AvailableBytes)
 {
     STUB;
     return FALSE;
@@ -1341,22 +1003,259 @@ GetLogicalProcessorInformation(OUT PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer,
 
 BOOL
 WINAPI
-GetNumaAvailableMemoryNode(IN UCHAR Node,
-                           OUT PULONGLONG AvailableBytes)
+GetNumaAvailableMemory(PVOID lpInfo,
+                       ULONG Length,
+                       PULONG ReturnLength)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+GetNumaProcessorMap(PVOID lpInfo,
+                    ULONG Length,
+                    PULONG ReturnLength)
 {
     STUB;
     return FALSE;
 }
 
-BOOL WINAPI TermsrvAppInstallMode(void)
+BOOL
+WINAPI
+NlsResetProcessLocale(VOID)
+{
+    STUB;
+    return TRUE;
+}
+
+DWORD
+WINAPI
+AddLocalAlternateComputerNameA(LPSTR lpName, PNTSTATUS Status)
 {
-     STUB;
-     return FALSE;
+    STUB;
+    return 0;
 }
 
-DWORD WINAPI SetTermsrvAppInstallMode(BOOL bInstallMode)
+DWORD
+WINAPI
+AddLocalAlternateComputerNameW(LPWSTR lpName, PNTSTATUS Status)
 {
     STUB;
     return 0;
 }
 
+NTSTATUS
+WINAPI
+BaseCleanupAppcompatCache(VOID)
+{
+    STUB;
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS
+WINAPI
+BaseCleanupAppcompatCacheSupport(PVOID pUnknown)
+{
+    STUB;
+    return STATUS_NOT_IMPLEMENTED;
+}
+
+BOOL
+WINAPI
+BaseInitAppcompatCache(VOID)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+BaseInitAppcompatCacheSupport(VOID)
+{
+    STUB;
+    return FALSE;
+}
+
+VOID
+WINAPI
+CreateProcessInternalWSecure(VOID)
+{
+    STUB;
+}
+
+DWORD
+WINAPI
+EnumerateLocalComputerNamesA(PVOID pUnknown, DWORD Size, LPSTR lpBuffer, LPDWORD lpnSize)
+{
+    STUB;
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+DWORD
+WINAPI
+EnumerateLocalComputerNamesW(PVOID pUnknown, DWORD Size, LPWSTR lpBuffer, LPDWORD lpnSize)
+{
+    STUB;
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+PVOID
+WINAPI
+GetComPlusPackageInstallStatus(VOID)
+{
+    STUB;
+    return NULL;
+}
+
+BOOL
+WINAPI
+GetConsoleCharType(HANDLE hConsole, COORD Coord, PDWORD Type)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+GetConsoleCursorMode(HANDLE hConsole, PBOOL pUnknown1, PBOOL pUnknown2)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+GetConsoleNlsMode(HANDLE hConsole, LPDWORD lpMode)
+{
+    STUB;
+    return FALSE;
+}
+
+VOID
+WINAPI
+GetDefaultSortkeySize(LPVOID lpUnknown)
+{
+    STUB;
+    lpUnknown = NULL;
+}
+
+VOID
+WINAPI
+GetLinguistLangSize(LPVOID lpUnknown)
+{
+    STUB;
+    lpUnknown = NULL;
+}
+
+BOOL
+WINAPI
+OpenDataFile(HANDLE hFile, DWORD dwUnused)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+PrivMoveFileIdentityW(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+ReadConsoleInputExA(HANDLE hConsole, LPVOID lpBuffer, DWORD dwLen, LPDWORD Unknown1, DWORD Unknown2)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+ReadConsoleInputExW(HANDLE hConsole, LPVOID lpBuffer, DWORD dwLen, LPDWORD Unknown1, DWORD Unknown2)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+RegisterConsoleIME(HWND hWnd, LPDWORD ThreadId)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+RegisterConsoleOS2(BOOL bUnknown)
+{
+    STUB;
+    return FALSE;
+}
+
+DWORD
+WINAPI
+RemoveLocalAlternateComputerNameA(LPSTR lpName, DWORD Unknown)
+{
+    STUB;
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+DWORD
+WINAPI
+RemoveLocalAlternateComputerNameW(LPWSTR lpName, DWORD Unknown)
+{
+    STUB;
+    return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+BOOL
+WINAPI
+SetComPlusPackageInstallStatus(LPVOID lpInfo)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+SetConsoleCursorMode(HANDLE hConsole, BOOL Unknown1, BOOL Unknown2)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+SetConsoleLocalEUDC(DWORD Unknown1, DWORD Unknown2, DWORD Unknown3, DWORD Unknown4)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+SetConsoleNlsMode(HANDLE hConsole, DWORD dwMode)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+SetConsoleOS2OemFormat(BOOL bUnknown)
+{
+    STUB;
+    return FALSE;
+}
+
+BOOL
+WINAPI
+UnregisterConsoleIME(VOID)
+{
+    STUB;
+    return FALSE;
+}