NdrStubCall2 Function

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

Syntax

C++
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 clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderRpcndr.h (include Rpc.h)
LibraryRpcRT4.lib
DLLRpcRT4.dll

Send comments about this topic to Microsoft

Build date: 5/28/2009

Tags :


Page view tracker