Jump to content

_AutoItObject_DllOpen()


Recommended Posts

I'm trying to use _AutoItObject_DllOpen() but I get the aforementioned error. Here is a short section of code that should highlight what I'm trying to do. I don't think I'm making any syntax errors. Does anyone see the error?

Here is the MSDN entry for the function:

HDEVNOTIFY WINAPI RegisterDeviceNotification(

__in HANDLE hRecipient,

__in LPVOID NotificationFilter,

__in DWORD Flags

);

;this gives me this error: Conversion of parameters failed.

#include "AutoItObject.au3"

_AutoItObject_StartUp()

Global $oUser32 = _AutoItObject_DllOpen("User32.dll", "RegisterDeviceNotificationW handle(handle;ptr;dword);")

;this didn't work:
;Global $oUser32 = _AutoItObject_DllOpen("User32.dll", "RegisterDeviceNotificationW hdevnotify(handle;lpvoid;dword);")

Global $RDNHandle = $oUser32.RegisterDeviceNotificationW($hRecipient, $pNotificationFilter, $Flags)

;this gives me the error message: "bound to unknown type"

_AutoItObject_StartUp()

Global $oUser32 = _AutoItObject_DllOpen("User32.dll")

Global $RDNHandle = $oUser32.RegisterDeviceNotificationW("handle", "handle", $hRecipient, "ptr", $pNotificationFilter, "dword", $Flags)

Edit** Can I use $oUser32 from within a function?

Edited by jaberwocky6669
Link to comment
Share on other sites

It's related to pointer data type that AutoIt can't chew. That's being reported bug. Just use Number() on pointers, handles, etc...

Oh right! I forgot all about using number. Thanks once again trancexx, you jewel.

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...