OVERVIEW of PowerBASIC PB/DLL SDK 10/01/1999 In addition to brand new calls and routines introduced with this 3.0.1 version of the API, several 'BP' routines have been added to existing calls. As PowerBASIC PB/DLL is fully compatable with the Visual Cadd API, all calls previously not included with version 2.0.4 Visual Basic SDK are included here as well. This should provide the same functionality as C/C++. 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. 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. Previous versions of the VCADD API included several functions which passed user-defined data types only by value, and not by pointer, so they were not available to the VB developer. The VCADD API v3.0.1 has added several previously missing 'by pointer' functions in VCLink32.DLL. These newly added functions are not available in the original VCADD API DLLs (VCMain32.DLL, etc.), but only through the VCLink32.DLL that is shipped with the 3.0.1 SDK. If you use these BP calls in your code, you must ship the VCLink32.DLL with your application to your customers in order for the calls to work. It is intended that future updates to the Visual Cadd program will include the current VCLink32.DLL. With this version of the API, the new BP calls are actually coded in VCLink32.DLL. The declarations are found in the VCLink32.inc file. It is anticipated that the next API release will have these new BP calls coded in VCMain32.DLL. This is more consistent with previous practice and will eliminate the need of VCLink32.DLL by PowerBASIC PB/DLL. 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 VBasic can use. PowerBASIC PB/DLL is fully compatable and can achieve the same power and flexibility of 'SetAlertApp' formerly available only through C++. LISTING OF NEW CALLS additions to VCMain32.DLL (VCMain32.inc) VCGetDisplayPointString VCGetDisplayAngleString VCGetDisplayLengthString VCGetSelectionCount VCGetCommandString VCSetCurrWorldByHWND VCFirstWorld VCNextWorld VCOnActivateView VCScreenToWorld2D VCScrollStart VCScrollEnd VCOnScroll VCOnTimerRunningSnap VCLayerSelect VCSetCursorEx VCGetTextUseTextLayer VCSetTextUseTextLayer VCGetProgramPath VCGetManualEntryMode VCApplyLayerGroupByIndex VCApplyLayerGroupByName VCGetLayerGroupName VCGetLayerGroupIndex VCGetLayerGroupCount VCAddLayerGroup VCDeleteLayerGroup VCGetLayerGroupLayer VCSetLayerGroupLayer VCGetLayerPrintable VCSetLayerPrintable additions to VCDlg32.DLL (VCDlg32.inc) VCGetDialogFromId additions to VCTool32.DLL (VCTool32.inc) VCCopyToLayer VCDestroyContextMenu VCGetCurrentToolContextMenu VCMergePolygonsTool VCMoveToLayer VCSplitPolygonTool additions to VCLink32.DLL (VCLink32.inc) VCCreateSymbolFromSelectionBP VCDigPointBP VCGetDatumBasePtBP VCMouseMoveWorldPointBP VCPaintBP VCScreenToWorld2DBP VCSetDatumBasePtBP VCSetScaleXYBP VCSetSymScaleBP LISTING OF PREVIOUS CALLS (not included with ver 2.0.4 Visual Basic declarations) additions to VCMain32.DLL (VCMain32.inc) VCAddAngularDimensionEntity VCAddArcEntity VCAddBezierEntity VCAddCircleEntity VCAddDiameterDimensionEntity VCAddEllipseEntity VCAddEllipticalArcEntity VCAddLinearDimensionEntity VCAddLineEntity VCAddPointEntity VCAddRadialDimensionEntity VCAddSymbolEntity VCAddTextEntity VCCreateSymbolFromSelection VCDigPoint VCGetAngle VCGetArrowWorldStep VCGetChamferDist1 VCGetChamferDist2 VCGetCurrentEntityPoint VCGetCurrentEntityUserDataDouble VCGetCurrentEntityUserDataFloat VCGetDatumBasePt VCGetDimArrowLength VCGetDimExtAbove VCGetDimExtBelow VCGetDimExtOffset VCGetDimLineAngle VCGetDimTextAspect VCGetDimTextCharSpace VCGetDimTextHeight VCGetDimTextHorizSpace VCGetDimTextItalicAng VCGetDimTextLineSpace VCGetDimTextScale VCGetDimTextTolLowerVal VCGetDimTextTolUpperVal VCGetDimTextVertSpace VCGetGridOrigin VCGetGridSize VDGetHatchRot VCGetHatchScale VCGetIncSnapSize VCGetLeaderArrowAngle VCGetLeaderArrowLength VCGetLeaderShoulderLength VCGetLeaderTextAspect VCGetLeaderTextCharSpace VCGetLeaderTextHeight VCGetLeaderTextItalicAng VCGetLeaderTextLineSpace VCGetLTScaleDevice VCGetLTScaleWorld VCGetNumCopies VCGetOffsetDist VCGetOrdinateTextOffset VCGetOrthoAng VCGetScale VCGetScaleX VCGetScaleXY VCGetScaleY VCGetSnapPercentVal VCGetSpanAngle VCGetSymRot VCGetSymScale VCGetSymScaleX VCGetSymScaleY VCGetTextAspect VCGetTextCharSpace VCGetTextHeight VCGetTextItalicValue VCGetTextLineSpace VCGetTextRot VCGetVCMainInstance VCGetVideoTolerance VCGetWallWidth1 VCGetWallWidth2 VCGetZoomFactor VCLParamtoPoint2D VCMouseMoveWorldPoint VCPaint VCSetDatumBasePt VCSetGridOrigin VCSetGridSize VCSethMenu VCSetScaleXY VCSetSymScale lWidth1 VCGetWallWidth2 VCGetZoomFactor VCLParamtoPoint2D VCMouseMoveWorldPoint VCPaint VCSetDatumBasePt VCSetGridOrigin VCSetGridSize VCSethMenu VCSetScaleXY VCSetSymScale