Sign in to follow this  
Followers 0
JScript

Call mode of dlls

7 posts in this topic

I realized that some parameters of the dlls have changed, eg:

CreateDIBSection before:

DllCall('gdi32.dll', _
        'ptr', 'CreateDIBSection', _
        'hwnd', 0, _
        'ptr', DllStructGetPtr($tBITMAPINFO), _
        'uint', 0, _
        'ptr*', 0, _
        'ptr', 0, _
        'uint', 0)

After:

DllCall('gdi32.dll', _
        'handle', 'CreateDIBSection', _
        'handle', 0, _
        'struct*', $tBITMAPINFO, _
        'uint', 0, _
        'ptr*', 0, _
        'handle', 0, _
        'dword', 0)

Any particular reason for this? Although in both modes it works normally...

JS


http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites



Technically they are the same thing. Both are pointers to struct but one is explicitly labeled as a pointer to struct instead of just a pointer. At the business end, the pointer is just a number and works the same both ways.

1 person likes this

Share this post


Link to post
Share on other sites

Technically they are the same thing. Both are pointers to struct but one is explicitly labeled as a pointer to struct instead of just a pointer. At the business end, the pointer is just a number and works the same both ways.

So AutoIt externally references it's structs by pointers, or does it convert the internal "handle" into a real one?


"Just be fred, all we gotta do, just be fred."  -Vocaliod

"That is a Hadouken. A KAMEHAMEHA would have taken him 13 days and 54 episodes to form." - Roden Hoxha

@tabhooked

Clock made of cursors ♣ Desktop Widgets ♣ Water Simulation

Share this post


Link to post
Share on other sites

So AutoIt externally references it's structs by pointers, or does it convert the internal "handle" into a real one?

That is internal behavior and unimportant for you as an AutoIt user. I can't answer the question as AutoIt is closed source.

1 person likes this

Share this post


Link to post
Share on other sites

handle and ptr do the same just easy way to use them when MSDN API use one or the other.

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