NdrStubForwardingFunction function (rpcproxy.h)
The NdrStubForwardingFunction function is the entry point for server-side object methods that are defined in a base interface.
Syntax
void NdrStubForwardingFunction(
[in] IRpcStubBuffer *This,
[in] IRpcChannelBuffer *pChannel,
[in, out] PRPC_MESSAGE pmsg,
[out] DWORD *pdwStubPhase
);
Parameters
[in] This
Pointer to an instance of the CStdStubBuffer object, implementing IRpcStubBuffer, for the DCOM interface.
[in] pChannel
Pointer to IRpcChannelBuffer for the DCOM interface, often provided by OLE.
[in, out] pmsg
Pointer to an RPC_MESSAGE structure that contains information about the RPC request.
[out] pdwStubPhase
Pointer to a flag that tracks the current interpreter call's activity.
Return value
None
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.
Value | Description |
---|---|
STUB_UNMARSHAL | The stub is in marshalling phase. |
STUB_CALL_SERVER | The stub is calling a server manager routine. |
STUB_MARSHAL | The stub is in unmarshalling phase. |
STUB_CALL_SERVER_NO_HRESULT | Obsolete. 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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps | UWP apps] |
Minimum supported server | Windows 2000 Server [desktop apps | UWP apps] |
Target Platform | Windows |
Header | rpcproxy.h |
Library | Rpcrt4.lib |
DLL | Rpcrt4.dll |