English
Forum

Base priority and the privilege SeIncreaseBasePriorityPrivil

 
Hello Profaner...

which Rückmeldungen supply following View source XP???
CompileMarkSeparation
Def @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.
 
10/08/05  
 




Torsten
Rümker

CompileMarkSeparation
Windows XP per

I hope the helps
MfG
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...
 
10/08/05  
 




Michael
Wodrich
Selbes Result with XP Home
CompileMarkSeparation
Best wishes
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!
 
10/08/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.245 Views

Untitledvor 0 min.
E.T.11/10/11

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie