This example (which should be under VisualBASIC but has ended up in the wrong section - apoligies) demonstrates a number of API calls available from
netapi32.dll which can get all the workstations, users, groups and
local groups from a domain and provide extensive information on each
entity. The code could form the basis for developing a domain management or
monitoring package. Some of the API calls that are demonstrated include: -
NetGetDCName, NetUserGetInfo, NetGroupEnum, NetSessionEnum, NetGroupGetUsers, NetLocalGroupEnum, NetLocalGroupGetMembers, NetServerEnum, NetShareEnum, NetUserEnum, NetWkstaUserEnum