Re: Problem With DeviceIoControl IOCTL_STORAGE_MCN_CONTROL
- From: Olof Lagerkvist <no@xxxxxxxxxxxxx>
- Date: Thu, 25 Jan 2007 12:27:54 GMT
S. Heck wrote:
Same error.
There is some mention of access rights for at IOCTL_STORAGE_MCN_CONTROL at the following link.
http://msdn2.microsoft.com/en-us/library/aa363415.aspx
hDevice [in] Handle to the device. This device must be enabled for AutoPlay. To obtain a device handle, call the CreateFile function. Files must be opened with the FILE_READ_ATTRIBUTES access right. They must not be opened with read or write access. For more information, see File Security and Access Rights.
You have probably misunderstood the CreateFile() parameter list as you don't pass FILE_READ_ATTRIBUTES correctly. FILE_READ_ATTRIBUTES is an access right, not a file attribute.
e.g.
fd = CreateFile(device_name,FILE_READ_ATTRIBUTES,
0,NULL,OPEN_EXISTING,
0,NULL);
--
Olof Lagerkvist
ICQ: 724451
Web: http://here.is/olof
.
- Prev by Date: Re: how can i disble irq15 through C/assembly programming.
- Next by Date: Re: User vs. Worker threads
- Previous by thread: Re: Problem With DeviceIoControl IOCTL_STORAGE_MCN_CONTROL
- Next by thread: SetClipboardData and different formats, need different HGLOBAL objects?
- Index(es):