DhcpCreateSubnet ErrorCode : 5. on Hyper V Windows server 2008 R2 RRS feed

  • Question

  • Hi,

    I have written the an application which configures the DHCP server using c#.

    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 DHCPCreatesubnet is called it succeeds to create the subnet for same IP address.

    For e.g
    1st Attempt: Exe is executed first time,.
    API used : DHCPCreateSubnet Error code :5 IP used for IP address :

    2nd Attempt: Exe is executed second time,.
    API used : DHCPCreateSubnet Error code :2005 (success), IP used for IP address :

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



    • Moved by Jesse Jiang Wednesday, November 10, 2010 2:51 AM (From:Visual C++ Language)
    Monday, November 8, 2010 12:26 PM


All replies