RpcEpRegisterW function (rpcdce.h)

The RpcEpRegister function adds to or replaces server address information in the local endpoint-map database.


RPC_STATUS RpcEpRegisterW(
  RPC_IF_HANDLE      IfSpec,
  RPC_BINDING_VECTOR *BindingVector,
  UUID_VECTOR        *UuidVector,
  RPC_WSTR           Annotation



Interface to register with the local endpoint-map database.


Pointer to a vector of binding handles over which the server can receive remote procedure calls.


Pointer to a vector of object UUIDs offered by the server. The server application constructs this vector.A null argument value indicates there are no object UUIDs to register.


Pointer to the character-string comment applied to each cross-product element added to the local endpoint-map database. The string can be up to 64 characters long, including the null terminating character. Specify a null value or a null-terminated string ("\0") if there is no annotation string.

The annotation string is used by applications for information only. RPC does not use this string to determine which server instance a client communicates with or for enumerating elements in the endpoint-map database.

Return value

Value Meaning
The call succeeded.
No bindings.
The binding handle was invalid.
This was the wrong kind of binding for the operation.
Note  For a list of valid error codes, see RPC Return Values.


The RpcEpRegister function adds or replaces entries in the local host's endpoint-map database. For an existing database entry that matches the provided interface specification, binding handle, and object UUID, this function replaces the entry's endpoint with the endpoint in the provided binding handle.

A server can use RpcEpRegister and RpcEpRegisterNoReplace to register entries in the endpoint mapper database. Previous to Windows 2000, two functions were available to enable a server to overwrite stale entries in the endpoint mapper database left from previous server instances that are no longer running. The endpoint mapper database automatically removes entries registered by a server instance as soon as the server stops functioning. However, servers are not allowed to replace the endpoint mapper entries of another server for security purposes. Therefore, RpcEpRegister and RpcEpRegisterNoReplace perform largely the same functionality.

A server application calls RpcEpRegister to register endpoints specified by calling any of the following functions:

If the server also exports to the name-service database, the server calls RpcEpRegister with the same IfSpec, BindingVector, and UuidVector values used when calling the RpcNsBindingExport function.

If a protocol sequence is used without specifying an endpoint, the RPC run-time library automatically generates a dynamic endpoint.. In this case, the server can call RpcServerInqBindings followed by RpcEpRegister to make itself available to multiple clients. Otherwise, the automatically started server is known only to the client for which the server was started.Each element added to the endpoint-map database logically contains the following:

  • Interface UUID
  • Interface version (major and minor)
  • Binding handle
  • Object UUID (optional)
  • Annotation (optional)
RpcEpRegister creates a cross-product from the IfSpec, BindingVector, and UuidVector parameters and adds each element in the cross-product as a separate registration in the endpoint-map database.


The rpcdce.h header defines RpcEpRegister 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.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header rpcdce.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll

See also