EasyUSB::Detail::IOBase Class Reference

IO base class responsible for finding a device and opening a file handle. More...

Inheritance diagram for EasyUSB::Detail::IOBase:

EasyUSB::Detail::IO EasyUSB::Detail::IOControl EasyUSB::Endpoint EasyUSB::Device EasyUSB::Endpoint

Public Member Functions

void CheckState ()
 Checks if the device is still available.
bool Connect ()
 Creates a file handle to the device.
void Disconnect ()
 Closes the file handle to the device.
bool FindDevicePath (unsigned short Index)
 Uses windows SetupDi functions to find the unique path to the USB device.
 IOBase (const IOBase &Orig)
 Copy constructor.
 IOBase ()
 Constructor.
IOBaseoperator= (const IOBase &Orig)
 Assignment operator.
 ~IOBase ()
 Destructor.

Protected Attributes

HANDLE m_hFile
 File handle to the device.
std::wstring m_Path
 The unique device path that identifies the device in the device manager.

Detailed Description

IO base class responsible for finding a device and opening a file handle.

Constructor & Destructor Documentation

EasyUSB::Detail::IOBase::IOBase (  ) 

Constructor.

EasyUSB::Detail::IOBase::IOBase ( const IOBase Orig  ) 

Copy constructor.

EasyUSB::Detail::IOBase::~IOBase (  ) 

Destructor.


Member Function Documentation

void EasyUSB::Detail::IOBase::CheckState (  ) 

Checks if the device is still available.

Exceptions:
DeviceNotAvailable The device is no longer connected.

bool EasyUSB::Detail::IOBase::Connect (  ) 

Creates a file handle to the device.

Returns:
True if the connection could be established.

void EasyUSB::Detail::IOBase::Disconnect (  ) 

Closes the file handle to the device.

bool EasyUSB::Detail::IOBase::FindDevicePath ( unsigned short  Index  ) 

Uses windows SetupDi functions to find the unique path to the USB device.

Parameters:
Index The index of all EasyUSB devices connected, starting from 0.
Returns:
True if the device was found, false otherwise.
Exceptions:
NotEnoughMemory Not enough memory to complete the operation.

IOBase& EasyUSB::Detail::IOBase::operator= ( const IOBase Orig  ) 

Assignment operator.


Field Documentation

File handle to the device.

std::wstring EasyUSB::Detail::IOBase::m_Path [protected]

The unique device path that identifies the device in the device manager.


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