mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Fixed some warnings.
Added missing stubs. Implemented GetThreadPriotityBoost() and SetThreadPriorityBoost(). svn path=/trunk/; revision=4052
This commit is contained in:
parent
1eac255e7c
commit
834dbc5fd5
4 changed files with 223 additions and 166 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubs.c,v 1.43 2003/01/21 20:50:51 robd Exp $
|
||||
/* $Id: stubs.c,v 1.44 2003/01/22 02:23:48 ekohl Exp $
|
||||
*
|
||||
* KERNEL32.DLL stubs (unimplemented functions)
|
||||
* Remove from this file, if you implement them.
|
||||
|
@ -25,6 +25,14 @@ BaseAttachCompleteThunk (VOID)
|
|||
}
|
||||
|
||||
|
||||
BOOL STDCALL
|
||||
CancelIo(HANDLE hFile)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
CmdBatNotification (
|
||||
|
@ -593,32 +601,6 @@ GetThreadLocale (VOID)
|
|||
|
||||
#endif
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
GetThreadPriorityBoost (
|
||||
HANDLE hThread,
|
||||
DWORD dwSelector,
|
||||
LPLDT_ENTRY lpSelectorEntry
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
GetThreadSelectorEntry (
|
||||
HANDLE hThread,
|
||||
DWORD dwSelector,
|
||||
LPLDT_ENTRY lpSelectorEntry
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
STDCALL
|
||||
GetTimeFormatW (
|
||||
|
@ -870,6 +852,47 @@ SetComputerNameW (
|
|||
}
|
||||
|
||||
|
||||
#ifndef _OLE2NLS_IN_BUILD_
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetLocaleInfoA (
|
||||
LCID Locale,
|
||||
LCTYPE LCType,
|
||||
LPCSTR lpLCData
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetLocaleInfoW (
|
||||
LCID Locale,
|
||||
LCTYPE LCType,
|
||||
LPCWSTR lpLCData
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetThreadLocale (
|
||||
LCID Locale
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetSystemPowerState (
|
||||
|
@ -884,16 +907,8 @@ SetSystemPowerState (
|
|||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetThreadIdealProcessor(VOID)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetThreadPriorityBoost(VOID)
|
||||
SetThreadIdealProcessor(HANDLE hThread,
|
||||
DWORD dwIdealProcessor)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
|
@ -945,45 +960,9 @@ VDMOperationStarted (
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifndef _OLE2NLS_IN_BUILD_
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetLocaleInfoA (
|
||||
LCID Locale,
|
||||
LCTYPE LCType,
|
||||
LPCSTR lpLCData
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetLocaleInfoW (
|
||||
LCID Locale,
|
||||
LCTYPE LCType,
|
||||
LPCWSTR lpLCData
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
WINBOOL
|
||||
STDCALL
|
||||
SetThreadLocale (
|
||||
LCID Locale
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
DWORD
|
||||
STDCALL
|
||||
VerLanguageNameA (
|
||||
|
@ -1023,6 +1002,7 @@ VirtualBufferExceptionHandler (
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
GetFileAttributesExA(
|
||||
|
@ -1035,6 +1015,7 @@ GetFileAttributesExA(
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
GetFileAttributesExW(
|
||||
|
@ -1047,5 +1028,4 @@ GetFileAttributesExW(
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.60 2003/01/19 01:13:04 gvg Exp $
|
||||
/* $Id: create.c,v 1.61 2003/01/22 02:24:10 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -823,7 +823,7 @@ CreateProcessW(LPCWSTR lpApplicationName,
|
|||
|
||||
DPRINT("Launching VDM...\n");
|
||||
return CreateProcessW(L"ntvdm.exe",
|
||||
lpApplicationName,
|
||||
(LPWSTR)lpApplicationName,
|
||||
lpProcessAttributes,
|
||||
lpThreadAttributes,
|
||||
bInheritHandles,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: proc.c,v 1.50 2003/01/15 21:24:35 chorns Exp $
|
||||
/* $Id: proc.c,v 1.51 2003/01/22 02:24:10 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -27,12 +27,12 @@ LPSTARTUPINFO lpLocalStartupInfo = NULL;
|
|||
VOID STDCALL
|
||||
RegisterWaitForInputIdle(WaitForInputIdleType lpfnRegisterWaitForInputIdle);
|
||||
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
WINBOOL STDCALL
|
||||
GetProcessId (HANDLE hProcess, LPDWORD lpProcessId);
|
||||
|
||||
|
||||
/* FUNCTIONS ****************************************************************/
|
||||
|
||||
WINBOOL STDCALL
|
||||
GetProcessAffinityMask(HANDLE hProcess,
|
||||
LPDWORD lpProcessAffinityMask,
|
||||
|
@ -54,6 +54,14 @@ GetProcessAffinityMask(HANDLE hProcess,
|
|||
}
|
||||
|
||||
|
||||
BOOL STDCALL
|
||||
SetProcessAffinityMask(HANDLE hProcess,
|
||||
DWORD dwProcessAffinityMask)
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
WINBOOL STDCALL
|
||||
GetProcessShutdownParameters(LPDWORD lpdwLevel,
|
||||
LPDWORD lpdwFlags)
|
||||
|
@ -111,10 +119,26 @@ GetProcessWorkingSetSize(HANDLE hProcess,
|
|||
LPDWORD lpMinimumWorkingSetSize,
|
||||
LPDWORD lpMaximumWorkingSetSize)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
QUOTA_LIMITS QuotaLimits;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = NtQueryInformationProcess(hProcess,
|
||||
ProcessQuotaLimits,
|
||||
&QuotaLimits,
|
||||
sizeof(QUOTA_LIMITS),
|
||||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastErrorByStatus(Status);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
*lpMinimumWorkingSetSize = (DWORD)QuotaLimits.MinimumWorkingSetSize;
|
||||
*lpMaximumWorkingSetSize = (DWORD)QuotaLimits.MaximumWorkingSetSize;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
WINBOOL STDCALL
|
||||
SetProcessWorkingSetSize(HANDLE hProcess,
|
||||
|
@ -213,22 +237,24 @@ WINBOOL STDCALL
|
|||
GetProcessId(HANDLE hProcess,
|
||||
LPDWORD lpProcessId)
|
||||
{
|
||||
NTSTATUS errCode;
|
||||
PROCESS_BASIC_INFORMATION ProcessBasic;
|
||||
ULONG BytesWritten;
|
||||
NTSTATUS Status;
|
||||
|
||||
errCode = NtQueryInformationProcess(hProcess,
|
||||
Status = NtQueryInformationProcess(hProcess,
|
||||
ProcessBasicInformation,
|
||||
&ProcessBasic,
|
||||
sizeof(PROCESS_BASIC_INFORMATION),
|
||||
&BytesWritten);
|
||||
if (!NT_SUCCESS(errCode))
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastErrorByStatus (errCode);
|
||||
return FALSE;
|
||||
SetLastErrorByStatus(Status);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
memcpy(lpProcessId, &ProcessBasic.UniqueProcessId, sizeof(DWORD));
|
||||
return TRUE;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -690,12 +716,4 @@ GetProcessVersion (DWORD ProcessId)
|
|||
return (Version);
|
||||
}
|
||||
|
||||
|
||||
BOOL STDCALL
|
||||
SetProcessAffinityMask(HANDLE hProcess, DWORD dwProcessAffinityMask)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: thread.c,v 1.33 2003/01/15 21:24:36 chorns Exp $
|
||||
/* $Id: thread.c,v 1.34 2003/01/22 02:24:36 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -18,7 +18,7 @@
|
|||
#include <kernel32/kernel32.h>
|
||||
|
||||
|
||||
static VOID ThreadAttachDlls (VOID);
|
||||
//static VOID ThreadAttachDlls (VOID);
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
@ -258,7 +258,6 @@ GetCurrentThreadId(VOID)
|
|||
VOID STDCALL
|
||||
ExitThread(DWORD uExitCode)
|
||||
{
|
||||
NTSTATUS errCode;
|
||||
BOOLEAN LastThread;
|
||||
NTSTATUS Status;
|
||||
|
||||
|
@ -280,11 +279,11 @@ ExitThread(DWORD uExitCode)
|
|||
|
||||
LdrShutdownThread();
|
||||
|
||||
errCode = NtTerminateThread(NtCurrentThread(),
|
||||
Status = NtTerminateThread(NtCurrentThread(),
|
||||
uExitCode);
|
||||
if (!NT_SUCCESS(errCode))
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastErrorByStatus(errCode);
|
||||
SetLastErrorByStatus(Status);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -296,25 +295,27 @@ GetThreadTimes(HANDLE hThread,
|
|||
LPFILETIME lpKernelTime,
|
||||
LPFILETIME lpUserTime)
|
||||
{
|
||||
NTSTATUS errCode;
|
||||
KERNEL_USER_TIMES KernelUserTimes;
|
||||
ULONG ReturnLength;
|
||||
NTSTATUS Status;
|
||||
|
||||
errCode = NtQueryInformationThread(hThread,
|
||||
Status = NtQueryInformationThread(hThread,
|
||||
ThreadTimes,
|
||||
&KernelUserTimes,
|
||||
sizeof(KERNEL_USER_TIMES),
|
||||
&ReturnLength);
|
||||
if (!NT_SUCCESS(errCode))
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastErrorByStatus(errCode);
|
||||
return FALSE;
|
||||
SetLastErrorByStatus(Status);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
memcpy(lpCreationTime, &KernelUserTimes.CreateTime, sizeof(FILETIME));
|
||||
memcpy(lpExitTime, &KernelUserTimes.ExitTime, sizeof(FILETIME));
|
||||
memcpy(lpKernelTime, &KernelUserTimes.KernelTime, sizeof(FILETIME));
|
||||
memcpy(lpUserTime, &KernelUserTimes.UserTime, sizeof(FILETIME));
|
||||
return TRUE;
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -528,4 +529,62 @@ GetThreadPriority(HANDLE hThread)
|
|||
return(ThreadBasic.BasePriority);
|
||||
}
|
||||
|
||||
|
||||
WINBOOL STDCALL
|
||||
GetThreadPriorityBoost(IN HANDLE hThread,
|
||||
OUT PBOOL pDisablePriorityBoost)
|
||||
{
|
||||
ULONG PriorityBoost;
|
||||
ULONG DataWritten;
|
||||
NTSTATUS Status;
|
||||
|
||||
Status = NtQueryInformationThread(hThread,
|
||||
ThreadPriorityBoost,
|
||||
&PriorityBoost,
|
||||
sizeof(ULONG),
|
||||
&DataWritten);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastErrorByStatus(Status);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
*pDisablePriorityBoost = !((WINBOOL)PriorityBoost);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
WINBOOL STDCALL
|
||||
SetThreadPriorityBoost(IN HANDLE hThread,
|
||||
IN WINBOOL bDisablePriorityBoost)
|
||||
{
|
||||
ULONG PriorityBoost;
|
||||
NTSTATUS Status;
|
||||
|
||||
PriorityBoost = (ULONG)!bDisablePriorityBoost;
|
||||
|
||||
Status = NtSetInformationThread(hThread,
|
||||
ThreadPriorityBoost,
|
||||
&PriorityBoost,
|
||||
sizeof(ULONG));
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastErrorByStatus(Status);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
WINBOOL STDCALL
|
||||
GetThreadSelectorEntry(IN HANDLE hThread,
|
||||
IN DWORD dwSelector,
|
||||
OUT LPLDT_ENTRY lpSelectorEntry)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue