Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have written the an application which configures the DHCP server using c#.
Environment:
Hyper-V Windows 2008 Server R2
API used to crerate subnet is : DHcpCreateSubnet.
Return code: 5
The above return code is received when used for the first time. In second attemp when DHCPCreate subnet is called it succeeds to create the subnet for same IP used as scope address.
For e.g
1st Attempt: Exe is executed first time,.
API used : DHCPCreateSubnet Error code :5 IP used for scope address : 192.168.1.10
2nd Attempt: Exe is executed second time,.
API used : DHCPCreateSubnet Error code :2005 (success), IP used for scope address : 192.168.1.10

Please let me know if you any information on Hyper-V why its is failing for the first time.

Regards
-Ganesh
Posted
Updated 25-Oct-10 0:43am

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