RAD Studio
|
For out-of-process and remote servers, you must consider how COM marshals data outside the current process. You can provide marshaling:
Function result and parameter types of the methods declared in dual and dispatch interfaces and interfaces that you mark as OLE Automation must be Automation-compatible types. The following types are OLE Automation-compatible:
First, the predefined valid types such as Smallint, Integer, Single, Double, WideString. For a complete list, see Valid types.
Second, enumeration types defined in a type library. OLE Automation-compatible enumeration types are stored as 32-bit values and are treated as values of type Integer for purposes of parameter passing.
Third, interface types defined in a type library that are OLE Automation safe, that is, derived from IDispatch and containing only OLE Automation compatible types.
Fourth, dispinterface types defined in a type library.
Fifth, any custom record type defined within the type library.
Sixth, IFont, IStrings, and IPicture. Helper objects must be instantiated to map
For an interface to support automatic marshaling (also called Automation marshaling or type library marshaling), the following restrictions apply. When you edit your object using the type library editor, the editor enforces these restrictions:
Typically, you use automatic marshaling in out-of-process and remote servers because it is easier—COM does the work for you. However, you may decide to provide custom marshaling if you think you can improve marshaling performance. When implementing your own custom marshaling, you must support the IMarshal interface. For more information, on this approach, see the Microsoft documentation.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|