Let's assume you have Unicode arrays declared like this: WCHAR wcUser [UNLEN]; WCHAR wcAdmGroup [64]; In one you put the name of the user (use GetUserName to fetch the current user. If you're an ANSI app you'll need to use MultiByteToWideChar to convert to Unicode). Similarly get the server name and convert that to Unicode, then put it in wcServer. Now we could use code like that below to determine if wcUser is a member of wcAdmGroup. I've removed the error handling code for clarity. #include "lm.h" #define MAX_GROUPS 30 NET_API_STATUS nasReturn; WCHAR * pwcBuffer ; GROUP_USERS_INFO_0 UserInfo [MAX_GROUPS]; GROUP_USERS_INFO_0 * pUserInfo = UserInfo; DWORD dwEntriesRead ; DWORD dwTotalEntries ; DWORD dwBufferSize = GNLEN*MAX_GROUPS*2; DWORD dwCount ; bResult = FALSE; // Allocate memory for group list buffer. nasReturn = NetApiBufferAllocate (dwBufferSize,(void**)&pwcBuffer); // Set the structure pointers to point at our buffer. for (dwCount=0; dwCount