TwclClientDataConnection.HalWrite(Pointer,Cardinal,Cardinal) Method

Implements a hardware-dependent code that sends data to the connected device.

Namespace: wclConnections
protected
 function HalWrite(const Data: Pointer; const Size: Cardinal;
 out Written: Cardinal): Integer; virtual; abstract;

Parameters

Data
Type: Pointer

The pointer to the data buffer that should be sent to the connected device.

Size
Type: Cardinal

The data buffer size.

Written
Type: Cardinal

The amount of bytes actually written to the device.

Return Value

Type: Integer

If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.

A derived class must override this method to implement a hardware-dependent code that sends data to the connected device. The method executes in the main thread and must be synchronous.