Jump to content
Sign in to follow this  
andd

using the DllCall()-function

Recommended Posts

andd

Hi,

although the most functions are predefined in AutoIt, I would like to test a few functions of the 'user32.dll' (and other *.dll's).

The use of the DllCall()-function seems not to be the problem, because it's explained in the AutoIt help and I got some examples from this forum.

My problems are to find the right parameters to call a function of 'user32.dll'. The 'depency-walker' tool gives me some information about function names and even the implementation from the msdn help, but I dont understand how to use it with AutoIt. :whistle:

E.g. the BlockInput function:

BOOL BlockInput(      

    BOOL fBlockIt
);
;taken from:
;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/blockinput.asp

...there is no boolean-type I can use with DllCall() :dance:

Have you some tricks (or tutorials) to handle the msdn help for AutoIt use?

The BlockInput function should only be an example, but I also tried some other functions where I got confused how to use the parameters...

Might be a silly question, but I am very new to using the 'windows-api' :-(

Share this post


Link to post
Share on other sites
w0uter

bool = int

see the syntax notes in the dev forum (sticky)

Minimum DLL Version user32.dll / Import library User32.lib

BOOL BlockInput(

BOOL fBlockIt

);

DllCall('user32.dll', 'int', 'BlockInput', 'int', $fBlockIt)

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites
andd

*omg*

This thread is exactly what I was looking for, but I didn't find it by using the search :whistle:

...anyway sorry for opening an extra thread and thanks for your help :dance:

Share this post


Link to post
Share on other sites
andd

It's me again :whistle:

Some functions need dword flags like e.g. SCRCOPY or AW_CENTER... in msdn-help I can't find the hexcode you use instead... where can I get a documentation?

Share this post


Link to post
Share on other sites
andd

Thx a lot, you help me coming forward again :whistle:

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  

×