Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than netapi32, prefix the name with the module name and a period.
[DllImport("NetApi32.dll", CharSet=CharSet.Auto, SetLastError=true)]
private static extern Int32 NetLocalGroupAddMembers(
string servername, //server name
string groupname, //group name
UInt32 level, //info level
ref LOCALGROUP_MEMBERS_INFO_3 buf, //Group info structure
UInt32 totalentries //number of entries
Declare Function NetLocalGroupAddMembers Lib "netapi32.dll" (TODO) As TODO
Alternative Managed API:
Here's some sample code that can do this using System.DirectoryServices
//Error codes associated with 'NetLocalGroupAddMembers'
//The local group specified by the groupname parameter does not exist.
private const int NERR_GroupNotFound = 2220;
//The user does not have access to the requested information.
private const int ERROR_ACCESS_DENIED = 5;
// One or more of the members specified do not exist. Therefore, no new members were added.
private const int ERROR_NO_SUCH_MEMBER = 1387;
// One or more of the members specified were already members of the local group. No new members were added.
private const int ERROR_MEMBER_IN_ALIAS = 1378;
// One or more of the members cannot be added because their account type is invalid. No new members were added.
private const int ERROR_INVALID_MEMBER = 1388;
public string Domain;
private struct LOCALGROUP_MEMBERS_INFO_0
public IntPtr pSID;