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. Cant compile GetComputerNameEx

Cant compile GetComputerNameEx

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
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.
  • B Offline
    B Offline
    bjolletts
    wrote on last edited by
    #1

    Im having trouble getting the GetComputerNameEx() function to compile. I have Visual C++ 6.0 on Windows 2000 Pro with Platform SDK installed. header is included and in Options -> Directories I have added the path C:\PROGRAM\MICROSOFT SDK\INCLUDE in the first position for include files and C:\PROGRAM\MICROSOFT SDK\LIB for library files. I thought this was all you needed to do ... but I still get error C2065: 'GetComputerNameEx' : undeclared identifier Any ideas ? :) Thanks in advance ! / daniel

    S 1 Reply Last reply
    0
    • B bjolletts

      Im having trouble getting the GetComputerNameEx() function to compile. I have Visual C++ 6.0 on Windows 2000 Pro with Platform SDK installed. header is included and in Options -> Directories I have added the path C:\PROGRAM\MICROSOFT SDK\INCLUDE in the first position for include files and C:\PROGRAM\MICROSOFT SDK\LIB for library files. I thought this was all you needed to do ... but I still get error C2065: 'GetComputerNameEx' : undeclared identifier Any ideas ? :) Thanks in advance ! / daniel

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      You need to set the symbol _WIN32_WINNT to 0x0500 or greater, to specifically target Win2000 or XP. If you don't do this, the declarations in winbase.h are #if'd out. Of course, this also means your app cannot run on WinNT or Win9x/ME, unless you delayload the appropriate DLL and then test OS version at runtime. Steve S

      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