jaberwacky Posted December 21, 2010 Share Posted December 21, 2010 (edited) 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 December 21, 2010 by jaberwocky6669 Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
trancexx Posted December 21, 2010 Share Posted December 21, 2010 It's related to pointer data type that AutoIt can't chew. That's being reported bug. Just use Number() on pointers, handles, etc... ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
jaberwacky Posted December 21, 2010 Author Share Posted December 21, 2010 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. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now