M&M FDT 1.2.1 Online Specification
 IDtm::PrepareToRelease() method information


Interfaces and Methods   -   Schemas   -   FDT Specification   -   Quicklinks   -   Abbreviations

4.3.1.7 IDtm::PrepareToRelease()


This method can be called in the states:        

HRESULT PrepareToRelease (
[out, retval] VARIANT_BOOL* result
);


Description:
Used to inform the DTM that it has to release it links to other components. The DTM will be released by the Frame Application.

Parameters:


Return Value:
resultTRUE The DTM will release its links to other components FALSE The operation failed.


Behavior:
The DTM has to release all links to other components and has to terminate all pending or running functions. It must also close all user interfaces. The DTM sends a notification via IDtmEvents::OnPreparedToRelease() to the Frame Application if the DTM can be released.

Comments:
It is up to a DTM to decide, if transient data should be stored or not. To store the data, IFdtContainer::SaveRequest() should be called. Remark: The DTM has to implement a proper behavior concerning chapter '5.13.1.2 Persistence' to give a Frame Application the information about the storing state of DTM related data (refer to '13.1 FDT Data Types' attribute 'storageState').


Related dtmINSPECTOR hints:
Thomas Weller
created on 2006-07-19, last updated on 2006-07-19
dtmINSPECTOR Test: MainReleaseDTM
According to dtmINSPECTOR, the return value FALSE can only be used when the DTM is in a wrong state (Test TcExReleaseDTM_A and TcExReleaseDTM_C). In all other cases it is assumed that the DTM will release sooner or later. The DTM must also accept Release() if it is still busy in doing somthing which lasts some seconds (such as initialization).
Programmers most often forget to close user interfaces when the DTM is hut down. In fact, Frame Applications typically close user interfaces before shutting down a DTM. Whether or not a DTM closes its open user interfaces is tested in TcExReleaseDTM_B. IFdtActiveX::CloseActiveXControlRequest() can be used to close ActiveX controls.
Closing user interfaces also applies to applications which have been started (IDtmApplication::StartApplication()). Test TcExReleaseDTM_D checks this.


© by M&M Software GmbH, parts of this website taken from FDT Interface Specification Version 1.2.1, © by FDT Group, AISBL.
This website is published for support of M&M products as granted in license conditions, chapter 2.1.
Last updated 2015-02-05 15:17
Email: FDT Technical Support Line.