Implementation of GetVolumeNameForVolumeMountPointW (depends on mount manager, so...
[reactos.git] / reactos / lib / kernel32 / misc / stubs.c
index 583b63f..360bc51 100644 (file)
@@ -1,5 +1,4 @@
-/* $Id: stubs.c,v 1.93 2004/10/04 19:17:58 gvg Exp $
- *
+/*
  * KERNEL32.DLL stubs (STUB functions)
  * Remove from this file, if you implement them.
  */
@@ -75,80 +74,6 @@ CmdBatNotification (
 }
 
 
-/*
- * @unimplemented
- */
-int
-STDCALL
-CompareStringA (
-    LCID    Locale,
-    DWORD   dwCmpFlags,
-    LPCSTR  lpString1,
-    int cchCount1,
-    LPCSTR  lpString2,
-    int cchCount2
-    )
-{
-    STUB;
-    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: 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;
-}
-
-
 /*
  * @unimplemented
  */
@@ -269,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;
 }
 
 
@@ -411,39 +342,6 @@ VDMOperationStarted (
     return 0;
 }
 
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-VerLanguageNameA (
-    DWORD   wLang,
-    LPSTR   szLang,
-    DWORD   nSize
-    )
-{
-    STUB;
-    return 0;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-VerLanguageNameW (
-    DWORD   wLang,
-    LPWSTR  szLang,
-    DWORD   nSize
-    )
-{
-    STUB;
-    return 0;
-}
-
-
 /*
  * @unimplemented
  */
@@ -493,7 +391,7 @@ STDCALL
 AllocateUserPhysicalPages(
     HANDLE hProcess,
     PULONG_PTR NumberOfPages,
-    PULONG_PTR PageArray
+    PULONG_PTR UserPfnArray
     )
 {
     STUB;
@@ -528,20 +426,6 @@ CancelDeviceWakeupRequest(
     return 0;
 }
 
-
-/*
- * @unimplemented
- */
-HANDLE
-STDCALL
-CreateActCtxA(
-    PCACTCTXA pActCtx
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -552,7 +436,7 @@ CreateActCtxW(
     )
 {
     STUB;
-    return 0;
+    return INVALID_HANDLE_VALUE;
 }
 
 /*
@@ -667,17 +551,6 @@ GetDevicePowerState(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-VOID
-STDCALL
-GetNativeSystemInfo(
-    LPSYSTEM_INFO lpSystemInfo
-    )
-{
-    STUB;
-}
 
 /*
  * @unimplemented
@@ -720,20 +593,6 @@ GetNumaProcessorNode(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetThreadIOPendingFlag(
-    HANDLE hThread,
-    PBOOL lpIOIsPending
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -758,7 +617,7 @@ GetWriteWatch(
 BOOL
 STDCALL
 HeapQueryInformation (
-    HANDLE HeapHandle, 
+    HANDLE HeapHandle,
     HEAP_INFORMATION_CLASS HeapInformationClass,
     PVOID HeapInformation OPTIONAL,
     SIZE_T HeapInformationLength OPTIONAL,
@@ -775,7 +634,7 @@ HeapQueryInformation (
 BOOL
 STDCALL
 HeapSetInformation (
-    HANDLE HeapHandle, 
+    HANDLE HeapHandle,
     HEAP_INFORMATION_CLASS HeapInformationClass,
     PVOID HeapInformation OPTIONAL,
     SIZE_T HeapInformationLength OPTIONAL
@@ -809,7 +668,8 @@ IsWow64Process(
     )
 {
     STUB;
-    return 0;
+    *Wow64Process = FALSE;
+    return TRUE;
 }
 
 /*
@@ -820,7 +680,7 @@ STDCALL
 MapUserPhysicalPages(
     PVOID VirtualAddress,
     ULONG_PTR NumberOfPages,
-    PULONG_PTR PageArray OPTIONAL
+    PULONG_PTR PageArray  OPTIONAL
     )
 {
     STUB;
@@ -835,7 +695,7 @@ STDCALL
 MapUserPhysicalPagesScatter(
     PVOID *VirtualAddresses,
     ULONG_PTR NumberOfPages,
-    PULONG_PTR PageArray OPTIONAL
+    PULONG_PTR PageArray  OPTIONAL
     )
 {
     STUB;
@@ -861,21 +721,6 @@ QueryActCtxW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-QueueUserAPC(
-    PAPCFUNC pfnAPC,
-    HANDLE hThread,
-    ULONG_PTR dwData
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -891,25 +736,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
@@ -1181,7 +1009,7 @@ FindActCtxSectionStringW(
     )
 {
     STUB;
-    return 0;
+    return FALSE;
 }
 
 /*
@@ -1243,20 +1071,6 @@ FindNextVolumeMountPointW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetDllDirectoryW(
-    DWORD nBufferLength,
-    LPWSTR lpBuffer
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1273,20 +1087,7 @@ GetFirmwareEnvironmentVariableW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetLongPathNameW(
-    LPCWSTR lpszShortPath,
-    LPWSTR  lpszLongPath,
-    DWORD    cchBuffer
-    )
-{
-    STUB;
-    return 0;
-}
+
 
 /*
  * @unimplemented
@@ -1303,35 +1104,6 @@ GetModuleHandleExW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-UINT
-STDCALL
-GetSystemWow64DirectoryW(
-    LPWSTR lpBuffer,
-    UINT uSize
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-GetVolumeNameForVolumeMountPointW(
-    LPCWSTR lpszVolumeMountPoint,
-    LPWSTR lpszVolumeName,
-    DWORD cchBufferLength
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1381,33 +1153,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
  */
@@ -1438,21 +1183,6 @@ SetVolumeMountPointW(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-VerifyVersionInfoW(
-    LPOSVERSIONINFOEXW lpVersionInformation,
-    DWORD dwTypeMask,
-    DWORDLONG dwlConditionMask
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1481,23 +1211,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
  */
@@ -1557,20 +1270,6 @@ FindNextVolumeMountPointA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetDllDirectoryA(
-    DWORD nBufferLength,
-    LPSTR lpBuffer
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1587,20 +1286,7 @@ GetFirmwareEnvironmentVariableA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-DWORD
-STDCALL
-GetLongPathNameA(
-    LPCSTR lpszShortPath,
-    LPSTR  lpszLongPath,
-    DWORD    cchBuffer
-    )
-{
-    STUB;
-    return 0;
-}
+
 
 /*
  * @unimplemented
@@ -1617,20 +1303,6 @@ GetModuleHandleExA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-UINT
-STDCALL
-GetSystemWow64DirectoryA(
-    LPSTR lpBuffer,
-    UINT uSize
-    )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1695,33 +1367,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
  */
@@ -1752,50 +1397,6 @@ SetVolumeMountPointA(
     return 0;
 }
 
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-VerifyVersionInfoA(
-    LPOSVERSIONINFOEXA lpVersionInformation,
-    DWORD dwTypeMask,
-    DWORDLONG dwlConditionMask
-    )
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-EnumSystemLanguageGroupsW(
-    LANGUAGEGROUP_ENUMPROCW lpLanguageGroupEnumProc,
-    DWORD                   dwFlags,
-    LONG_PTR                lParam)
-{
-    STUB;
-    return 0;
-}
-
-/*
- * @unimplemented
- */
-ULONGLONG
-STDCALL
-VerSetConditionMask(
-        ULONGLONG   ConditionMask,
-        DWORD   TypeMask,
-        BYTE    Condition
-        )
-{
-    STUB;
-    return 0;
-}
-
 /*
  * @unimplemented
  */
@@ -1841,24 +1442,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
  */
@@ -1904,7 +1487,7 @@ NTSTATUS STDCALL CreateNlsSecurityDescriptor(PSECURITY_DESCRIPTOR SecurityDescri
 /*
  * @unimplemented
  */
-BOOL STDCALL GetConsoleInputExeNameA(ULONG length,LPCSTR name)
+BOOL STDCALL IsValidUILanguage(LANGID langid)
 {
     STUB;
     return 0;
@@ -1913,16 +1496,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;
@@ -1931,29 +1513,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;
 }