|
-
August 8th, 2005, 10:20 AM
#1
Obtaining the handle of CD drive
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|