MSLx Fanboy Posted July 20, 2005 Posted July 20, 2005 I'm not too familiar with DLL calls, and I'm stuck on GetPriorityClass. I would like to get this working as soon as possible, as one of my programs trys to keep running at normal, but is very slow in that state.$process = ProcessList('mediaplayer.exe') MsgBox(0, 'test1', $process[1][1]) $return = DLLCall('kernel32.dll', 'int', 'GetPriorityClass', 'ptr', $process[1][1]) $getlast = DLLCall('kernel32.dll', 'int', 'GetLastError', 'void', '') MsgBox(0, 'test', $return & ' - ' & @error & @CRLF & $getlast) Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
MSLx Fanboy Posted July 20, 2005 Author Posted July 20, 2005 Thanks. I'll look into that. I got confused when I read that hwnd was for a window handle...or is that for handles in general? Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
MSLx Fanboy Posted July 20, 2005 Author Posted July 20, 2005 I get confused with handles too... sometimes they are INT sometimes they are HWND.here$PROCESS_QUERY_INFORMATION = 1024 $exe = 'svchost.exe' $process = ProcessList($exe) If $process[0][0] = 0 Then Exit $hwnd = DLLCall('kernel32.dll','hwnd','OpenProcess','int',$PROCESS_QUERY_INFORMATION,'int',0,'int',$process[1][1]) $return = DLLCall('kernel32.dll', 'int', 'GetPriorityClass', 'hwnd', $hwnd[0]) MsgBox(0, $exe, '0x' & Hex($return[0],8))<{POST_SNAPBACK}>Oh, thank you so much!! I was about to go about as bald as your avatar It was an int. I'll post it in a moment, I just have to make a few consts to tell what priority it is now without having to mess with pure hex Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now