Sign in to follow this  
Followers 0
ericli03

HELP!! CallDLL usbuirt!

10 posts in this topic

#1 ·  Posted (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 : UUIRTSetReceiveCallback

2.Send : UUIRTTransmitIR

And I Found Autohotkey USBUIRT Library,But I Just want use the Autoit!

Please help.

Thank!

Edited by ericli03

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

yes.

And i try to use code is :

$dll = dllopen("uuirtdrv.dll")

while 1

sleep(1000)

$result = DllCall($dll, "str", "UUIRTSetReceiveCallback", "100", 0, "int", 0 )

consolewrite($result[0]) or MessageBox(4096,"Test",$result[0])

wend

DllClose($dll)

uuirtdrv.dll can see function

1.Receiver : UUIRTSetReceiveCallback

2.Send : UUIRTTransmitIR

In for loop , the value read is still blank .

I would like to read the IR Code.

Edited by ericli03

Share this post


Link to post
Share on other sites

http://ccnicolas.free.fr/domotique/apiuirt.htm


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

$result = DllCall("uuirtdrv.dll", "str", " UUIRTSetReceiveCallback", "TimeCodeDiagram", 0, "DiagramLength", 0 )

ConsoleWrite( $result )

$result is an array :)

Share this post


Link to post
Share on other sites

$result is an array :)

Thanks!!

But I used _ArrayDisplay($result) value is always 0.

Posted Image

Share this post


Link to post
Share on other sites

#10 ·  Posted (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 is

USBUIRT_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 by ericli03

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  
Followers 0