Dear Colin and Marc.
I cannot obtain the devcon.exe currently, but I understand that
“CM_Get_DevNode_Status” function is what I have needed!
Thank you for your advice.
I can proceed.
----- Original Message -----
From: “Colin Fraser”
To: “NT Developers Interest List”
Sent: Monday, March 10, 2003 1:50 PM
Subject: [ntdev] RE: How to get a device status from User-Mode application ?
>
> There’s a utiltity called devcon.exe which checks this. The source code
for
> this is in the Windows DDK which will give you a good example.
>
> -----Original Message-----
> From: Akio Yamamoto [mailto:xxxxx@shimousa.com]
> Sent: Sunday, March 09, 2003 5:09 PM
> To: NT Developers Interest List
> Subject: [ntdev] How to get a device status from User-Mode application?
>
>
> Hello everyone.
>
> I am writing a user-mode program that manages NICs concently.
> But I don’t know how to get NIC’s status(for example NIC is enabled
> or not, NIC’s cable is connected or not)
>
> Does anyone know the method?
> Thanks.
>
> —
> You are currently subscribed to ntdev as: xxxxx@broadcom.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@shimousa.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Sorry for asking again.
I see that I can get device status such as enabled or disabled by
calling CM_Get_DevNode_Status and it returns the status like below.
– if the device is enabled –
CM_PROB_DISABLED bit of second argument of “CM_Get_DevNode_Status” is OFF
– if the device is disabled –
DN_HAS_PROBLEM bit of first argument of “CM_Get_DevNode_Status” is ON and
CM_PROB_DISABLED bit of second argument of “CM_Get_DevNode_Status” is ON
So, I can detect device to be enabled or not.
But, I cannot detect NIC’s ConnectionStatus.
And I want to detect it by C.
Thanks.
----- Original Message -----
From: “Akio Yamamoto”
To: “NT Developers Interest List”
Sent: Monday, March 10, 2003 5:46 PM
Subject: [ntdev] RE: How to get a device status from User-Mode application ?
> Dear Colin and Marc.
>
> I cannot obtain the devcon.exe currently, but I understand that
> “CM_Get_DevNode_Status” function is what I have needed!
>
> Thank you for your advice.
> I can proceed.
>
> ----- Original Message -----
> From: “Colin Fraser”
> To: “NT Developers Interest List”
> Sent: Monday, March 10, 2003 1:50 PM
> Subject: [ntdev] RE: How to get a device status from User-Mode application
?
>
>
> >
> > There’s a utiltity called devcon.exe which checks this. The source code
> for
> > this is in the Windows DDK which will give you a good example.
> >
> > -----Original Message-----
> > From: Akio Yamamoto [mailto:xxxxx@shimousa.com]
> > Sent: Sunday, March 09, 2003 5:09 PM
> > To: NT Developers Interest List
> > Subject: [ntdev] How to get a device status from User-Mode application?
> >
> >
> > Hello everyone.
> >
> > I am writing a user-mode program that manages NICs concently.
> > But I don’t know how to get NIC’s status(for example NIC is enabled
> > or not, NIC’s cable is connected or not)
> >
> > Does anyone know the method?
> > Thanks.
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@broadcom.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@shimousa.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@shimousa.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Hi,
Pls check iphlpapi to see whethere they provide you the desired information
or not [in user mode]…check out for GetAdaptersInfo function for
collection the information about NIC in user mode.I dont recall but there is
one IOCTL also defined in platform SDK for collecting the MAC address etc…
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp
/getadaptersinfo.asp
Hope this helps…
Subodh
----- Original Message -----
From: “Akio Yamamoto”
To: “NT Developers Interest List”
Sent: Monday, March 10, 2003 3:14 PM
Subject: [ntdev] RE: How to get a device status from User-Mode application ?
> Sorry for asking again.
>
> I see that I can get device status such as enabled or disabled by
> calling CM_Get_DevNode_Status and it returns the status like below.
>
> – if the device is enabled –
> CM_PROB_DISABLED bit of second argument of “CM_Get_DevNode_Status” is OFF
>
> – if the device is disabled –
> DN_HAS_PROBLEM bit of first argument of “CM_Get_DevNode_Status” is ON and
> CM_PROB_DISABLED bit of second argument of “CM_Get_DevNode_Status” is ON
>
> So, I can detect device to be enabled or not.
>
> But, I cannot detect NIC’s ConnectionStatus.
> And I want to detect it by C.
>
> Thanks.
>
> ----- Original Message -----
> From: “Akio Yamamoto”
> To: “NT Developers Interest List”
> Sent: Monday, March 10, 2003 5:46 PM
> Subject: [ntdev] RE: How to get a device status from User-Mode application
?
>
>
> > Dear Colin and Marc.
> >
> > I cannot obtain the devcon.exe currently, but I understand that
> > “CM_Get_DevNode_Status” function is what I have needed!
> >
> > Thank you for your advice.
> > I can proceed.
> >
> > ----- Original Message -----
> > From: “Colin Fraser”
> > To: “NT Developers Interest List”
> > Sent: Monday, March 10, 2003 1:50 PM
> > Subject: [ntdev] RE: How to get a device status from User-Mode
application
> ?
> >
> >
> > >
> > > There’s a utiltity called devcon.exe which checks this. The source
code
> > for
> > > this is in the Windows DDK which will give you a good example.
> > >
> > > -----Original Message-----
> > > From: Akio Yamamoto [mailto:xxxxx@shimousa.com]
> > > Sent: Sunday, March 09, 2003 5:09 PM
> > > To: NT Developers Interest List
> > > Subject: [ntdev] How to get a device status from User-Mode
application?
> > >
> > >
> > > Hello everyone.
> > >
> > > I am writing a user-mode program that manages NICs concently.
> > > But I don’t know how to get NIC’s status(for example NIC is enabled
> > > or not, NIC’s cable is connected or not)
> > >
> > > Does anyone know the method?
> > > Thanks.
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@broadcom.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@shimousa.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@shimousa.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@softhome.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Dear subodh.
I didn’t know about iphlpapi(what a funny spelling)
I will study on it.
Thank you.
----- Original Message -----
From: “subodh gupta”
To: “NT Developers Interest List”
Sent: Monday, March 10, 2003 8:55 PM
Subject: [ntdev] RE: How to get a device status from User-Mode application ?
> Hi,
> Pls check iphlpapi to see whethere they provide you the desired
information
> or not [in user mode]…check out for GetAdaptersInfo function for
> collection the information about NIC in user mode.I dont recall but there
is
> one IOCTL also defined in platform SDK for collecting the MAC address
etc…
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp
> /getadaptersinfo.asp
> Hope this helps…
> Subodh
> ----- Original Message -----
> From: “Akio Yamamoto”
> To: “NT Developers Interest List”
> Sent: Monday, March 10, 2003 3:14 PM
> Subject: [ntdev] RE: How to get a device status from User-Mode application
?
>
>
> > Sorry for asking again.
> >
> > I see that I can get device status such as enabled or disabled by
> > calling CM_Get_DevNode_Status and it returns the status like below.
> >
> > – if the device is enabled –
> > CM_PROB_DISABLED bit of second argument of “CM_Get_DevNode_Status” is
OFF
> >
> > – if the device is disabled –
> > DN_HAS_PROBLEM bit of first argument of “CM_Get_DevNode_Status” is ON
and
> > CM_PROB_DISABLED bit of second argument of “CM_Get_DevNode_Status” is ON
> >
> > So, I can detect device to be enabled or not.
> >
> > But, I cannot detect NIC’s ConnectionStatus.
> > And I want to detect it by C.
> >
> > Thanks.
> >
> > ----- Original Message -----
> > From: “Akio Yamamoto”
> > To: “NT Developers Interest List”
> > Sent: Monday, March 10, 2003 5:46 PM
> > Subject: [ntdev] RE: How to get a device status from User-Mode
application
> ?
> >
> >
> > > Dear Colin and Marc.
> > >
> > > I cannot obtain the devcon.exe currently, but I understand that
> > > “CM_Get_DevNode_Status” function is what I have needed!
> > >
> > > Thank you for your advice.
> > > I can proceed.
> > >
> > > ----- Original Message -----
> > > From: “Colin Fraser”
> > > To: “NT Developers Interest List”
> > > Sent: Monday, March 10, 2003 1:50 PM
> > > Subject: [ntdev] RE: How to get a device status from User-Mode
> application
> > ?
> > >
> > >
> > > >
> > > > There’s a utiltity called devcon.exe which checks this. The source
> code
> > > for
> > > > this is in the Windows DDK which will give you a good example.
> > > >
> > > > -----Original Message-----
> > > > From: Akio Yamamoto [mailto:xxxxx@shimousa.com]
> > > > Sent: Sunday, March 09, 2003 5:09 PM
> > > > To: NT Developers Interest List
> > > > Subject: [ntdev] How to get a device status from User-Mode
> application?
> > > >
> > > >
> > > > Hello everyone.
> > > >
> > > > I am writing a user-mode program that manages NICs concently.
> > > > But I don’t know how to get NIC’s status(for example NIC is enabled
> > > > or not, NIC’s cable is connected or not)
> > > >
> > > > Does anyone know the method?
> > > > Thanks.
> > > >
> > > > —
> > > > You are currently subscribed to ntdev as: xxxxx@broadcom.com
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > >
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntdev as: xxxxx@shimousa.com
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@shimousa.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@softhome.net
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@shimousa.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> But, I cannot detect NIC’s ConnectionStatus.
IOCTL_NDIS_QUERY_GLOBAL_STATS can possibly help, it can query any
OIDs.
Max