
InitComInstance()
This may not be needed if we can treat commandbar objects as static
// use this to find the Commandbar COM control and attach this object to it.
// If a COM object cannot be found, this is an error and and error is declared.
Procedure AttachComObject
Handle hoCommandBars
Variant vCommandBar
Integer iBarId i iBars iComBarId
Get CommandBarSystemObject to hoCommandBars
Get piBarID to iBarId
Get ComCount of hoCommandBars to iBars
For i from 1 to iBars
Get ComItem of hoCommandBars i to vCommandBar
Set pvComObject to vCommandBar
Get ComBarID to iComBarId
If (iBarId=iComBarId) Begin
Procedure_Return
End
Loop
Send ReleaseComObject
Error DFERR_PROGRAM "Assert: AttachComObject failed to attach commandbar"
End_Procedure

SetComProperty(Handle hmPrivateProperty Handle hmCOMProperty Integer iValue)
Generic Get and Set property that is used to get and set a DF/COM property.
can be used by any integer or boolean property