Information on IOCTL_NDIS_...

Hi all,

I am trying to write a user mode application that enumerates the NICs in
a PC (including the ISDN interface cards as far as they use ISDN WAN
Miniport drivers). My understanding so far is that I want to open a file
(?) to the driver with CreateFile and some file name that I construct
from some registry values. I then need to pass that file handle to the
DeviceIoControl function as far as I understand.

My two questions are:

  • I cannot find any documentation about what IOCTL_NDIS_… codes the
    function DeviceIoControl understands.
  • Why does CreateFile work for an Ethernet NIC in my PC but fails with
    “Error 2” on the WAN miniport driver for an ISDN card?
  • Where can I find any information on what the error codes that
    CreateFile returns mean?

Any ideas or sample code would be helpful. I can paste excerpts of my
code if I was not clear enough.

Regards,
Torsten