It appears that this implementation only supports one element in m_DeviceHandles and m_DeviceInterfaces - why not replace that list with a pointer and use NULL to indicate nothing open?