Description
|
Sends data to the controller
associated with the specified device using the UPDD macro language. |
Parameters |
Device
handle, macro to send and length of macro command. |
Returns |
0 = fail, 1 = OK. |
Notes |
For more details of the UPDD
macro language, see the on-line UPDD documentation. |
Visual C++ Declaration/example
BOOL TBAPI TBApiSendMacro(HTBDEVICE aDeviceHandle, const TCHAR* aMacro);
// The following example sends "hello world" to the first controller
on the system with a 1 second gap
// between words. aMacro is a null terminated string with a maximum
length of 2046 bytes
//
HTBDEVICE device = TBApiGetRelativeDevice(0);
char macro[]="hello [WAIT 1000]world";
TBApiSendMacro(device, macro);
// The following example sets
DTR then RTS high and waits 20 milliseconds:
HTBDEVICE device =
TBApiGetRelativeDevice(0);
char macro[]="[DTR
1][RTS 1][WAIT 20]";
if (!TBApiSendMacro(device,
macro))
AfxMessageBox(“Failed
to send macro”);
Public Declare Function
TBApiSendMacro Lib "TBapi" Alias "_DLL_TBApiSendMacro@8"
(ByVal aDeviceHandle As Long, ByVal aMacro As String) As Long