Jump to content
Sign in to follow this  
JScript

Call mode of dlls

Recommended Posts

JScript

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
Richard Robertson

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.

  • Like 1

Share this post


Link to post
Share on other sites
DatMCEyeBall

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
Richard Robertson

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.

  • Like 1

Share this post


Link to post
Share on other sites
jpm

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.