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. How do I find out what workgroup/domain a host is in?

How do I find out what workgroup/domain a host is in?

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • P Offline
    P Offline
    Paul Vickery
    wrote on last edited by
    #1

    I am trying to find some code which will enable me to find out what domain or workgroup a given host is in. There is a function for this on Win2000, but I need it on NT4. Does anyone have any ideas? --- "The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)

    M 1 Reply Last reply
    0
    • P Paul Vickery

      I am trying to find some code which will enable me to find out what domain or workgroup a given host is in. There is a function for this on Win2000, but I need it on NT4. Does anyone have any ideas? --- "The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      Not sure if this is what you need, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/hh/network/ntlmapi2_07zj.asp Michael :-)

      P 1 Reply Last reply
      0
      • M Michael P Butler

        Not sure if this is what you need, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/hh/network/ntlmapi2_07zj.asp Michael :-)

        P Offline
        P Offline
        Paul Vickery
        wrote on last edited by
        #3

        Nearly. The link you posted (to NetWkstaUserGetInfo) gets info about the user's log-on domain info. However, just near this on MSDN was NetWkstaGetInfo which does the trick. Thanks, Paul. :cool: --- "The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)

        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