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. IP adress

IP adress

Scheduled Pinned Locked Moved C / C++ / MFC
question
2 Posts 1 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.
  • L Offline
    L Offline
    Le Ridder Noir
    wrote on last edited by
    #1

    How do I get the local IP adress from my workstation Does anyone have an idea With kind regards Le Ridder Noir Considderd to be the worlds fastest knoppenbonker. 10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). And experience with the one and only NewEra Guru.

    L 1 Reply Last reply
    0
    • L Le Ridder Noir

      How do I get the local IP adress from my workstation Does anyone have an idea With kind regards Le Ridder Noir Considderd to be the worlds fastest knoppenbonker. 10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). And experience with the one and only NewEra Guru.

      L Offline
      L Offline
      Le Ridder Noir
      wrote on last edited by
      #2

      Hello "knoppenbonker" First rtfm before you ask questions to this forum. For this time I spare you. Here's your code: WSADATA wsaData; struct sockaddr_in sock; char hostname[128]; WSAStartup(0x0101, &wsaData); gethostname(hostname, 128); HOSTENT * lpHost = gethostbyname(hostname); memcpy(&(sock.sin_addr), lpHost->h_addr_list[0], lpHost->h_length); TRACE2 ("Host Name: %s IP address : %s",hostname, inet_ntoa(sock.sin_addr)); WSACleanup(); :suss: :suss: :suss: :suss: :suss: :suss: :suss: :suss: :suss: :suss: :suss: :suss: :suss: Considderd to be the worlds fastest knoppenbonker. 10 Months of working experience with the worlds fastest copie paster(about 2000 lines a minute). And experience with the one and only NewEra Guru.

      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