Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

RpcServerRegisterIf function

The RpcServerRegisterIf function registers an interface with the RPC run-time library.

Syntax


RPC_STATUS RPC_ENTRY RpcServerRegisterIf(
  RPC_IF_HANDLE IfSpec,
  UUID *MgrTypeUuid,
  RPC_MGR_EPV *MgrEpv
);

Parameters

IfSpec

MIDL-generated structure indicating the interface to register.

MgrTypeUuid

Pointer to a type UUID to associate with the MgrEpv parameter. Specifying a null parameter value (or a nil UUID) registers IfSpec with a nil-type UUID.

MgrEpv

Manager routines' entry-point vector (EPV). To use the MIDL-generated default EPV, specify a null value. For more information, please see RPC_MGR_EPV.

Return value

Returns RPC_S_OK upon success.

Note  For a list of valid error codes, see RPC Return Values.

Remarks

A server can register an unlimited number of interfaces with the RPC run-time library. Registration makes an interface available to clients using a binding handle to the server. To register an interface, the server application code calls RpcServerRegisterIf. For each implementation of an interface that a server offers, it must register a separate manager EPV.

When calling RpcServerRegisterIf, the server provides the following information:

  • Interface specification

    The interface specification is a data structure that the MIDL compiler generates. The server specifies the interface using the IfSpec parameter.

  • Manager type UUID and manager EPV

    The manager type UUID and the manager EPV determine which manager routine executes when a server receives a remote procedure call request from a client.

    The server specifies the manager type UUID and EPV using the MgrTypeUuid and MgrEpv parameters. Note that when specifying a non-nil manager-type UUID, the server must also call the RpcObjectSetType function to register objects of this non-nil type.

If your server application needs to register an auto-listen interface or use a callback function for authentication purposes, use RpcServerRegisterIfEx.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Rpcdce.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

See also

Registering Interfaces
RpcBindingFromStringBinding
RpcBindingSetObject
RpcNsBindingExport
RpcNsBindingImportBegin
RpcNsBindingLookupBegin
RpcObjectSetType
RpcServerUnregisterIf
RpcServerUnregisterIfEx
RpcServerRegisterIf2
RpcServerRegisterIf3
RpcServerRegisterIfEx

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.