Jump to content

Need some help with OpenProcess DllCall


Recommended Posts

Hello, i am trying to get a process handle by using the OpenProcess API, but it is always equal to 260 regardless of the different process ID that i use. Is there something wrong with this code ?

$PROCESS_ALL_ACCESS = 0x1F0FFF

$PID = ProcessExists("Icq.exe")

$PHandle = DllCall("Kernel32.dll", "long", "OpenProcess", "int", PROCESS_ALL_ACCESS, "int", 0, "int", $PID)

can someone tell me why $PHandle[0] is always equal to 260 ?

Link to comment
Share on other sites

Hello, i am trying to get a process handle by using the OpenProcess API, but it is always equal to 260 regardless of the different process ID that i use. Is there something wrong with this code ?

  $PROCESS_ALL_ACCESS = 0x1F0FFF

  $PID = ProcessExists("Icq.exe")

  $PHandle = DllCall("Kernel32.dll", "long", "OpenProcess", "int", PROCESS_ALL_ACCESS, "int", 0, "int", $PID)

can someone tell me why $PHandle[0] is always equal to 260 ?

<{POST_SNAPBACK}>

Maybe a typo with PROCESS_ALL_ACCESS in DLLCALL shouldn't it be $PROCESS_ALL_ACCESS ?

$PHandle = DllCall("Kernel32.dll", "long", "OpenProcess", "int", $PROCESS_ALL_ACCESS, "int", 0, "int", $PID)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...