Arkady
Fri Feb 11 05:58:31 CST 2005
That exactly what WMI do for you and it cost nothing :)
look at
http://www.pcausa-corp.com/faq/QA01050301/
BTW in XP you can simply check that using GetIfEntry() of adapter
Arkady
"Arne Ludwig" <arne@citde.net> wrote in message
news:84bdcc66.0502110250.73c796b5@posting.google.com...
> Errr... WMI... yes. Actually all I wanted is stick a $2 smoke detector
> on the ceiling, not rewire the whole house and buy $50000 worth of
> electronic equipment just so I can wire my own buzzer to pin 235
> (SMKDET) of the Home Monitoring and Security Infrastructure connector.
>
> RegisterDeviceNotification/IoReportTargetDeviceChangeAsynchronous
> seemed like a more likely method, but I do not have a window handle
> and I am not sure I understand what a "service status handle" might
> be. I probably do not want a separately running service either.
>
> I thought of something simple like have the ProtocolStatus routine
> send a signal and the user mode app have a signal handler that gets
> called.
>
> Only I am not sure that Windows has such a concept as "Unix signals",
> or does it?
>
> Thanks again.
>
>
> "Arkady Frenkel" <arkadyf@hotmailxdotxcom> wrote in message
news:<#u57yO7DFHA.3368@TK2MSFTNGP10.phx.gbl>...
> > You can use WMI in user mode to be notified for status changes
> > Arkady
> >
> > "Arne Ludwig" <arne@citde.net> wrote in message
> > news:84bdcc66.0502100520.6c9f7587@posting.google.com...
> > > I am reading data directly from a network interface using a modified
> > > NDISPROT protocol driver. When somebody pulls the network cable the
> > > ProtocolStatus routine triggers within the driver. From the user level
> > > I can actively poll the miniport using OID_GEN_MEDIA_CONNECT_STATUS,
> > > but is there a way to get notified asynchronously? If not, is checking
> > > the miniport via the OID the best way or should I implement an
> > > IoControl in NDISPROT instead?
> > >
> > > Thanks for your help!