Machine Names

This is a discussion on Machine Names within the Windows Programming forums, part of the Platform Specific Boards category; How can I enumerate logged in machine names ?...

  1. #1
    wxccccc
    Guest

    Machine Names

    How can I enumerate logged in machine names ?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786

    Re: Machine Names

    Originally posted by wxccccc
    How can I enumerate logged in machine names ?
    Looking for machines on a network??

    Go to MSDN and lookup WNetOpenEnum & WNetEnumResource

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    14

    Like this

    I asked the same question quite a while ago.

    heres the thread.

    Checking for connected workstations.

  4. #4
    wxcx
    Guest
    What I'm trying to do is run this off a server so that I can get:

    IP Machine Name
    ---- ---------------------
    192.168.31.26 Boss_Laptop
    192.168.31.94 Manager_HP

  5. #5
    wxcx
    Guest
    I found this example, but I have no idea how to use it !

    All i'd like is the machine names (maybe the usernames and ip addresses) in a simple 1D array of strings (or more depending the amount of info retrieved) .. so I can use it in a C# program...



    Code:
    Enumerating Users
        dwPreferredSize = (sizeof(NET_DISPLAY_USER) + (3 * UNLEN) * s_iMaximumUserCount);
        pNDU = NULL;
        lError = NetQueryDisplayInformation(NULL,                  // NULL means LocalMachine
                                            1,                     // query User information
                                            0,                     // starting with the first user
                                            s_iMaximumUserCount,   // return a max of 100 users
                                            dwPreferredSize,       // preferred buffer size
                                            &dwEntriesRead,
                                            reinterpret_cast<void**>(&pNDU));

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Machine Learning with Lego Mindstorms
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-30-2009, 01:34 PM
  2. Replies: 4
    Last Post: 01-18-2008, 06:05 PM
  3. reading folder names..how is it done ?
    By roalme00 in forum C++ Programming
    Replies: 8
    Last Post: 01-11-2008, 09:34 AM
  4. Porting from 32 bit machine to 64 bit machine!
    By anoopks in forum C Programming
    Replies: 10
    Last Post: 02-25-2005, 07:02 PM
  5. Designing State Machine
    By axon in forum Tech Board
    Replies: 3
    Last Post: 11-06-2003, 11:13 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21