Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Enable Network Adaptor Programically

62 views
Skip to first unread message

James Williams

unread,
May 27, 2004, 11:12:40 PM5/27/04
to
Hello,

Can someone tell me if it is possible to programically enable and disable a
connection adaptor, say a NIC. I have a app that I want to send data to
another computer periodically and I don't want the user to have to remember
to turn on the wireless on and off. Is there any way to do this?


Regards,


James


Paul G. Tobey [eMVP]

unread,
May 28, 2004, 12:23:01 PM5/28/04
to
Yes, it is possible. I'm not convinced that you really want to do this, for
this situation, though. Why would it need to be disabled?

The procedure to disable is:

1. Open the NDIS power driver. Send it an I/O control:
IOCTL_NPW_SAVE_POWER_STATE, telling it to switch to power state for the
named adapter to D4.

2. Call SetDevicePower() to set the device power state to D4, if the adapter
supports power management.

3. Open NDIS. Send it an I/O control: IOCTL_NDIS_UNBIND_ADAPTER with the
adapter name to unbind the adapter.

Paul T.

"James Williams" <ja...@williams-eng.com> wrote in message
news:c96alk$9auq$1...@news3.infoave.net...

James Williams

unread,
May 28, 2004, 8:36:43 PM5/28/04
to
My device is a handheld PDA with Pocket PC 2003. I want to be able to do
this to conserve power on the device. If the device were to remain on, it
would deplete the battery within an hour or two.

How do I open the NDIS power driver? Is there any documentation on this? I
have just the standard SDK for eMbedded VC 4.0, and I have not found any
references to the NDIS or SetDevicePower() functions.

Is there an example available?

Regards,

James


"Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in
message news:uG9uQANR...@TK2MSFTNGP10.phx.gbl...

Paul G. Tobey [eMVP]

unread,
Jun 1, 2004, 1:34:30 PM6/1/04
to
Don't use the Standard SDK. Use the Pocket PC 2003 SDK. I'm not aware of
any documentation. I would guess that MS is assuming that the 'sleep' mode
of the device would cover power savings.

The power device's name is NPW1:

Paul T.

"James Williams" <ja...@williams-eng.com> wrote in message

news:c98lt4$afom$1...@news3.infoave.net...

0 new messages