Sign in to follow this  
Followers 0
name15

help with function

6 posts in this topic

i am try use this dllcall () function

but it not work

$Handle = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", "PROCESS_ALL_ACCESS", "bool", "FALSE", "dword", @AutoItPID)
MsgBox(0,$Handle,$Handle&@LF&$Handle)

Share this post


Link to post
Share on other sites



"PROCESS_ALL_ACCESS" is a string not the required dword, you mistook a variable name for the actual value. "FALSE" is also a string not a bool type, you mistook it for the keyword False. And the return from a DllCall() is an array:

Global Const $PROCESS_ALL_ACCESS = 0x001F0FFF

$Handle = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $PROCESS_ALL_ACCESS, "bool", False, "dword", @AutoItPID)
MsgBox(64, "Handle", "Handle = " & $Handle[0])

Read the help file under DllCall() a few more times.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

thank

Share this post


Link to post
Share on other sites

how can i get PROCESS_ALL_ACCESS = 0x001F0FFF

Share this post


Link to post
Share on other sites

Have a look here.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

how can i get PROCESS_ALL_ACCESS = 0x001F0FFF

What do you mean by "get"? If you mean where did I find that value, either the forum search or Google should have turned it up.

:mellow:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
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
Sign in to follow this  
Followers 0