Tuy nhiên, bạn cũng có thể xác định tiêu đề của riêng bạn để tùy chỉnh các thông tin liên lạc giữa các máy chủ của bạn và khách hàng của nó. Thông thường, các tiêu đề chứa thông tin có liên quan với giao diện invokable toàn bộ, hoặc thậm chí với toàn bộ ứng dụng, chứ không phải chỉ là phương pháp đó là chủ đề của một tin nhắn đơn. | Marshaling data This is called late binding because the controller binds to the property or method at runtime rather than at compile time. Note When importing a type library Delphi will query for dispIDs at the time it generates the code thereby allowing generated wrapper classes to call Invoke without calling GetIDsOfNames. This can significantly increase the runtime performance of controllers. Custom interfaces Custom interfaces are user-defined interfaces that allow clients to invoke interface methods based on their order in the VTable and knowledge of the argument types. The VTable lists the addresses of all the properties and methods that are members of the object including the member functions of the interfaces that it supports. If the object does not support IDispatch the entries for the members of the object s custom interfaces immediately follow the members of IUnknown. If the object has a type library you can access the custom interface through its VTable layout which you can get using the Type Library editor. If the object has a type library and also supports IDispatch a client can also get the dispIDs of the IDispatch interface and bind directly to a VTable offset. Delphi s type library importer TLIBIMP retrieves dispIDs at import time so clients that use dispinterfaces can avoid calls to GetIDsOfNames this information is already in the _TLB unit. However clients still need to call Invoke. Marshaling data For out-of-process and remote servers you must consider how COM marshals data outside the current process. You can provide marshaling Automatically using the IDispatch interface. Automatically by creating a type library with your server and marking the interface with the OLE Automation flag. COM knows how to marshal all the Automation-compatible types in the type library and can set up the proxies and stubs for you. Some type restrictions apply to enable automatic marshaling. Manually by implementing all the methods of the IMarshal interface. This is .