<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > COM > COM_Release |
Description
Release an allocated COM reference.
Syntax
n = COM_Release(pIDispatch)
Returns
None
Parameters
Name |
Type |
Optional |
Meaning |
pIDispatch |
Numeric |
No |
pIDispatch variable returned by COM_CreateObject function |
Remarks
Restrictions
See also
Examples
USES "COM"
Dim pXlApp As DWORD
Dim RetVal As Long
'---Try to create an Excel application reference
pXlApp = COM_CreateObject("Excel.Application", RetVal)
'---Do something ...
'--- Time to release the allocated interface objects
If ISFALSE(COM_Succeeded(COM_Release(pXlSheet))) Then
MSGBOX 0, "ActiveSheet release fails"
End If