RpcNsGroupMbrAdd  1685IRG

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

 

   );

 

 

Parameters

GroupNameSyntax

Specifies an integer value that indicates the syntax of the next argument, GroupName.

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.

GroupName

Points to the name of the RPC group to receive a new member.

MemberNameSyntax

Specifies an integer value that indicates the syntax to use in the MemberName argument.

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.

MemberName

Points to the name of the new RPC group member.

 

Remarks

 

Note  This DCE function is not supported by the Microsoft Locator.

 

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.

Return Values

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

 

See Also

RpcNsGroupMbrRemove, RpcNsMgmtEntryCreate