Under Windows 7 'AddIPAddress()' returns success but doesn't add IP address if called when adapter LAN cable is unplugged
I have a dedicated Windows 7 application that needs to create an alternate IP address (for a dedicated subnet) to the PC's ethernet adapter which has DHCP enabled. Sometimes this adapter will be directly connected to a special hardware device, and other times used for standard (internet) communications. The application works correctly when the PC ethernet adapter has an ethernet cable plugged in with an active device (or switch) attached on the other end of the cable. Unfortunately, if no ethernet cable is plugged in (or the remote device is powered off), then 'AddIPAddress()' returns a success status (0), but the alternate IP address is in-fact not added. This presents a problem since my application assumes the special sub-net address was added, but it was not. Any ideas what I should do. Is there a way that I can confirm that the alternate IP address was added (or not)? jr
April 9th, 2011 9:09pm

Win7 networking forum: http://social.technet.microsoft.com/Forums/en-US/w7itpronetworking/threads -- pa
Free Windows Admin Tool Kit Click here and download it now
April 10th, 2011 12:56am

Hi, Would you please let me know what application was used to add IP? If you are using AddIPAddress function, it is better to find the solution on MSND forum. MSDN Forum http://social.msdn.microsoft.com/Forums/en/winforms/threads Best Regards, NikiPlease remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
April 13th, 2011 7:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics