E1M1 Posted July 4, 2010 Posted July 4, 2010 Codes are same _WinAPI_OpenProcess(0x001F0FFF, False, ProcessExists("game.exe")) C# m_lpHandle = Imports.OpenProcess(Imports.ProcessAccessFlags.All , false, pProcessId); where All = 0x001F0FFF and processID = Process.GetProcessesByName("game")[0].Id; If I run compiled C# exe as admin it returns handle. if I run compiled autoit as administrator,it gets error 5. edited
wolf9228 Posted July 4, 2010 Posted July 4, 2010 Codes are same _WinAPI_OpenProcess(0x001F0FFF, False, ProcessExists("game.exe")) C# m_lpHandle = Imports.OpenProcess(Imports.ProcessAccessFlags.All , false, pProcessId); where All = 0x001F0FFF and processID = Process.GetProcessesByName("game")[0].Id; If I run compiled C# exe as admin it returns handle. if I run compiled autoit as administrator,it gets error 5. #Include <WinAPI.au3> $SYNCHRONIZE = (0x00100000) $STANDARD_RIGHTS_REQUIRED = (0x000F0000) $PROCESS_ALL_ACCESS = ($STANDARD_RIGHTS_REQUIRED + $SYNCHRONIZE + 0xFFF) $iProcessID = Run(@WindowsDir & "\Notepad.exe", "", @SW_MAXIMIZE) WinWait("[CLASS:Notepad]") $Processhandle = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS,False, $iProcessID) MsgBox(0,"",$Processhandle) صرح السماء كان هنا
E1M1 Posted July 4, 2010 Author Posted July 4, 2010 following replacement makes it fail #Include <WinAPI.au3> $SYNCHRONIZE = (0x00100000) $STANDARD_RIGHTS_REQUIRED = (0x000F0000) $PROCESS_ALL_ACCESS = ($STANDARD_RIGHTS_REQUIRED + $SYNCHRONIZE + 0xFFF) $iProcessID = ProcessExists("Game.exe") WinWait("[CLASS:Notepad]") $Processhandle = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS,False, $iProcessID) MsgBox(0,"",$Processhandle) edited
Makaule Posted July 4, 2010 Posted July 4, 2010 i didn't test, but you could try use "[0xCode]", so it would look something like that: _WinAPI_OpenProcess("0x001F0FFF", False, ProcessExists("game.exe"))
wolf9228 Posted July 4, 2010 Posted July 4, 2010 (edited) following replacement makes it fail #Include <WinAPI.au3> $SYNCHRONIZE = (0x00100000) $STANDARD_RIGHTS_REQUIRED = (0x000F0000) $PROCESS_ALL_ACCESS = ($STANDARD_RIGHTS_REQUIRED + $SYNCHRONIZE + 0xFFF) $iProcessID = ProcessExists("Game.exe") WinWait("[CLASS:Notepad]") $Processhandle = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS,False, $iProcessID) MsgBox(0,"",$Processhandle) WinWait("[CLASS:Notepad]") #Include <WinAPI.au3> $SYNCHRONIZE = (0x00100000) $STANDARD_RIGHTS_REQUIRED = (0x000F0000) $PROCESS_ALL_ACCESS = ($STANDARD_RIGHTS_REQUIRED + $SYNCHRONIZE + 0xFFF) $iProcessID = ProcessExists("Game.exe") $Processhandle = _WinAPI_OpenProcess($PROCESS_ALL_ACCESS,False, $iProcessID) MsgBox(0,"",$Processhandle) Edited July 4, 2010 by wolf9228 صرح السماء كان هنا
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