| |
|
|
| Hello Profaner...
which Rückmeldungen supply following View source XP??? CompileMarkSeparationDef @SetPriorityClass(2) !"KERNEL32","SetPriorityClass"
DEF @FormatMessage(7) !"KERNEL32","FormatMessageA"
DEf @GetLastError(0) !"KERNEL32","GetLastError"
Def @GetCurrentProcess(0) !"KERNEL32","GetCurrentProcess"
DEf @SetLastError(1) !"KERNEL32","SetLastError"
Def GetPriorityClass(1) !"KERNEL32","GetPriorityClass"
DEF SetThreadPriority(2) !"KERNEL32","SetThreadPriority"
DEF GetCurrentThread(0) !"KERNEL32","GetCurrentThread"
DEF GetThreadPriority(1) !"KERNEL32","GetThreadPriority"
Declare GETERROR_Buffer#,Fehler&,PHandle&,THandle&
PROC LastError
Parameters Rückgabe&
Declare GETERROR_Buffer$
DIM GETERROR_Buffer#,32000
@FormatMessage($1000,0,Rückgabe&,0,GETERROR_Buffer#,32000,0)
Let GETERROR_Buffer$=@STRING$(GETERROR_Buffer#,0)
Dispose GETERROR_Buffer#
Return GETERROR_Buffer$
Endproc
Windowstyle 31
Windowtitle "Priorität setzen"
Window 0,0-640,440
Addstring "Priorität des Prozesses="
ADDSTRING " Priorität vorher: "+@str$(GetPriorityClass(GetCurrentProcess()))
@SetLastError(0)
LET PHANDLE&=@GetCurrentProcess()
LET FEHLER&=@SetPriorityClass(PHANDLE&,$100)
LastError @GetLastError()
ADDSTRING " Rückmeldung SetPriorityClass: "+@STR$(Fehler&)
ADDSTRING " Priorität jetzt: "+@str$(GetPriorityClass(GetCurrentProcess()))
ADDSTRING " "+@$(0)
Addstring "Priorität des Threads="
ADDSTRING " Priorität vorher: "+@str$(GetThreadPriority(GetCurrentThread()))
@SetLastError(0)
LET THANDLE&=@GetCurrentThread()
LET FEHLER&=@SetThreadPriority(THANDLE&,$F)
LastError @GetLastError()
ADDSTRING " Rückmeldung SetThreadPriority: "+@STR$(Fehler&)
ADDSTRING " Priorität jetzt: "+@str$(GetThreadPriority(GetCurrentThread()))
ADDSTRING " "+@$(0)
@EDITBOX("Rückgaben",1)
While 0=0
Waitinput
Wend
PS: for the which not know -> code is because of Waitinput withal $100 with SetPriorityClass unbedenklich... I erhöhe here to all Things with SetPriorityClass The priority the current Prozeses and so too The Time, The one individual Process (really Thread) to that manage of Berechnungen available standing. there here Waitinput installed is and otherwise no activities erfolgen, becomes the Boost this Prozesses not increased and the system remaining steady. |
|
|
| |
|
|
|
Torsten Rümker | |
|
| Ich lerne, ob ich will oder nicht! Betriebssystem: - Ubuntu 15.x - Windows (diverse) XProfan Version: X2 | 10/08/05 ▲ |
|
|
|
|
| best Thanks Torsten, has helped - now see I klarer... |
|
|
| |
|
|
|
Michael Wodrich | |
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/08/05 ▲ |
|
|
|
|
| OK, what undokumentiertes: the privilege SeIncreaseBasePriority schränkt The API API SetPriorityClass one. SetPriorityClass is thereby not on The Aktivierung the Privilegs dependent, separate activate this self - it must means only present his. Fehlt the angesprochene privilege, can The REALTIME_PRIORITY_CLASS ($100) not give away go. becomes attempts these priority To give away, becomes The priority on the then highest worth ($80) HIGH_PRIORITY_CLASS staid. an feedback over evtl. not available rights results not.
These testimony is nirgendwo otherwise in the network documents, what about me wants hoping, that these place well aufgehoben and taken care of becomes!
declared SetThreadPriority becomes not by the privilege limited, though these API ditto to that settle the Base priority beiträgt! |
|
|
| |
|
|