RpcNsProfileEltRemove

The RpcNsProfileEltRemove function removes an element from a profile.

#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcNsProfileEltRemove( 
  unsigned long  ProfileNameSyntax,   
  unsigned char *  ProfileName,   
  RPC_IF_ID *  IfId,              
  unsigned long  MemberNameSyntax,   
  unsigned char *  MemberName     
);
 

Parameters

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

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.

ProfileName
Points to the name of the profile from which to remove an element.
IfId
Points to the interface identification of the profile element to be removed.

Specify a null value to remove the default profile member.

MemberNameSyntax
Specifies an integer value that indicates the syntax of the next argument, 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.

MemberName
Points to the name-service entry name in the profile element to remove.

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_ENTRY_NOT_FOUND Name-service entry not found
RPC_S_NAME_SERVICE_UNAVAILABLE Name service unavailable

Remarks

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 RpcNsProfileEltRemove routine removes a profile element from the profile attribute in the ProfileName entry. The RpcNsProfileEltRemove routine requires an exact match of the MemberName and IfId arguments in order to remove a profile element.

The entry (MemberName) included as a member in the profile element is not deleted.

Use RpcNsProfileEltRemove cautiously: removing elements from a profile can have the unwanted effect of breaking a hierarchy of profiles.

QuickInfo

  Windows NT: Yes
  Windows CE: Unsupported.
  Header: Declared in rpcnsi.h.
  Import Library: Link with rpcns4.lib.

See Also

RpcNsProfileDelete, RpcNsProfileEltAdd