From 7313b78619236c1e89e58e57f757c1aa8962a146 Mon Sep 17 00:00:00 2001 From: James Juran Date: Tue, 13 Mar 2001 23:33:26 +0000 Subject: [PATCH] Added stub for SetThreadExecutionState (new function in Win98/2000). --- dlls/kernel/kernel32.spec | 1 + include/winbase.h | 1 + include/winnt.h | 1 + scheduler/thread.c | 12 ++++++++++++ 4 files changed, 15 insertions(+) diff --git a/dlls/kernel/kernel32.spec b/dlls/kernel/kernel32.spec index dcca881b3c6..1b2e2fb174f 100644 --- a/dlls/kernel/kernel32.spec +++ b/dlls/kernel/kernel32.spec @@ -951,6 +951,7 @@ debug_channels (comm debugstr dll int resource stress thunk toolhelp win32) @ stdcall PrivateLoadLibrary(str) PrivateLoadLibrary @ stdcall PrivateFreeLibrary(long) PrivateFreeLibrary @ stdcall Get16DLLAddress(long str) Get16DLLAddress +@ stdcall SetThreadExecutionState(long) SetThreadExecutionState # Windows 2000, Terminal Server 4.0 SP4 functions @ stdcall GetSystemWindowsDirectoryA(ptr long) GetSystemWindowsDirectoryA diff --git a/include/winbase.h b/include/winbase.h index 661f86cf555..9b8ac1c60b9 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1570,6 +1570,7 @@ DWORD WINAPI SetTapeParameters(HANDLE,DWORD,LPVOID); DWORD WINAPI SetTapePosition(HANDLE,DWORD,DWORD,DWORD,DWORD,BOOL); DWORD WINAPI SetThreadAffinityMask(HANDLE,DWORD); BOOL WINAPI SetThreadContext(HANDLE,const CONTEXT *); +DWORD WINAPI SetThreadExecutionState(EXECUTION_STATE); BOOL WINAPI SetThreadLocale(LCID); BOOL WINAPI SetThreadPriority(HANDLE,INT); BOOL WINAPI SetThreadPriorityBoost(HANDLE,BOOL); diff --git a/include/winnt.h b/include/winnt.h index a1428ce910b..fb430e1bc22 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -342,6 +342,7 @@ typedef LPCSTR PCTSTR, LPCTSTR; typedef LONG HRESULT; typedef DWORD LCID, *PLCID; typedef WORD LANGID; +typedef DWORD EXECUTION_STATE; /* Handle type */ diff --git a/scheduler/thread.c b/scheduler/thread.c index 65860882cc8..512d6e86994 100644 --- a/scheduler/thread.c +++ b/scheduler/thread.c @@ -755,6 +755,18 @@ BOOL WINAPI ProcessIdToSessionId( DWORD procid, DWORD *sessionid_ptr ) return TRUE; } +/*********************************************************************** + * SetThreadExecutionState (KERNEL32.@) + * + * Informs the system that activity is taking place for + * power management purposes. + */ +EXECUTION_STATE WINAPI SetThreadExecutionState(EXECUTION_STATE flags) +{ + FIXME("(%ld): stub\n", flags); + return 0; +} + #ifdef __i386__