Parameter limitations

Because remote procedure calls usually span tasks, RPC Services cannot accommodate the full expressiveness of the C++ language in the client interface.

NOTE Stub generators often have their own limitations on the parameters that you can use in a remote procedure call. If you use a stub generator, be sure you are familiar with its limitations.

No raw pointers--A raw pointer passed to another task, or to another host, loses validity. Because callers and their corresponding dispatchers typically run in separate tasks or on separate machines, you cannot successfully pass raw pointers between them.

Instead of passing a raw pointer, you can pass the data contained by a pointer or flatten the pointer and resurrect it on the other side of the task or machine boundary.

No out parameter values on exceptions--With local member functions, you can define that certain out parameters are in particular states on an exception or on specific exceptions. With RPC interfaces, you cannot do this. On an exception, you must leave the caller side output parameters in their initial state. The model for stub creation presented here takes care of this for you, but you need to be careful not to change the functionality.

No qualified-name calling--C++ allows qualified-name calling that RPC Services does not support.


For example, suppose you define a class named TDerived that derives from TBase and overrides the EmptyTrash function of TBase. Next, you create an instance of TDerived called aKid. When you make the call to aKid.EmptyTrash, the TDerived::EmptyTrash member function executes. C++ also allows you to explicitly call TBase::EmptyTrash by specifying aKid.TBase::EmptyTrash.

In RPC Services, you always get the most derived overridden member function on the dispatcher side; there is no equivalent syntax to call one of the less-derived member functions.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker