$ObjCreate
Documentation | Blog | Demos | Support
$ObjCreate
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |
Creates the named ActiveX object.
Syntax
$ObjCreate (ProgId)
Parameters
ProgId | a string or an expression that evaluates to a string |
Return Value
Returns an object that can be assigned to a variable of type object.
Comments
An ActiveX or COM object is identified by a GUID (a globally unique number). A ProgId identifies a COM object with a meaningful name. It looks like vendor.component.version or vendor.component.
When you assign to an Object variable using $ObjCreate, the existing COM object referenced by the Object variable (if any) is released.
Before your program terminates, it’s a good idea to set any Object variables to $Null, so that the objects your program used can be released. Otherwise, even after your program terminates, because the Zim variables still exist and still reference the COM objects you used, the objects will still be active and consuming memory and resources.
This does not apply to the OLE control form variable, since when the form is closed the OLE control is automatically released, but it does apply to any objects returned from an OLE control via $ ObjRunMethod or $ ObjGetProperty.
Warning
COM objects are being discontinued by Microsoft and may not be available in future releases of Zim-X.
0 out of 5 stars
5 Stars | 0% | |
4 Stars | 0% | |
3 Stars | 0% | |
2 Stars | 0% | |
1 Stars | 0% |