Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Please help me! CallDll.

$
0
0
I want to use IR device with usb-uirt.

I have read the USB-UIRT API documentation,and can be use UUIRTGetDrvVersion.

But I don't know how to use Transmit and Receive.

I try this code...

$result= DllCall($dll,"UINT_PTR","UUIRTTransmitIR","int",$hndl,"str","0000","hwnd",0x0010,"int",1,"int",0,"int",0,"uint",0,"uint",0)

But read array value always is 0.

Found Call uuirtdrv.dll founction List:
1.Receiver : UUIRTSetReceiveCallback
2.Send :  UUIRTTransmitIR

USBUirt Dll API documentation
http://ccnicolas.free.fr/domotique/apiuirt.htm

UUIRTSetReceiveCallback
UUIRTDRV_API BOOL PASCAL UUIRTSetReceiveCallback(HUUHANDLE hHandle, PUUCALLBACKPROC receiveProc, void *userData);
Registers a receive callback function which the driver will call when an IR code is received from the air. receiveProc should contain the address of a PUUCALLBACKPROC function defined as :
typedef void (WINAPI *PUUCALLBACKPROC) (char *IREventStr, void *userData);
When the USB-UIRT receives a code from the air, it will call the callback function with a null-terminated, twelve-character (like IRMAN) ir code in IREventStr. The driver will also pass the parameter userData, which is a general-purpose 32-bit value supplied by the caller to UUIRTSetReceiveCallback. This parameter is useful for carrying context information, etc. Note that the types of codes which are passed to IREventStr are *not* the same as the type of codes passed back from a UUIRTLearnIR call (the codes from a UUIRTLearnIR are much larger and contain all the necessary data to reproduce a code, whereas the codes passed to IREventStr are simpler representations of IR codes only long enough to be unique).

UUIRTTransmitIR
UUIRTDRV_API BOOL PASCAL UUIRTTransmitIR(HUUHANDLE hHandle, char *IRCode, int codeFormat, int repeatCount, int inactivityWaitTime, HANDLE hEvent, void *reserved0, void *reserved1);
Transmits an IR code via the USB-UIRT hardware. The IR code is a null-terminated *string*. codeFormat is a format specifier which identifies the format of the IRCode code. Currently, supported formats are Compressed_UIRT (STRUCT), RAW, and Pronto-RAW. RepeatCount indicates how many iterations of the code should be sent (in the case of a 2-piece code, the first stream is sent once followed by the second stream sent repeatCount times). InactivityWaitTime is the time in milliseconds since the last received IR activity to wait before sending an IR code -- normally pass 0 for this parameter. hEvent is an optional event handle which is obtained by a call to CreateEvent. If hEvent is NULL, the call to UUIRTTransmitIR will block and not return until the IR code has been fully transmitted to the air. If hEvent is not NULL, it must be a valid Windows event hande. In this case, UUIRTTransmitIR will return immediately and when the IR stream has completed transmission this event will be signalled by the driver. The last parameters, labelled 'reservedx' are for future expansion and should be NULL.

Attached is dll file.

Everybody Please help me.

Thank!

Attached Files


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>