[mythtv] libmyth windows CD handler (so far only a proof of concept)
jonathan at snetram.nl
Fri Aug 7 20:08:18 UTC 2009
On 7-8-2009 19:15, Jonathan Martens wrote:
> Until now I have hardcoded my drivePath to the CD drive I am using.
> Since I do not know any way of retrieving the drivePath for a device
> from a subclass of MythCDROM (which in turn is a child of
> MythMediaDevice) I turn to you. It seems the getDrivePath() method is in
> the MythMediaDevice class but I have no clue how to gat access to that
> from MythCDROMWindows. Can some of the dev's or more experienced MythTV
> developers help me with this?
After a good meal and some rest I found out that m_RealDevice and
m_DevicePath are accessible in the MythCDROMWindows class (as in all the
other classes), so I can now create my handle to the optical drive like
const char *devicePath = strncat("\\\\.\\", m_RealDevice.toLocal8Bit(),2);
return hDevice = CreateFile(
FILE_SHARE_READ | FILE_SHARE_WRITE,
Now off to drink a beer!
More information about the mythtv-dev