Re: DeviceIoctl fail

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



nihar <niharrou@xxxxxxxxx> wrote in news:6d851d0e-adf0-4ea7-abd4-
46408356d08a@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

hello all,
In the deviceioctl function i am passing the the first 4
parameters as the handle,then the ioctl command ,Long pointer to a
buffer ,the inbuffer size and other 4 parameters as NULL.but the
function fails.Please suggest any solution


There's no way to know why the functions fails for sure.
Check it's return code with GetLastError.
If it returns ERROR_INVALID_HANDLE che to understand why your handle
is invalid.
If it returns ERROR_INVALID_PARAMETER or another error code, this is
specific of the IOCTL code you are using and the driver that receives
your request.
Check the docs or the source code of the driver, if it's available or
try to describe your issue in a more detailed way here to have more
specific answers.


--
Valter Minute
www.fortechembeddedlabs.it
Training, support and development for Windows CE
(the reply address of this message is invalid)
.



Relevant Pages

  • Re: fs: Strange Device Reply
    ... If i try the ioctl command again, ... and then i wont get either error for quite some time. ... This confuses FS. ... The process in slot 14, which is presumably your driver, ...
    (comp.os.minix)
  • Fwd: [rtc-linux] RTC_SET_TIME: Inappropriate ioctl for device
    ... Subject: RTC_SET_TIME: Inappropriate ioctl for device ... wrong IOCTL command, ... so driver return a '--ENOTTY' error no. ... I'm trying to use the hwclock command to sync the time each bootup, ...
    (Linux-Kernel)