Go Back   Velocity Reviews > Newsgroups > Wireless Networking
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Wireless Networking - how to rebind network adapter?

 
Thread Tools Search this Thread
Old 09-24-2004, 09:02 PM   #1
Default how to rebind network adapter?


hi guys,

I want to update network IP address to 169.254.xx.xx (which means the
machine cannot connect to a DHCP server). I used to
IOCTL_NDIS_REBIND_ADAPTER to update it:


//---------------Code--------------------------------
TCHAR szReg1[]=L"VNETUSBA1\0\0"; //VNETUSBA1 is the Wi-fi adapter name

HANDLE g_hNdisUio = CreateFile( NDISUIO_DEVICE_NAME,GENERIC_READ |
GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL, OPEN_ALWAYS, 0,
NULL);

DeviceIoControl(g_hNdisUio,IOCTL_NDIS_REBIND_ADAPT ER,szReg1,sizeof(szReg1),NULL,NULL,NULL,NULL);


//---------------End of Code-------------------------


Fuction DeviceIoControl always return Error 50: The network request is not
supported.

I tried IOCTL_NDIS_UNBIND_ADAPTER, same error.

Does anybody know the problem?

Thanks






Oscar
  Reply With Quote
Old 09-25-2004, 06:35 PM   #2
Pavel A.
 
Posts: n/a
Default Re: how to rebind network adapter?
Use IP Helper functions (iphlp...)
NDISUIO is not for what you're trying to do.

--PA

"Oscar" <> wrote in message news:#...
> hi guys,
>
> I want to update network IP address to 169.254.xx.xx (which means the
> machine cannot connect to a DHCP server). I used to
> IOCTL_NDIS_REBIND_ADAPTER to update it:
>
>
> //---------------Code--------------------------------
> TCHAR szReg1[]=L"VNETUSBA1\0\0"; //VNETUSBA1 is the Wi-fi adapter name
>
> HANDLE g_hNdisUio = CreateFile( NDISUIO_DEVICE_NAME,GENERIC_READ |
> GENERIC_WRITE,FILE_SHARE_READ | FILE_SHARE_WRITE,NULL, OPEN_ALWAYS, 0,
> NULL);
>
> DeviceIoControl(g_hNdisUio,IOCTL_NDIS_REBIND_ADAPT ER,szReg1,sizeof(szReg1),NULL,NULL,NULL,NULL);
>
>
> //---------------End of Code-------------------------
>
>
> Fuction DeviceIoControl always return Error 50: The network request is not
> supported.
>
> I tried IOCTL_NDIS_UNBIND_ADAPTER, same error.
>
> Does anybody know the problem?
>
> Thanks
>
>
>
>





Pavel A.
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
No internet connection, 1394 Network Adapter Japh84 Hardware 1 11-11-2006 05:22 AM
IMHO, Digital SECAM video is better than Analog NTSC video Radium DVD Video 167 10-25-2006 04:16 AM
Setting up a Network -- Wired or Wireless? shopzero.net DVD Video 1 07-24-2006 07:18 PM
network adapter lost in windows xp mdiaczyk@yahoo.com A+ Certification 1 04-17-2005 12:01 AM
Looking for PCMCIA type I or II network adapter Rudy Lopez A+ Certification 3 11-04-2004 07:12 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46