Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

NdrStubForwardingFunction function

The NdrStubForwardingFunction function is the entry point for server-side object methods that are defined in a base interface.

Syntax


RPCRTAPI void __RPC_STUB NdrStubForwardingFunction(
  _In_     IRpcStubBuffer *pThis,
  _In_     IRpcChannelBuffer *pChannel,
  _Inout_  PRPC_MESSAGE pMsg,
  _Out_    DWORD *pdwStubPhase
);

Parameters

pThis [in]

Pointer to an instance of the CStdStubBuffer object, implementing IRpcStubBuffer, for the DCOM interface.

pChannel [in]

Pointer to IRpcChannelBuffer for the DCOM interface, often provided by OLE.

pMsg [in, out]

Pointer to an RPC_MESSAGE structure that contains information about the RPC request.

pdwStubPhase [out]

Pointer to a flag that tracks the current interpreter call's activity.

Return value

This function has no return value. Throws an exception upon error.

Remarks

The pdwStubPhase parameter is used by the object interface to determine exception handling behavior. The following table describes possible values for the pdwStubPhase parameter.

ValueDescription
STUB_UNMARSHALThe stub is in marshalling phase.
STUB_CALL_SERVERThe stub is calling a server manager routine.
STUB_MARSHALThe stub is in unmarshalling phase.
STUB_CALL_SERVER_NO_HRESULTObsolete. For deprecated stubs only.

 

For methods that are defined in a base interface, RPC needs to forward the code to the base interface implementation. For example:


Interface IFunctionSample: IUnknown

{

HRESULT FunctionSample();

}

Interface IOperation: IFunctionSample

{

HRESULT Operation();

}


In this example, where IFunctionSample and IOperation are defined in different .idl files. IFunctionSample is the base interface and IOperation is the derived interface. IOperation can aggregate IOperation without implementing IOperation::FunctionSample. When the client calls IOperation::FunctionSample, in the server side, RPC forwards the call to IFunctionSample:FunctionSample.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Rpcproxy.h

Library

RpcRT4.lib

DLL

RpcRT4.dll

 

 

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.