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
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
>
>
>
>
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.