Error checking for OLE-Object types.
$ObjNoErr | $ObjectNoErr
$ObjCheck | $ObjectCheck
$ObjNoErr or $ObjectNoErr disables (temporarily) the error checking for OLE object types. Similar to array access, each object access is encapsulated in error checking code and every method call or property access is guarded. This requires some additional code and execution time (the default setting). Without the checking you will save some code (4 bytes) per OLE property or method call and as a result the code will execute faster because no checks are performed.
With $ObjCheck the error checking is re-enabled. See HResult for more information.
$ObjNoErr
OpenW 1
Ocx CommDlg cd
cd.Flags = cdfScreenFonts | cdfShowHelp
cd.ShowFont
cd.Flags = cdcShowHelp
cd.ShowColor
Sub cd_OnHelp
Me.Caption = "Help Requested"
EndSub
Normally object calls don't return error values; however it is advisbale to still use $ObjNoErr with caution.
HResult, $AutoPost, $ArrayChk, $For, $Step
{Created by Sjouke Hamstra; Last updated: 17/09/2014 by James Gaite}