ReleaseComObject - DfComAutomationObject
Releases a reference to the Automation object without having to destroy the DataFlex wrapper object
Type: Procedure
Syntax
Procedure ReleaseComObject
Call Example
Send ReleaseComObject
Description
ReleaseComObject is sent to release a reference to the Automation object without having to destroy the DataFlex wrapper object.
Destroying a DataFlex COM wrapper object automatically releases its reference to a COM object.
The example below demonstrates the use of ReleaseComObject in the Simple Automation Controller sample to release the Simple Automation Server.
Procedure Test
Boolean bIsComObjectCreated
// Test to see If we are already connected. If we are connected,
// then the IsComObjectCreated Returns True.
Get IsComObjectCreated of oAutomationTest To bIsComObjectCreated
If (bIsComObjectCreated) Begin
// release the Automation Object from the DataFlex Automation Wrapper.
Send ReleaseComObject of oAutomationTest
End
End_Procedure // Test
| Col 1 | Col 2 |
|---|---|
| Note: | If you send ReleaseComObject to a COM object that has not been created, you will not get an error or warning. Use IsComObjectCreated to check prior to releasing the object. |
See Also