NdrStubCall2 function (rpcndr.h)

The NdrStubCall2 function is the server-side entry point for /Oicf mode stubs.

Syntax

long NdrStubCall2(
  [in]      void          *pThis,
  [in]      void          *pChannel,
  [in, out] PRPC_MESSAGE  pRpcMsg,
  [out]     unsigned long *pdwStubPhase
);

Parameters

[in] pThis

Pointer to an instance of the CStdStubBuffer object, implementing IRpcStubBuffer, for the DCOM interface. Set to NULL for nonobject RPC interfaces.

[in] pChannel

Pointer to IRpcChannelBuffer for the DCOM interface, often provided by OLE. Set to NULL for nonobject interfaces.

[in, out] pRpcMsg

Pointer to an RPC_MESSAGE structure that contains information about the RPC request. In nonobject interfaces, pRpcMsg also contains information about the remoting method.

[out] pdwStubPhase

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

Return value

Returns S_OK upon success. Raises an exception upon error.

Remarks

The RPC run-time or OLE run-time calls NdrStubCall2 to invoke the server manager routine. The [out] parameters are marshalled and returned to RPC run-time or OLE run-time to send back to the client.

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.

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 rpcndr.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll