RpcNsGroupMbrAddW function (rpcnsi.h)
The RpcNsGroupMbrAdd function adds an entry name to a group. If necessary, it creates the entry.
Syntax
RPC_STATUS RpcNsGroupMbrAddW(
unsigned long GroupNameSyntax,
RPC_WSTR GroupName,
unsigned long MemberNameSyntax,
RPC_WSTR MemberName
);
Parameters
GroupNameSyntax
Syntax of GroupName.
To use the syntax specified in the registry value entry HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\DefaultSyntax, provide a value of RPC_C_NS_SYNTAX_DEFAULT.
GroupName
Pointer to the name of the RPC group to receive a new member.
MemberNameSyntax
Syntax to use in MemberName.
To use the syntax specified in the registry value entry HKEY_LOCAL_MACHINE\Software\Microsoft\Rpc\NameService\DefaultSyntax, provide a value of RPC_C_NS_SYNTAX_DEFAULT.
MemberName
Pointer to the name of the new RPC group member.
Return value
Value | Meaning |
---|---|
|
The call succeeded. |
|
The name syntax is invalid. |
|
The name syntax is not supported. |
|
The name is incomplete. |
|
The name service is unavailable. |
Remarks
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 MemberName. 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 RpcNsMgmtEntryCreate before the application is run.
Note
The rpcnsi.h header defines RpcNsGroupMbrAdd as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | rpcnsi.h (include Rpc.h) |
Library | Rpcns4.lib |
DLL | Rpcns4.dll |