Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
DWORD AddIPAddress(
__in IPAddr Address,
__in IPMask IpMask,
__in DWORD IfIndex,
__out PULONG NTEContext,
__out PULONG NTEInstance
);


this all are the parameter for this function but how can i define the 3rd argument that i want to change the ip of my wifi adapter not the ethernet.
what identity should i give to change my wifi ip address...

Thanks in advance..
Posted

1 solution

First, are you aware that according to msdn[^]: The IPv4 address added by the AddIPAddress function is not persistent. Is this suitable for your needs?

Now you need the index of the IPv4 interface of the adapter you want to deal with. If you know its existing IP address, you could get its index from GetIpAddrTable()[^]. If, instead, you know the adapter's name, "friendly name", or MAC, you can determine the index by using GetAdaptersAddresses()[^].

You will find more information and some sample code at the links to Msdn.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900