EasyUSB::Detail::IOControl Class Reference

This class provides functions for sending IO Control Codes to the driver. More...

Inheritance diagram for EasyUSB::Detail::IOControl:

EasyUSB::Detail::IOBase EasyUSB::Device EasyUSB::Endpoint

Public Member Functions

Data SendIOCTL (unsigned int IoControlCode, Data InBuffer, unsigned long Timeout=1000)
 Sends an IO Control code directly to the driver.
Data SendIOCTL (unsigned int IoControlCode, Data InBuffer, unsigned int OutBufferLength, unsigned long Timeout=1000)
 Sends an IO Control code directly to the driver.
void SendIOCTL (unsigned int IoControlCode, char *pInBuffer, unsigned int InLength, char *pOutBuffer, unsigned int OutLength, unsigned long *pBytesReturned=0, unsigned long Timeout=1000)
 Old style function call.

Detailed Description

This class provides functions for sending IO Control Codes to the driver.

Member Function Documentation

Data EasyUSB::Detail::IOControl::SendIOCTL ( unsigned int  IoControlCode,
Data  InBuffer,
unsigned long  Timeout = 1000 
)

Sends an IO Control code directly to the driver.

Parameters:
IoControlCode The IOCTL.
InBuffer An Data object providing the input buffer. You may provide Data(0) for no input data.
Timeout The time in ms until the operation times out.
Returns:
An Data object containing the data returned.
Exceptions:
UnknownError An unknown error occured. Experienced users may investigate the windows error code.
TimedOut The IO control operation could not be accomplished in the specified time.
DeviceNotAvailable The link to the driver is not established.
DeviceLost The device was just lost or this operation was the first after losing the device.
BufferTooSmall The output buffer was too small. You can retrieve the amount of bytes needed by calling GetRequieredSize().
Cancelled The IO operation was cancelled by unplugging the device or by another thread.
Note:
This function internally calls DeviceIoControl twice, if you use an IOCTL that returns data. In this case the timeout is also doubled.

Data EasyUSB::Detail::IOControl::SendIOCTL ( unsigned int  IoControlCode,
Data  InBuffer,
unsigned int  OutBufferLength,
unsigned long  Timeout = 1000 
)

Sends an IO Control code directly to the driver.

Parameters:
IoControlCode The IOCTL.
InBuffer An Data object providing the input buffer. You may provide Data(0) for no input data.
OutBufferLength The expected output buffer length.
Timeout The time in ms until the operation times out.
Returns:
An Data object containing the data returned. This may be less than specified in OutBufferLength.
Exceptions:
See below.
Note:
This function internally calls DeviceIoControl only once. If the output buffer length is too small this function will fail.

void EasyUSB::Detail::IOControl::SendIOCTL ( unsigned int  IoControlCode,
char *  pInBuffer,
unsigned int  InLength,
char *  pOutBuffer,
unsigned int  OutLength,
unsigned long *  pBytesReturned = 0,
unsigned long  Timeout = 1000 
)

Old style function call.

Parameters:
IoControlCode The IOCTL.
pInBuffer Pointer to an input buffer.
InLength Input buffer length.
pOutBuffer Pointer to an output buffer.
OutLength Output buffer length.
pBytesReturned Optional pointer to a buffer recieving the bytes returned.
Timeout The time in ms until the operation times out.
Exceptions:
See below.


Generated on Tue Nov 4 22:13:26 2008 for EasyUSB Connect by  doxygen 1.5.6