stormbreaker Posted April 15, 2012 Share Posted April 15, 2012 Hello everyone. I am currently working on implementing Bluetooth functions: http://msdn.microsoft.com/en-us/library/windows/desktop/ee844558(v=vs.85).aspx in my autoit script.The documentation says to use UCHAR for BluetoothIsVersionAvailable. I have tried UBYTE, UINT etc. but couldn't find UCHAR in Help file. I also checked Microsoft's typedef page, but no luck. Please help me to use UCHAR. Dllcall() returns @error = 1 or 3.Thank you. ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
Spiff59 Posted April 15, 2012 Share Posted April 15, 2012 A forum search on "unsigned char" turns up:Give that a try... Link to comment Share on other sites More sharing options...
stormbreaker Posted April 15, 2012 Author Share Posted April 15, 2012 Thank you for trying. But I have already tried that: $RESULT = DllCall("bthprops.cpl", "Bool", "BluetoothIsVersionAvailable", "Byte", 1, "Byte", 1) msgbox(64, "", $RESULT & @error) Using $RESULT[0] returns a 'Subscript used with non-array variable' error. ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
JFX Posted April 15, 2012 Share Posted April 15, 2012 @error = 1 or 3 should give you a hint. Either that file does not exist or your file doesn't have that function inside. btw: don't believe in msdn's : Minimum supported client Link to comment Share on other sites More sharing options...
stormbreaker Posted April 15, 2012 Author Share Posted April 15, 2012 (edited) But thats not the case with other functions inside the same file. For instance: $RESULT = DllCall("bthprops.cpl", "Bool", "BluetoothIsDiscoverable", "Handle", 0) msgbox(64, "", $RESULT[0]) this works like charm. I believe the problem here is with UCHAR. I can't use byte, ubyte, uint etc. instead of UCHAR. Could someone please explain how to use UCHAR typedef with DllCall? And JFX, you could check bthprops.cpl Exports with an Export Viewer such as PE-Explorer etc. It does contain this function. Thanx. Edited April 15, 2012 by MKISH ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
stormbreaker Posted April 15, 2012 Author Share Posted April 15, 2012 Thanx a lot for your help guys. I upgraded my PC to Win7 Pro since XP was corrupt. The functions work well here. And yes, using BYTE instead of UCHAR did help. Regards. ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 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