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