Hi all,
I want to write an embedded Visual C++ program for an hardware with WINCE4 installed. I want to modify the IP address (a.b.c.d) and subnet mask (e.f.g.h) without DHCP by modifying the registry IPAddress, SubnetMask and EnableDHCP. However, the hardware is designed such that the adapter specific registry (e.g. EnableDHCP, Lease, AutoIP...etc) is loaded from an image file (which set EnableDHCP to 1) and the image file cannot be modified. So, when the program is run just after WINCE startup and tries to modify the IP address and subnet mask, it seems that OS kicks in after some sort of timeout and modifies the IP address to 0.0.0.0.
Once the program started, I checked the IP address quickly and it is set to (a.b.c.d). After few seconds, it is set to 169.x.x.x. Few more seconds later, it is set to 0.0.0.0. The registry of IP address and subnet mask is set correctly but EnableDHCP is set to 1.
I proposed to fix this problem by waiting for the OS timeout, then I start to modify the registry and restart the adapter. Does anyone have any suggestions to efficiently set the IP address? Any other better suggestions are appreciated.
Many thanks!


LinkBack URL
About LinkBacks




Reply With Quote

Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum