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. setting static IP address using win32 API

setting static IP address using win32 API

Scheduled Pinned Locked Moved C / C++ / MFC
c++jsontutorial
5 Posts 4 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.
  • A Offline
    A Offline
    an89
    wrote on last edited by
    #1

    can anybody tell me how to set static IP address using c++ code using win32 API

    M K V 3 Replies Last reply
    0
    • A an89

      can anybody tell me how to set static IP address using c++ code using win32 API

      M Offline
      M Offline
      marcio k
      wrote on last edited by
      #2

      you could try to have a look at the ip api... but most of it is pretty undocumented, so good luck :)

      1 Reply Last reply
      0
      • A an89

        can anybody tell me how to set static IP address using c++ code using win32 API

        K Offline
        K Offline
        killabyte
        wrote on last edited by
        #3

        sounds like a disaster in the making to me mate. hard coding an IP address is going to fall over sooner or later depending on the network config. i would ask if u really need to set a static IP addr or weather u can use a "localhost" type workaround

        A 1 Reply Last reply
        0
        • A an89

          can anybody tell me how to set static IP address using c++ code using win32 API

          V Offline
          V Offline
          Varghese Paul M
          wrote on last edited by
          #4

          Try method EnableStatic. See http://msdn.microsoft.com/en-us/library/aa390383(VS.85).aspx[^]

          1 Reply Last reply
          0
          • K killabyte

            sounds like a disaster in the making to me mate. hard coding an IP address is going to fall over sooner or later depending on the network config. i would ask if u really need to set a static IP addr or weather u can use a "localhost" type workaround

            A Offline
            A Offline
            an89
            wrote on last edited by
            #5

            yes,my application requires so.could u pls help?my code is showing unhandled exception in this line HRESULT hr = pSvc->GetObject(ClassName,0,NULL,&pClassObj,NULL);

            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