NdrStubCall2 function

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

Syntax


RPCRTAPI long RPC_ENTRY NdrStubCall2(
  _In_    struct IRpcStubBuffer    *pThis,
  _In_    struct IRpcChannelBuffer *pChannel,
  _Inout_ PRPC_MESSAGE             pRpcMsg,
  _Out_   unsigned long            *pdwStubPhase
);

Parameters

pThis [in]

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

pChannel [in]

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

pRpcMsg [in, out]

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

pdwStubPhase [out]

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.

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.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | UWP apps]

Minimum supported server

Windows 2000 Server [desktop apps | UWP apps]

Header

Rpcndr.h (include Rpc.h)

Library

RpcRT4.lib

DLL

RpcRT4.dll

 

 

Show: