The RpcNsGroupMbrAdd function adds an entry name to a group. If necessary, it creates the entry.
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcNsGroupMbrAdd(
unsigned long GroupNameSyntax,
unsigned char * GroupName,
unsigned long MemberNameSyntax,
unsigned char * MemberName
);
To use the syntax specified in the registry value HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\
DefaultSyntax, provide a value of RPC_C_NS_SYNTAX_DEFAULT.
To use the syntax specified in the registry value HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\
DefaultSyntax, provide a value of RPC_C_NS_SYNTAX_DEFAULT.
Value | Meaning |
---|---|
RPC_S_OK | Success |
RPC_S_INVALID_NAME_SYNTAX | Invalid name syntax |
RPC_S_UNSUPPORTED_NAME_SYNTAX | Unsupported name syntax |
RPC_S_INCOMPLETE_NAME | Incomplete name |
RPC_S_NAME_SERVICE_UNAVAILABLE | Name service unavailable |
Note The Windows NT 5.0 Active Directory Service supports this function. Support is not available from the Microsoft Locator in earlier versions of NT.
The RpcNsGroupMbrAdd adds a name-service database entry name as a member to the RPC group attribute.
If the GroupName entry does not exist, RpcNsGroupMbrAdd tries to create the entry with a group attribute and adds the group member specified by the MemberName argument. In this case, the application must have the privilege to create the entry. Otherwise, a management application with the necessary privilege should create the entry by calling the RpcNsMgmtEntryCreate routine before the application is run.
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in rpcnsi.h.
Import Library: Link with rpcns4.lib.
RpcNsGroupMbrRemove, RpcNsMgmtEntryCreate