Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DHCPCreateSubnet Error code: 5 on HyperV windows server 2008 R2

DHCPCreateSubnet Error code: 5 on HyperV windows server 2008 R2

Scheduled Pinned Locked Moved C / C++ / MFC
csharpsysadminwindows-adminjsonhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Ganesh_T
    wrote on last edited by
    #1

    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

    "A winner is not one who never fails...but the one who never quits"

    S 1 Reply Last reply
    0
    • G Ganesh_T

      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

      "A winner is not one who never fails...but the one who never quits"

      S Offline
      S Offline
      Sauro Viti
      wrote on last edited by
      #2

      Ganesh_T wrote:

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

      Then, why do you post your question on the C/C++/MFC forum? The right one is the C# forum...

      Ganesh_T wrote:

      API used to crerate subnet is : DHcpCreateSubnet.

      ...or you can post the question to the Windows API forum, as you are using one of them through P-Invoke.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups