Tom's Hardware > Forum > Wireless Networking > Wireless General Discussions > how to rebind network adapter?

how to rebind network adapter?

Forum Wireless Networking : Wireless General Discussions - how to rebind network adapter?

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: microsoft.public.windows.networking.wireless (More info?)

 

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_ADAPTER,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

Sponsored Links
Register or log in to remove.

Archived from groups: microsoft.public.windows.networking.wireless (More info?)

 

Use IP Helper functions (iphlp...)
NDISUIO is not for what you're trying to do.

--PA

"Oscar" <anonymous@discussions.microsoft.com> wrote in message news:#NiDhFnoEHA.132@TK2MSFTNGP14.phx.gbl...
> 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_ADAPTER,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
>
>
>
>

Reply to Anonymous
Tom's Hardware > Forum > Wireless Networking > Wireless General Discussions > how to rebind network adapter?
Go to:

There are 514 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them