better GetSystemPowerStatus stub
[reactos.git] / reactos / lib / kernel32 / misc / stubs.c
index 9b05378..f8e8f06 100644 (file)
@@ -1,5 +1,4 @@
-/* $Id: stubs.c,v 1.96 2004/12/04 19:28:47 weiden Exp $
- *
+/*
  * KERNEL32.DLL stubs (STUB functions)
  * Remove from this file, if you implement them.
  */
@@ -195,7 +194,13 @@ GetSystemPowerStatus (
     )
 {
     STUB;
-    return 0;
+    PowerStatus->ACLineStatus = 1;
+    PowerStatus->BatteryFlag = 128;
+    PowerStatus->BatteryLifePercent = 255;
+    PowerStatus->Reserved1 = 0;
+    PowerStatus->BatteryLifeTime = -1;
+    PowerStatus->BatteryFullLifeTime = -1;
+    return TRUE;
 }
 
 
@@ -454,20 +459,6 @@ CancelDeviceWakeupRequest(
     return 0;
 }
 
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-CreateActCtxA(
-    PCACTCTXA pActCtx
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -478,7 +469,7 @@ CreateActCtxW(
     )
 {
     STUB;
-    return 0;
+    return INVALID_HANDLE_VALUE;
 }
 
 /*
@@ -593,17 +584,6 @@ GetDevicePowerState(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-VOID
-STDCALL
-GetNativeSystemInfo(
-    LPSYSTEM_INFO lpSystemInfo
-    )
-{
-    STUB;
-}
 
 /*
  * @unimplemented
@@ -646,20 +626,6 @@ GetNumaProcessorNode(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetThreadIOPendingFlag(
-    HANDLE hThread,
-    PBOOL lpIOIsPending
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -684,7 +650,7 @@ GetWriteWatch(
 BOOL
 STDCALL
 HeapQueryInformation (
-    HANDLE HeapHandle, 
+    HANDLE HeapHandle,
     HEAP_INFORMATION_CLASS HeapInformationClass,
     PVOID HeapInformation OPTIONAL,
     SIZE_T HeapInformationLength OPTIONAL,
@@ -701,7 +667,7 @@ HeapQueryInformation (
 BOOL
 STDCALL
 HeapSetInformation (
-    HANDLE HeapHandle, 
+    HANDLE HeapHandle,
     HEAP_INFORMATION_CLASS HeapInformationClass,
     PVOID HeapInformation OPTIONAL,
     SIZE_T HeapInformationLength OPTIONAL
@@ -735,7 +701,8 @@ IsWow64Process(
     )
 {
     STUB;
-    return 0;
+    *Wow64Process = FALSE;
+    return TRUE;
 }
 
 /*
@@ -787,21 +754,6 @@ QueryActCtxW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-QueueUserAPC(
-    PAPCFUNC pfnAPC,
-    HANDLE hThread,
-    ULONG_PTR dwData
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -817,25 +769,8 @@ QueueUserWorkItem(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-ReadDirectoryChangesW(
-    HANDLE hDirectory,
-    LPVOID lpBuffer,
-    DWORD nBufferLength,
-    BOOL bWatchSubtree,
-    DWORD dwNotifyFilter,
-    LPDWORD lpBytesReturned,
-    LPOVERLAPPED lpOverlapped,
-    LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
-    )
-{
-    STUB;
-    return 0;
-}
+
+
 
 /*
  * @unimplemented
@@ -1107,7 +1042,7 @@ FindActCtxSectionStringW(
     )
 {
     STUB;
-    return 0;
+    return FALSE;
 }
 
 /*
@@ -1169,20 +1104,6 @@ FindNextVolumeMountPointW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetDllDirectoryW(
-    DWORD nBufferLength,
-    LPWSTR lpBuffer
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1199,20 +1120,7 @@ GetFirmwareEnvironmentVariableW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetLongPathNameW(
-    LPCWSTR lpszShortPath,
-    LPWSTR  lpszLongPath,
-    DWORD    cchBuffer
-    )
-{
-    STUB;
-    return 0;
-}
+
 
 /*
  * @unimplemented
@@ -1229,20 +1137,6 @@ GetModuleHandleExW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-UINT
-STDCALL
-GetSystemWow64DirectoryW(
-    LPWSTR lpBuffer,
-    UINT uSize
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1307,33 +1201,6 @@ ReplaceFileW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetComputerNameExW (
-    COMPUTER_NAME_FORMAT NameType,
-    LPCWSTR lpBuffer
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetDllDirectoryW(
-    LPCWSTR lpPathName
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1364,21 +1231,6 @@ SetVolumeMountPointW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-VerifyVersionInfoW(
-    LPOSVERSIONINFOEXW lpVersionInformation,
-    DWORD dwTypeMask,
-    DWORDLONG dwlConditionMask
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1407,23 +1259,6 @@ DnsHostnameToComputerNameA (
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-FindActCtxSectionStringA(
-    DWORD dwFlags,
-    const GUID *lpExtensionGuid,
-    ULONG ulSectionId,
-    LPCSTR lpStringToFind,
-    PACTCTX_SECTION_KEYED_DATA ReturnedData
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1483,20 +1318,6 @@ FindNextVolumeMountPointA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetDllDirectoryA(
-    DWORD nBufferLength,
-    LPSTR lpBuffer
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1513,20 +1334,7 @@ GetFirmwareEnvironmentVariableA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetLongPathNameA(
-    LPCSTR lpszShortPath,
-    LPSTR  lpszLongPath,
-    DWORD    cchBuffer
-    )
-{
-    STUB;
-    return 0;
-}
+
 
 /*
  * @unimplemented
@@ -1543,20 +1351,6 @@ GetModuleHandleExA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-UINT
-STDCALL
-GetSystemWow64DirectoryA(
-    LPSTR lpBuffer,
-    UINT uSize
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1621,33 +1415,6 @@ ReplaceFileA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetComputerNameExA (
-    COMPUTER_NAME_FORMAT NameType,
-    LPCSTR lpBuffer
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-SetDllDirectoryA(
-    LPCSTR lpPathName
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1678,36 +1445,6 @@ SetVolumeMountPointA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-VerifyVersionInfoA(
-    LPOSVERSIONINFOEXA lpVersionInformation,
-    DWORD dwTypeMask,
-    DWORDLONG dwlConditionMask
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-ULONGLONG
-STDCALL
-VerSetConditionMask(
-        ULONGLONG   ConditionMask,
-        DWORD   TypeMask,
-        BYTE    Condition
-        )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1753,24 +1490,6 @@ BOOL STDCALL SetHandleContext(HANDLE hnd,DWORD context)
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL STDCALL SetConsoleInputExeNameA(LPCSTR name)
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL STDCALL SetConsoleInputExeNameW(LPCWSTR name)
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1816,7 +1535,7 @@ NTSTATUS STDCALL CreateNlsSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescri
 /*
  * @unimplemented
  */
-BOOL STDCALL GetConsoleInputExeNameA(ULONG length,LPCSTR name)
+BOOL STDCALL IsValidUILanguage(LANGID langid)
 {
     STUB;
     return 0;
@@ -1825,16 +1544,15 @@ BOOL STDCALL GetConsoleInputExeNameA(ULONG length,LPCSTR name)
 /*
  * @unimplemented
  */
-BOOL STDCALL GetConsoleInputExeNameW(ULONG length,LPCWSTR name)
+VOID STDCALL NlsConvertIntegerToString(ULONG Value,ULONG Base,ULONG strsize, LPWSTR str, ULONG strsize2)
 {
     STUB;
-    return 0;
 }
 
 /*
  * @unimplemented
  */
-BOOL STDCALL IsValidUILanguage(LANGID langid)
+UINT STDCALL SetCPGlobal(UINT CodePage)
 {
     STUB;
     return 0;
@@ -1843,29 +1561,36 @@ BOOL STDCALL IsValidUILanguage(LANGID langid)
 /*
  * @unimplemented
  */
-VOID STDCALL NlsConvertIntegerToString(ULONG Value,ULONG Base,ULONG strsize, LPWSTR str, ULONG strsize2)
+BOOL
+STDCALL
+SetClientTimeZoneInformation(
+                      CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation
+                      )
 {
     STUB;
+    return 0;
 }
 
-/*
- * @unimplemented
- */
-UINT STDCALL SetCPGlobal(UINT CodePage)
+ULONG
+WINAPI
+NlsGetCacheUpdateCount(VOID)
 {
     STUB;
     return 0;
 }
 
-/*
- * @unimplemented
- */
 BOOL
 STDCALL
-SetClientTimeZoneInformation(
-                      CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation
-                      )
+Wow64DisableWow64FsRedirection (VOID ** pv)
 {
     STUB;
-    return 0;
+    return FALSE;
+}
+
+BOOL
+STDCALL
+Wow64RevertWow64FsRedirection (VOID * pv)
+{
+    STUB;
+    return FALSE;
 }