Limitations:
OBJECT
name
is not allowed to exceed 64 characters.OBJECT
variable can not be initialized as pointer.
is not allowed and neither is thisDIM
xxxAS OBJECT PTR
DIM
xxxAS OBJECT*
OBJECT
.
is not allowed.DIM
xxx[
22
]
AS
OBJECT
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 exampleDIM
P1AS
SINGLE
DIM
P2AS
SINGLE
DIM
P3AS
SINGLE
DIM
P4AS
SINGLE
P1!=
1.5
P2!=
5.5
P3!=
505
P4!=
170.5
xlApp.ActiveSheet.Shapes.AddLine(
P1!, P2!, P3!, P4!)
.select
'**************************************************
' This sample requires MS Excel to run.
' This draws a red, dashed line via COM automation
'**************************************************
CONST
msoLineDashDotDot=
6
DIM
xlAppAS
OBJECTDIM
P1AS
SINGLE
DIM
P2AS
SINGLE
DIM
P3AS
SINGLE
DIM
P4AS
SINGLE
set
xlApp=
CreateObject
(
"Excel.Application"
)
xlApp.workbooks.add xlApp.visible=
TRUE P1!=
1.5
P2!=
5.5
P3!=
505
P4!=
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=
255
Sleep
(
5000
)
xlApp.QuitSET
xlApp=
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.