TVirtualInterface = class(TInterfacedObject, IInterface)
class PASCALIMPLEMENTATION TVirtualInterface : public System::TInterfacedObject
Provides functionality for remote procedure call marshaling.
The main application area of TVirtualInterface is SOAP messaging. The SOAP server declares a service with specific functions. The WSDL importer creates a Object Pascal interface that "mirrors" the server service. On the client side, a class is created at run time that implements the Object Pascal interface that reflects the server service (TVirtualInterface). When a method of this class is called, the call is packed in a SOAP envelope, sent to the server, decoded, and the result is sent back to the Object Pascal client.
TVirtualInterface doesn't behave like an ordinary class. Each instance has an associated reference counter to automatically free itself. The constructor doesn't increment the reference counter. A TVirtualInterface instance should be cast to an interface instance immediately after construction (or QueryInterface should be used).