Phone:(705) 671-2652
    Fax:(705) 671-6127
   Email: tom@ontrak.net
Home Products Programming Applications Custom Designs Ordering News
    
ADU  Series - USB Data Acquisition Interface SDK 

WriteAdu232

This function writes data to the ADU RS232 pipe. The number of bytes written is returned in lpNumberOfBytesWritten.

The handle value must be the value returned by the open call.

ADU RS232 data blocks are limited to 40 characters in length.

C Declaration:

int __stdcall WriteAdu232(void * hDevice,
const void * lpBuffer,
unsigned long nNumberOfBytesToWrite,
unsigned long * lpNumberOfBytesWritten,
unsigned long iTimeout);

Visual Basic Declaration:

Declare Function WriteAdu232 Lib "AduHid.DLL" _
(ByVal aduHandle As Long, ByVal lpBuffer As String, _
ByVal lNumberOfBytesToWrite As Long, _
ByRef lBytesWritten As Long, ByVal iTimeout As Long) As Long

Arguments:

Argument Type Value Description
hDevice void * value from open call handle to the device
lpBuffer const char * address of buffer buffer to be written
nNumberOfBytesToWrite unsigned long &GT 0 number of bytes to write
lpNumberOfBytesWritten unsigned long *   number of bytes written
iTimeout unsigned long   milli-seconds to wait


A non-zero iTimeout value can only be supplied if timeout processing was activated during the open call. (ie. a non-zero iTimeout value was passed into the open function)

Return Codes:

Value Description
0 call failed
other call succeeded

Note: call GetLastError to get more information about a failed write operation.

 
    
Contact Information
Address Telephone Electronic Mail
Ontrak Control Systems Inc.
764 Notre Dame Ave., Unit #1
Tel: (705) 671-2652 General Information Sales or Support
Sudbury,Ontario Fax:(705) 671-6127 tom@ontrak.net
CANADA P3A 2T2    
              
Next-Day shipping anywhere in Continental U.S. via Fed-Ex
Copyright © 2012 ONTRAK CONTROL SYSTEMS 764 Notre Dame Ave, Unit #1 , Sudbury, Ontario, CANADA P3A 2T2  
"Quality serial Data Acquisition Interfaces"           PH. (705) 671-2652 FAX (705) 671-6127