Maël Hörz <> wrote:
>
>So what I really want to know is if it safe to call DeviceIoControl if
>the control code is potentially unsupported or if it can cause problems
>(except returning false). Or if there is something similar to
>GetProcAddress for IOCTLs.
A few moments thought about how ioctls work should have answered your
second question.
In general, you should just submit the ioctl and check for an error.
Unsupported is the best case. The worst case is if the ioctl code is
assigned for some other use. Fortunately, that almost never happens with
Microsoft drivers.
--
Tim Roberts,
Providenza & Boekelheide, Inc.