OVERVIEW of Visual Basic SDK 8/17/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. But the biggest change is that all VB calls can now use the library location 'VCLink32.DLL'. As described below, it solves some problems and adds new functionality. VCLINK32.DLL A Visual Basic 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 Visual Basic 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'. The VCLink32.DLL loads all of the VCADD DLLs and ensures that such errors do not occur. If you are developing Visual Basic EXEs, link to the VCADD DLLs through VCLink32.DLL. The new declaration files that ship with 3.0.1 (VCMain32_1.bas, etc.) all declare the library as VCLink32.DLL. The original source of the functions still correspond to the declaration filenames; for example, functions in VCTool32.bas originate in VCTool32.DLL. This new method is completely backwards compatible; you do not need to rewrite existing code that already points to the individual bas files, except to solve problems with EXE projects as described above. This is because VCLink32.DLL 'points' to the correct bas file where the declaration you are calling is stored. If desired you can still write code using the original library locations as you have in the past, except for the new BP calls as discussed below. 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. THE CmdID and DlgID FILES The files CmdID.bas and DlgID.bas 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. However, an add-on DLL called OleVCadd.DLL is available for download from http://www.visualcadd.org which allows VCADD to call an ActiveX DLL. 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. A freeware ActiveX control which gives VBasic the full power of VCSetAlertAppDllEx is under development and will be released on http://www.visualcadd.org in the near future. This ActiveX control can be used in a VBasic ActiveX DLL add-on to achieve the same power and flexibility of 'SetAlertApp' formerly available only through C++. LISTING OF NEW CALLS //additions to VCMain32.DLL (vcmain32.bas) 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.bas) VCGetDialogFromId //additions to VCTool32.DLL (VCTool32.bas) VCCopyToLayer VCDestroyContextMenu VCGetCurrentToolContextMenu VCMergePolygonsTool VCMoveToLayer VCSplitPolygonTool //additions to VCLink32.DLL (VCLink32.bas) VCCreateSymbolFromSelectionBP VCDigPointBP VCGetDatumBasePtBP VCMouseMoveWorldPointBP VCPaintBP VCScreenToWorld2DBP VCSetDatumBasePtBP VCSetScaleXYBP VCSetSymScaleBP VCPaintBP VCScreenToWorld2DBP VCSetDatumBasePtBP VCSetScaleXYBP VCSetSymScaleBP