ericli03 Posted January 15, 2013 Share Posted January 15, 2013 (edited) Please help me!! USBUIRT.I need to use the Autoit call USBUIRT Dll.I used uuirtdrv.dll,But can't successfully.I read this article,but can't receiver data.$callR = DllCall($hdll, "UINT_PTR", "UUIRTGetDrvInfo" ,"UINT*",$vers)Use Code:$result = DllCall("uuirtdrv.dll", "str", " UUIRTSetReceiveCallback", "TimeCodeDiagram", 0, "DiagramLength", 0 )ConsoleWrite( $result )$result are blank,there should be IR Code.Found Call uuirtdrv.dll founction List:1.Receiver : UUIRTSetReceiveCallback2.Send : UUIRTTransmitIRAnd I Found Autohotkey USBUIRT Library,But I Just want use the Autoit!Please help.Thank! Edited January 15, 2013 by ericli03 Link to comment Share on other sites More sharing options...
JohnOne Posted January 15, 2013 Share Posted January 15, 2013 You have a link to the dll documentation? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ericli03 Posted January 15, 2013 Author Share Posted January 15, 2013 (edited) yes.And i try to use code is :$dll = dllopen("uuirtdrv.dll")while 1sleep(1000)$result = DllCall($dll, "str", "UUIRTSetReceiveCallback", "100", 0, "int", 0 )consolewrite($result[0]) or MessageBox(4096,"Test",$result[0])wendDllClose($dll)uuirtdrv.dll can see function1.Receiver : UUIRTSetReceiveCallback2.Send : UUIRTTransmitIRIn for loop , the value read is still blank .I would like to read the IR Code. Edited January 15, 2013 by ericli03 Link to comment Share on other sites More sharing options...
JohnOne Posted January 15, 2013 Share Posted January 15, 2013 You can post link to the dll documentation? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
funkey Posted January 15, 2013 Share Posted January 15, 2013 http://ccnicolas.free.fr/domotique/apiuirt.htm Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
ericli03 Posted January 16, 2013 Author Share Posted January 16, 2013 Thank funkey & John ! I want to use code is UUIRTSetReceiveCallback(HUUHANDLE hHandle, PUUCALLBACKPROC receiveProc, void *userData); UUIRTTransmitIR(HUUHANDLE hHandle, char *IRCode, int codeFormat, int repeatCount, int inactivityWaitTime, HANDLE hEvent, void *reserved0, void *reserved1); Or need to Transform? Link to comment Share on other sites More sharing options...
Mat Posted January 16, 2013 Share Posted January 16, 2013 $result = DllCall("uuirtdrv.dll", "str", " UUIRTSetReceiveCallback", "TimeCodeDiagram", 0, "DiagramLength", 0 )ConsoleWrite( $result )$result is an array AutoIt Project Listing Link to comment Share on other sites More sharing options...
ericli03 Posted January 16, 2013 Author Share Posted January 16, 2013 $result is an array Thanks!!But I used _ArrayDisplay($result) value is always 0. Link to comment Share on other sites More sharing options...
Mat Posted January 16, 2013 Share Posted January 16, 2013 And what is "TimeCodeDiagram"? AutoIt Project Listing Link to comment Share on other sites More sharing options...
ericli03 Posted January 16, 2013 Author Share Posted January 16, 2013 (edited) And what is "TimeCodeDiagram"?UUIRTSetReceiveCallback(HUUHANDLE hHandle, PUUCALLBACKPROC receiveProc, void *userData);Code Change:$result = DllCall("uuirtdrv.dll", "UINT", "UUIRTSetReceiveCallback" ,"UINT",$vers1,"UINT",$vers2,"UINT",$vers3)_ArrayDisplay($result)In Autohotkey ,they used receiver code isUSBUIRT_ReceiveIR() { hndl := DllCall("C:\Windows\System32\uuirtdrv.dllUUIRTOpen") getAirIrCodeAddress := RegisterCallback("USBUIRT_AirCode") DllCall("C:\Windows\System32\uuirtdrv.dllUUIRTSetReceiveCallback", UInt, hndl , UInt, getAirIrCodeAddress ; Address of received IR code. , Str, Userdata) ; This parameter is useful for carrying context information, etc. }USBUIRT_AirCode(IrEventStr,Userdata) { VarSetCapacity(IrCode, 12) DllCall("lstrcpy", Str, IrCode, UInt, irEventStr) ; Copy the string into the script's variable. VarSetCapacity(IrCode, -1) ; Update the variable's internally-stored length to reflect its new contents. If IsLabel(IRcode) GoSub, %IRcode% }Can be converted into Autoit ? Edited January 16, 2013 by ericli03 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