Limitations:
OBJECT name is not
allowed to exceed 64 characters.OBJECT variable can not be
initialized as pointer.
is not allowed and neither is thisDIMxxxAS OBJECT PTR
DIMxxxAS OBJECT*
OBJECT.
is not allowed.DIMxxx[22]ASOBJECT
OBJECT can not be declared or used in
a UDT.OBJECT.
is illegal.CREATEOBJECT("Excel.Application","\\at_net_pc1")
OBJECT variable. The BCX COM parser can
not properly parse, for example, this
app.serverso instead, use something like this="my"&"server"&somevar$
myvar$="my"&"server"&somevar$ app.server=myvar$
SINGLE or
DOUBLE precision float data type value must
be expressed using a variable with an appended data type signifier,
that is, ! for a SINGLE and # for a
DOUBLE rather than using a literal
expression or a variable without an appeneded datatype signifier.
For example, the BCX COM parser can not properly parse this
xlApp.ActiveSheet.Shapes.AddLineso instead, use a construct like this(1.5,5.5,505,170.5).select
Here is a complete correct exampleDIMP1ASSINGLEDIMP2ASSINGLEDIMP3ASSINGLEDIMP4ASSINGLEP1!=1.5P2!=5.5P3!=505P4!=170.5xlApp.ActiveSheet.Shapes.AddLine(P1!, P2!, P3!, P4!).select
'**************************************************' This sample requires MS Excel to run.' This draws a red, dashed line via COM automation'**************************************************CONSTmsoLineDashDotDot=6DIMxlAppASOBJECTDIMP1ASSINGLEDIMP2ASSINGLEDIMP3ASSINGLEDIMP4ASSINGLEsetxlApp=CreateObject("Excel.Application")xlApp.workbooks.add xlApp.visible=TRUE P1!=1.5P2!=5.5P3!=505P4!=170.5' ****************************************************' NOTE WELL:' The appended "!" data type specifiers on the "Px" variables' is crucial to the proper parsing of the following statement'*****************************************************xlApp.ActiveSheet.Shapes.AddLine(P1!, P2!, P3!, P4!).select xlApp.Selection.shapeRange.Line.DashStyle=msoLineDashDotDot xlApp.Selection.ShapeRange.Line.ForeColor.rgb=255Sleep(5000)xlApp.QuitSETxlApp=NOTHING
$COM_ON and $COM_OFF directives
Purpose: The default setting in the BCX translator is $COM_ON which specifies that COM procedures are used in the code being translated. $COM_OFF indicates that that COM procedures are not being used in the code being translated.
Syntax: $COM_ON or $COM_OFF Parameters:
|
When any BCX COM interface procedure is invoked, the translator automatically adds the following define to the output C code.
#ifndef _WIN32_DCOM #define _WIN32_DCOM #endif
BCX provides the following run-time procedures for working with COM/ActiveX objects:
How to
All products mentioned in this manual and/or in program samples are trademarks of their respective owners.