OVERVIEW of PowerBASIC PB/DLL SDK  8/27/2001

Brand new calls and routines are introduced with this 4.0.0
version of the API.  In addition, several 'BP' routines have
been moved to a different DLL file.  As with version 3.0.1,
the additional routines in VCMain32.DLL normally declared
only for C/C++ (not Visual Basic or Delphi), are included
here as well.  This should provide the same functionality
as C/C++, if desired.  Most have equivalent 'BP' routines
that can be used as well.  These routines are:

VCAddAngularDimensionEntity
VCAddArcEntity
VCAddBezierEntity
VCAddCircleEntity
VCAddDiameterDimensionEntity
VCAddEllipseEntity
VCAddEllipticalArcEntity
VCAddLinearDimensionEntity
VCAddLineEntity
VCAddPointEntity
VCAddRadialDimensionEntity
VCAddSymbolEntity
VCAddTextEntity
VCCreateSymbolFromSelection
VCDigPoint
VCGetBasepointPt
VCGetCurrentEntityPoint
VCGetDatumBasePt
VCGetGridOrigin
VCGetGridSize
VCGetScaleXY
VCGetSymScale
VCLParamToPoint2D
VCMouseMoveWorldPoint
VCObjectFind
VCPaint
VCScreenToWorld2D
VCSetBasepointPt
VCSetDatumBasePt
VCSetGridOrigin
VCSetGridSize
VCSetScaleXY
VCSetSymScale

  
The following calls were not properly exported in 3.0.1 API
and appear to be corrected.

VCAcadReadNoPaint
VCAddLayerGroup
VCApplyLayerGroupByIndex
VCApplyLayerGroupByName
VCDeleteLayerGroup
VCGetLayerGroupCount
VCGetLayerGroupIndex
VCGetLayerGroupLayer
VCGetLayerGroupName
VCGetLayerPrintable
VCGetManualEntryMode
VCGetProgramPath
VCMergeDrawingNoPaint
VCSetGraphicPenWidth
VCSetLayerGroupLayer
VCSetLayerPrintable


The following calls appear to be obsolete and have been deleted.

VCCorelSCRIPTEditor
VCCorelSCRIPTPlayback
VCCorelSCRIPTRun
VCCorelSCRIPTSave
VCCorelSCRIPTStart
VCCorelSCRIPTStop
VCGetDimShowFractions
VCGetDisplayShowFractions
VCGetLeaveOriginal
VCGetScale
VCGetSingleUnitFrac
VCSetDimShowFractions
VCSetDisplayShowFractions
VCSetOriginal
VCSetScale
VCSetSingleUnitFrac


VCLINK.BAS

A PowerBASIC PB/DLL DLL or EXE will load DLLs on an
as-needed basis, loading the DLL only upon the first
call to that DLL.  However, ALL of the VCADD DLLs must
be loaded to ensure that Visual CADD's internal memory
gets initialized correctly.  Thus, in a PowerBASIC PB/DLL
DLL or EXE, it is possible that a call to a particular
function in a particular VCADD DLL may occur before all
other DLLs are loaded and result in errors or 'general
protection faults'.  See VCLINK.BAS for example code to
load the Visual CADD DLLs in the proper order at the
beginning of your program.  This is only required with
stand-alone applications that are run without Visual CADD
already loaded and initialized. 


VCLINK32.DLL

The VCLink32.DLL is used by Visual Basic to properly
load and initialize the Visual Cadd DLLs.  The Visual
Basic 4.0.0 SDK therefor declares 'all' of the Visual
Cadd procedures as if they are located in VCLink32.DLL.
When the first Visual Cadd procedure is called, this
DLL will be loaded and in turn will load the Visual
Cadd DLLs in the proper order and then link to 'all'
of the Visual Cadd procedures in the proper VC DLLs,
whether they will be called or not.  Not only is this
additional overhead imposed, but the proper version
of VCLink32.DLL must be maintained to properly match
the versions of Visual Cadd DLLs in use as well as
what is expected in the Visual Basic application.
This additional layer of indirection can also cause
problems as in the case of the calls noted above that
were not properly exported.  A call to VCLink32.DLL
would succeed even though the resulting call to that
procedure in VCMain32.DLL would fail (not be found).
Although alternatives would be recommended, this
approach can also be used with PB/DLL by using the
VCLink32.inc file in place of the individual Visual
Cadd files (VC....32.inc).  VCLink32.inc in this
version contains 'all' of the Visual Cadd declarations,
not just the few noted above that have been moved to
VCMain32.DLL, which was the case with PB/DLL 3.0.1 SDK.
 
  
NEW BP CALLS

Visual Basic requires functions to pass user-defined data
types by pointer, and not by value. To get around this
limitation in VB, the VCADD API has functions that are
distinguished by "BP" being appended to the end of the
function name.  The new "BP" functions in version 3.0.1
were coded in VCLink32.DLL.  These have been moved to
VCMain32.DLL in this version.  This is more consistent
with previous practice and will eliminate the need of
using VCLink32.DLL with PB/DLL to use these functions. 


THE CmdID and DlgID FILES 

The files CmdID.inc and DlgID.inc define constants used
internally by Visual CADD.  Most of these constants are
related to the tool ID or dialog ID numbers associated
with VCADD tools and dialogs and the resource IDs of dialog
controls.  The tool or dialog IDs are returned by various
VCADD API functions, such as VCGetToolID, and these constants
can be used to identify the values returned.  Also, certain
Win32 API functions related to dialogs pass or return dialog
control resource IDs, such as GetDlgItem, and these constants
can be used to identify the control.


OLEDLL

Visual Basic can be used to create ActiveX DLLs (formerly called
OLE DLLs) which use the VCADD API.  Visual CADD cannot directly
call an ActiveX DLL.  PowerBASIC PB/DLL creates 'true' windows
DLLs which can be called by VCADD or other windows applications.
No additional support DLLs are required as is the case with
Visual Basic.  


SETALERTAPPDLL

Because Visual Basic cannot create a regular DLL (only ActiveX
DLLs), Visual Basic cannot directly use VCSetAlertAppDll or
VCSetAlertAppDllEx, which are much more powerful than the
VCSetAlertApp and VCSetAlertAppEx that Visual Basic can use.
PowerBASIC PB/DLL is fully compatible and has support for the
callbacks required to achieve the same power and flexibility
of 'SetAlertAppDll' formerly available only with C/C++.  

Alerts.txt is a text file containing the function prototypes
for all of the developer-defined callback functions required
by VCSetAlertAppDll(Ex).  Comment statements in the file provide
descriptions of parameters, return values, how and when they are
called by Visual Cadd, etc.  Thus Alerts.txt supplements the
information contained in the API Help file.
  

LISTING OF NEW CALLS:

----- Additions to VCMain32.DLL -----
(VCMain_1.bas, VCMain_2.bas, VCMain32.inc)
(formerly in Version 3.0.1 VCLink32.dll only)

VCCreateSymbolFromSelectionBP
VCDigPointBP
VCGetDatumBasePtBP
VCMouseMoveWorldPointBP
VCPaintBP
VCScreenToWorld2DBP
VCSetDatumBasePtBP
VCSetScaleXYBP
VCSetSymScaleBP


----- Additions to VCMain32.DLL -----
(VCMain_1.bas, VCMain_2.bas, VCMain32.inc)

VCSetMultiLineStyle
VCGetMultiLineStyle
VCGetAlternateRotation
VCSetAlternateRotation
VCGetAtbUseLocalDisplay
VCSetAtbUseLocalDisplay
VCGetAtbLocalDisplay
VCSetAtbLocalDisplay
VCGetAtbLocalLabelDisplay
VCSetAtbLocalLabelDisplay
VCGetAtbGlobalDisplay
VCSetAtbGlobalDisplay
VCGetAtbGlobalLabelDisplay
VCSetAtbGlobalLabelDisplay
VCGetOrthoAdvancedType
VCSetOrthoAdvancedType
VCGetOrthoAdvDivisions
VCSetOrthoAdvDivisions
VCGetOrthoAdvOneAngle
VCSetOrthoAdvOneAngle
VCGetOrthoAdvStepAngle
VCSetOrthoAdvStepAngle
VCGetBasepointPt
VCGetBasepointPtBP
VCSetBasepointPt
VCSetBasepointPtBP
VCMainSetMultiInstance
VCGetVCResourceInstance
VCGetIniName
VCGetMNUPath
VCSetMNUPath
VCGetSTYPath
VCSetSTYPath
VCGetRunningSnapType
VCSetRunningSnapType
VCGetScrollBar
VCSetScrollBar
VCGetUseFastProperties
VCSetUseFastProperties
VCGetAutoForceSave
VCSetAutoForceSave
VCGetAutoForceSaveSecs
VCSetAutoForceSaveSecs
VCGetFontListSorting
VCSetFontListSorting
VCGetSortedFontList
VCGetNumDivisions
VCSetNumDivisions
VCGetDivideBreak
VCSetDivideBreak
VCGetLayerGroupProperties
VCSetLayerGroupProperties
VCGetLayerGroupUseProperties
VCSetLayerGroupUseProperties
VCObjectFind


----- Additions to VCDlg32.DLL -----
(VCDlg32.bas, VCDlg32.inc)

VCAddPrintPreset
VCDeletePrintPreset
VCSetCurrentPrintPreset
VCGetCurrentPrintPreset
VCSetPrintPresetDevice
VCGetPrintPresetDevice
VCSetPrintPresetPageWidth
VCGetPrintPresetPageWidth
VCSetPrintPresetPageHeight
VCGetPrintPresetPageHeight
VCSetPrintPresetMarginLeft
VCGetPrintPresetMarginLeft
VCSetPrintPresetMarginBottom
VCGetPrintPresetMarginBottom
VCSetPrintPresetMarginRight
VCGetPrintPresetMarginRight
VCSetPrintPresetMarginTop
VCGetPrintPresetMarginTop
VCSetPrintPresetPrintScale
VCGetPrintPresetPrintScale
VCSetPrintPresetOriginBP
VCGetPrintPresetOriginBP
VCSetPrintPresetOriginX
VCGetPrintPresetOriginX
VCSetPrintPresetOriginY
VCGetPrintPresetOriginY
VCSetPrintPresetPrintView
VCGetPrintPresetPrintView
VCSetPrintPresetLandscape
VCGetPrintPresetLandscape
VCSetPrintPresetCopies
VCGetPrintPresetCopies
VCSetPrintPresetRotation
VCGetPrintPresetRotation
VCSetPrintPresetMetric
VCGetPrintPresetMetric
VCSetPrintPresetFastRedraw
VCGetPrintPresetFastRedraw
VCSetPrintPresetPrintSelected
VCGetPrintPresetPrintSelected
VCSetPrintPresetPrintToFile
VCGetPrintPresetPrintToFile
VCSetPrintPresetDateStamp
VCGetPrintPresetDateStamp
VCSetPrintPresetAllToBlack
VCGetPrintPresetAllToBlack
VCSetPrintPresetLW0HasWidth
VCGetPrintPresetLW0HasWidth
VCSetPrintPresetLineWidth
VCGetPrintPresetLineWidth
VCSetPrintPresetMovePage
VCGetPrintPresetMovePage
VCSetPrintPresetShowPreview
VCGetPrintPresetShowPreview
VCSetPrintPresetPaperSize
VCGetPrintPresetPaperSize
VCSetPrintPresetPaperLength
VCGetPrintPresetPaperLength
VCSetPrintPresetPaperWidth
VCGetPrintPresetPaperWidth
VCSetPrintPresetAlwaysCenter
VCGetPrintPresetAlwaysCenter
VCSetPrintPresetStampFormat
VCGetPrintPresetStampFormat
VCSetPrintPresetStampFontSize
VCGetPrintPresetStampFontSize
VCSetPrintPresetStampLocation
VCGetPrintPresetStampLocation
VCSetPrintPresetStampFont
VCGetPrintPresetStampFont
VCPrintNoDlg


----- Additions to VCTran32.DLL -----
(VCTran32.bas, VCTran32,inc)

VCPlaceMetafileOnClipboard


----- Additions to VCTool32.DLL -----
(VCTool32.bas, VCTool32.inc)

VCGetUserToolSnapable
VCSetUserToolSnapable
VCDivide
