>> 2 is ERROR_FILE_NOT_FOUND
Thanks. But what about this in response to a CreateFile call, not an
“open file”. Might that mean that the name I tried to use was illegal?
Are there any special rules when it comes to naming WAN drivers rather
than LAN NIC drivers?
Torsten
-----Urspr?ngliche Nachricht-----
Von: Aaron Stavens [mailto:xxxxx@nmwco.com]
Gesendet: Donnerstag, 15. August 2002 22:35
An: xxxxx@gmx.net
Betreff: RE: [ntdev] Information on IOCTL_NDIS_…
Torsten,
I’ll take the easy one. Look in winerror.h for Win32 error codes. 2 is
ERROR_FILE_NOT_FOUND.
Aaron Stavens
NetMotion Wireless, Inc.
-----Original Message-----
From: Torsten Schlabach [mailto:xxxxx@gmx.net]
Sent: Thursday, August 15, 2002 1:30 PM
To: NT Developers Interest List
Subject: [ntdev] 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
You are currently subscribed to ntdev as: xxxxx@nmwco.com
To unsubscribe send a blank email to %%email.unsub%%
It sounds like you are doing everything correctly. Some non-Ethernet adapters simply don’t respond to this method.
The PCAUSA MacAddr II sample illustrates using this IOCTL in a simple way, Sources included at the URL:
http://www.pcausa.com/Utilities/macaddr2.htm
Good luck,
Thomas F. Divine
PCAUSA - Tools & Resources For Network Software Developers
NDIS Protocol/Intermediate/Hooking - TDI Client/Filter
http: - http:
“Torsten Schlabach” wrote in message news:xxxxx@ntdev…
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</http:></http:>
Regarding enumerating NICs, review the INetCfg APIs in the DDK. The Windows 200 DDK sample Network\Config\NetCfg and the Windows XP DDK sample Network\Config\BindView should help you.
Regarding IOCTL_NDIS, take a look at the MACADDR sample in the Windows NT 4 DDK. It shows how to get the MAC Address of an adapter via IOCTL_NDIS_QUERY_GLOBAL_STATS/OID_802_3_CURRENT_ADDRESS. Other OIDs could be used to fit your particular needs.
I hope this helps.
Bryan S. Burgin
xxxxx@microsoft.com
?
This posting is provided “AS IS” with no warranties, and confers no rights.
-----Original Message-----
From: Torsten Schlabach [mailto:xxxxx@gmx.net]
Sent: Thursday, August 15, 2002 1:30 PM
To: NT Developers Interest List
Subject: [ntdev] 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
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to %%email.unsub%%