lgo_Ioctl()
Perform a protocol-specific function on a connection.
#include "laygo.h" LResult lgo_Ioctl ( LCid cid, LFunction function, LCtlBuffer inBuffer, LBufferSize inSize, LCtlBuffer outBuffer, LBufferSize * outSize );
cid | connection to perform IOCTL function on |
function | protocol-specific IOCTL function ID |
inBuffer | IOCTL input parameter block |
inSize | size of input parameter block in bytes |
outBuffer | buffer for output data, if any |
outSize | size of output buffer on input; size of data returned on output |
lgo_Ioctl() performs protocol-specific functions on a connection. Calls to lgo_Ioctl() are directed to the LayGO module directly below the API on the connection. The protocol implemented by this module depends on the service specified when the connection is opened. So the Ioctl functions available on a CID depend on the service specified when the connection was opened.
Each LayGO module exports a list of the Ioctl functions it supports.
If successful, lgo_Ioctl() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
short newline = 1; LBufferSize size = 0; LResult result; result = lgo_Ioctl(physicalCid, phys_IOCTL_SWITCH_LINES, &newLine, sizeof(newLine), NULL, &size);