Hi,

I am using the following piece of code to obtain the handle to CD drive. This piece of code is working in WinXP and Win2k but its not able to get the handle in Win98.

HANDLE m_hDevice;
m_hDevice = CreateFile("\\\\?\\G:", GENERIC_READ, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, NULL);
if (m_hDevice==INVALID_HANDLE_VALUE)
{
AfxMessageBox("Cannot get handle");
}


Can someone help me ?

Regards
Gaurav