mattKnight
Programmer
Hi all,
I have a routine that reads the local group memeberships for a NT/2000 user using NetUserGetLocalGroups API. I would like to extend the functionality to check domain groups.
However MSDN is fairly vague about NetUserGetGroups...
NET_API_STATUS NetUserGetGroups(
LPCWSTR servername,
LPCWSTR username,
DWORD level,
LPBYTE *bufptr,
DWORD prefmaxlen,
LPDWORD entriesread,
LPDWORD totalentries
);
Parameters
servername
[in] Pointer to a constant Unicode string specifying the name of the remote server on which the function is to execute. The string must begin with \\. If this parameter is NULL, the local computer is used.
username
... <snip>
My question uns about the value for server name:
should it be the Domain Controller (PDC), Local Machine or soemthing else. I assume the it should be PDC, but as I don't have access to a domain I can't test it!
The object is to allow the user's group memberships to access certain parts of the program.
As a side issue, my APIViewer doesn't show a value for constant MAX_PREFERRED_LENGTH, so I can't define it... Does any one know what it is?
Thanks all
Matt
I have a routine that reads the local group memeberships for a NT/2000 user using NetUserGetLocalGroups API. I would like to extend the functionality to check domain groups.
However MSDN is fairly vague about NetUserGetGroups...
NET_API_STATUS NetUserGetGroups(
LPCWSTR servername,
LPCWSTR username,
DWORD level,
LPBYTE *bufptr,
DWORD prefmaxlen,
LPDWORD entriesread,
LPDWORD totalentries
);
Parameters
servername
[in] Pointer to a constant Unicode string specifying the name of the remote server on which the function is to execute. The string must begin with \\. If this parameter is NULL, the local computer is used.
username
... <snip>
My question uns about the value for server name:
should it be the Domain Controller (PDC), Local Machine or soemthing else. I assume the it should be PDC, but as I don't have access to a domain I can't test it!
The object is to allow the user's group memberships to access certain parts of the program.
As a side issue, my APIViewer doesn't show a value for constant MAX_PREFERRED_LENGTH, so I can't define it... Does any one know what it is?
Thanks all
Matt