Commit d398aacf authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard

- don't return FALSE for system process changes

- SHUTDOWN_NORETRY is 1 and has to be in winbase.h
parent 59dae22a
...@@ -247,6 +247,8 @@ typedef struct ...@@ -247,6 +247,8 @@ typedef struct
#define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF) #define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
#define SHUTDOWN_NORETRY 1
/* comm */ /* comm */
#define CBR_110 0xFF10 #define CBR_110 0xFF10
......
...@@ -1124,25 +1124,15 @@ BOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess,LPDWORD minset, ...@@ -1124,25 +1124,15 @@ BOOL WINAPI GetProcessWorkingSetSize(HANDLE hProcess,LPDWORD minset,
* *
* CHANGED - James Sutherland (JamesSutherland@gmx.de) * CHANGED - James Sutherland (JamesSutherland@gmx.de)
* Now tracks changes made (but does not act on these changes) * Now tracks changes made (but does not act on these changes)
* NOTE: the definition for SHUTDOWN_NORETRY was done on guesswork.
* It really shouldn't be here, but I'll move it when it's been checked!
*/ */
#define SHUTDOWN_NORETRY 1 static DWORD shutdown_flags = 0;
static unsigned int shutdown_noretry = 0; static DWORD shutdown_priority = 0x280;
static unsigned int shutdown_priority = 0x280L;
BOOL WINAPI SetProcessShutdownParameters(DWORD level,DWORD flags) BOOL WINAPI SetProcessShutdownParameters(DWORD level, DWORD flags)
{ {
if (flags & SHUTDOWN_NORETRY) FIXME("(%08lx, %08lx): partial stub.\n", level, flags);
shutdown_noretry = 1; shutdown_flags = flags;
else shutdown_priority = level;
shutdown_noretry = 0;
if (level > 0x100L && level < 0x3FFL)
shutdown_priority = level;
else
{
ERR("invalid priority level 0x%08lx\n", level);
return FALSE;
}
return TRUE; return TRUE;
} }
...@@ -1151,13 +1141,14 @@ BOOL WINAPI SetProcessShutdownParameters(DWORD level,DWORD flags) ...@@ -1151,13 +1141,14 @@ BOOL WINAPI SetProcessShutdownParameters(DWORD level,DWORD flags)
* GetProcessShutdownParameters (KERNEL32) * GetProcessShutdownParameters (KERNEL32)
* *
*/ */
BOOL WINAPI GetProcessShutdownParameters( LPDWORD lpdwLevel, BOOL WINAPI GetProcessShutdownParameters( LPDWORD lpdwLevel, LPDWORD lpdwFlags )
LPDWORD lpdwFlags )
{ {
(*lpdwLevel) = shutdown_priority; *lpdwLevel = shutdown_priority;
(*lpdwFlags) = (shutdown_noretry * SHUTDOWN_NORETRY); *lpdwFlags = shutdown_flags;
return TRUE; return TRUE;
} }
/*********************************************************************** /***********************************************************************
* SetProcessPriorityBoost (KERNEL32) * SetProcessPriorityBoost (KERNEL32)
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment