xxx_Write

The xxx_Write function writes data to the device.

Syntax

DWORD xxx_Write( DWORD hOpenContext LPCVOID pSourceBytes DWORD NumberOfBytes );

Parameters

hOpenContext
Specifies a handle that identifies the open context of the device. The xxx_Open call returns this identifier.
pSourceBytes
Specifies the address of the buffer that contains the data to write.
NumberOfBytes
Specifies the number of bytes to write from the pSourceBytes buffer into the device.

Return Value

Returns –1 for an error, or the number of bytes written for success.

Remarks

An application uses WriteFile to write to the device. The operating system, in turn, invokes xxx_Write. The value returned from xxx_Write is equal to the value contained in NumberOfBytes, unless xxx_Write returns -1 for an error.