The RpcNsMgmtBindingUnexport function removes multiple binding handles and objects from an entry in the name-service database.
#include <rpc.h>
RPC_STATUS RPC_ENTRY RpcNsMgmtBindingUnexport(
unsigned long EntryNameSyntax,
unsigned char * EntryName,
RPC_IF_ID * IfId,
unsigned long VersOption,
UUID_VECTOR * ObjectUuidVec
);
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.
The following table describes valid values for the VersOption argument:
VersOption values | Description |
---|---|
RPC_C_VERS_ALL | Unexports all bindings for the interface UUID in IfId, regardless of the version numbers. For this value, specify 0 for both the major and minor versions in IfId. |
RPC_C_VERS_IF_ID | Unexports the bindings for the compatible interface UUID in IfId with the same major version and with a minor version greater than or equal to the minor version in IfId. |
RPC_C_VERS_EXACT | Unexports the bindings for the interface UUID in IfId with the same major and minor versions as in IfId. |
RPC_C_VERS_MAJOR_ONLY | Unexports the bindings for the interface UUID in IfId with the same major version as in IfId (ignores the minor version). For this value, specify 0 for the minor version in IfId. |
RPC_C_VERS_UPTO | Unexports the bindings that offer a version of the specified interface UUID less than or equal to the specified major and minor version. (For example, if the IfId contained V2.0 and the name-service database entry contained binding handles with the versions V1.3, V2.0, and V2.1, the RpcNsMgmtBindingUnexport routine unexports the binding handles with V1.3 and V2.0.) |
Value | Meaning |
---|---|
RPC_S_OK | Success |
RPC_S_INVALID_VERS_OPTION | Invalid version option |
RPC_S_NOTHING_TO_UNEXPORT | Nothing to unexport |
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 |
RPC_S_INTERFACE_NOT_FOUND | Interface not found |
RPC_S_NOT_ALL_OBJS_UNEXPORTED | Not all objects unexported |
The RpcNsMgmtBindingUnexport routine allows a management application to remove one of the following from a name-service database entry:
A management application can unexport interfaces and objects in a single call to RpcNsMgmtBindingUnexport, or it can unexport them separately.
If RpcNsMgmtBindingUnexport does not find any binding handles for the specified interface, the routine returns an RPC_S_INTERFACE_NOT_FOUND status code and does not unexport the object UUIDs, if any were specified.
If one or more binding handles for the specified interface are found and unexported without error, RpcNsMgmtBindingUnexport unexports the specified object UUIDs, if any.
If any of the specified object UUIDs were not found, RpcNsMgmtBindingUnexport returns the RPC_S_NOT_ALL_OBJS_UNEXPORTED status code.
In addition to calling RpcNsMgmtBindingUnexport, a management application should also call the RpcMgmtEpUnregister routine to unregister the servers that have registered with the endpoint-map database.
Note Name-service databases are designed to be relatively stable. In replicated name services, frequent use of the RpcNsBindingExport and RpcNsBindingUnexport routines causes the name service to repeatedly remove and replace the same entry and can cause performance problems.
Windows NT: Yes
Windows CE: Unsupported.
Header: Declared in rpcnsi.h.
Import Library: Link with rpcns4.lib.
RpcMgmtEpUnregister, RpcNsBindingExport, RpcNsBindingUnexport