- don't return FALSE for system process changes

- SHUTDOWN_NORETRY is 1 and has to be in winbase.h
This commit is contained in:
Andreas Mohr 2000-08-21 20:17:56 +00:00 committed by Alexandre Julliard
parent 59dae22a43
commit d398aacfeb
2 changed files with 15 additions and 22 deletions

View File

@ -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

View File

@ -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_noretry = 0;
if (level > 0x100L && level < 0x3FFL)
shutdown_priority = level; 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)
* 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)
*/ */