VB or Delphi help : Accessing a DLL using CW 2001.001 
Author Message
 VB or Delphi help : Accessing a DLL using CW 2001.001

Hi all,

Help !!  Help !!!

I am trying to access the functions in a DLL (VTSSDLL.DLL). This DLL
ships with a VBX called Formula One.
    (Excel type grid - VTSSonly.vbx - Ver 2.04).

The suppliers of the VBX sent me this message :-

"We do not support our products use in Clarion.  We have no examples or
header files for that environment. There has been no testing there
either. "
                (well maybe I/We can change that !!!!)

I need to set up a MODULE in my MAP to declare the prototypes so that I
can access the functions.

My problem is that the VBX ships with VB, delphi and C type PROTOYPES.
I have attached the VB & Delphi. They are : VTSS.BAS, VTSS.txt and
VTSS.PAS.

  1) Is anyone out there in the Clarion world already using this VBX
&        DLL ?
     If yes -  Can I Beg, Steal or buy the prototypes from you ??

                           OR

  2) Can anyone help me to understand how to convert one of the
existing      files for Clarion compatibility.
     Out of the two examples - VB and Delphi - which one is the
most      compatible to CW  ?

I would appreciate any help

many thanks


"An Error doesn't become a mistake, until you refuse to correct it"

[ VTSSH.PAS 53K ]
unit vtssh ;

interface

Type POLYPOINT = Record
       x : Integer ;
       y : Integer ;
      End;                                             { Record Definition }

Doubletype  = array[1..50] of Double ;      { needs to be made as Dynamic array }

 Const kFormatRCNrBufSize = 16;

 Const kModeNormal = 0 ;
  kModeLine = 1;
  kModeRectangle = 2;
  kModeOval = 3;
  kModeArc = 4;
  kModeChart = 5;
  kModeField = 6;
  kModeButton = 7;
  kModePolygon = 8;
  kModeCheckBox = 9;
  kModeDropDown = 10;

 Const kPolyEditModeNormal = 0;
  kPolyEditModePoints = 1;

 Const kShiftHorizontal = 1;
  kShiftVertical = 2;
  kShiftRows = 3;
  kShiftCols = 4;

 Const kHAlignGeneral = 1;
  kHAlignLeft = 2;
  kHAlignCenter = 3;
  kHAlignRight = 4;
  kHAlignFill = 5;
  kHAlignJustify = 6;
  kHAlignCenterAcrossCells = 7;

 Const kVAlignTop = 1;
  kVAlignCenter = 2;
  kVAlignBottom = 3;

 Const kClearDlg = 0;
  kClearAll = 1;
  kClearFormats = 2;
  kClearValues = 3;

 Const kFileFormulaOne = 1;
  kFileExcel4 = 2;
  kFileTabbedText = 3 ;       { Only SSRead() supports this type. }

 Const kSSObjLine = 1;
  kSSObjRectangle = 2;
  kSSObjOval = 3;
  kSSObjArc = 4;
  kSSObjButton = 7;
  kSSObjPolygon = 8;
  kSSObjCheckBox = 9;
  kSSObjDropDown = 10;

 Const SSM_CHANGE = 1024;
  SSM_SELCHANGE = 1025;
  SSM_STARTEDIT = 1026;
  SSM_ENDEDIT = 1027;
  SSM_STARTRECALC = 1028;
  SSM_ENDRECALC = 1029;
  SSM_CLICK = 1030;
  SSM_DBLCLICK = 1031;
  SSM_DELETEROW = 1032;
  SSM_REFRESHROW = 1033;
  SSM_CELLCHANGED = 1034;
  SSM_SETFOCUS = 1035;
  SSM_MODIFIED = 1036;
  SSM_DELETETABLE = 1037;
  SSM_HELP = 1038;
  SSM_DATAMOVE = 1039;
  SSM_CANCELEDIT = 1040;
  SSM_DIALOGBOXPARAM = 1041;
  SSM_FETCH = 1042;
  SSM_GETDATAROWS = 1043;
  SSM_TOPLEFTCHANGED = 1044;
  SSM_OBJCLICK = 1045;
  SSM_OBJDBLCLICK = 1046;
  SSM_RCLICK = 1047;
  SSM_RDBLCLICK = 1048;

 Const SSERROR_NONE = 0;
  SSERROR_GENERAL = 1;
  SSERROR_BAD_ARGUMENT = 2;
  SSERROR_NO_MEMORY = 3;
  SSERROR_BAD_FORMULA = 4;
  SSERROR_BUF_TOO_SHORT = 5;
  SSERROR_NOT_FOUND = 6;
  SSERROR_BAD_RC = 7;
  SSERROR_BAD_HSS = 8;
  SSERROR_TOO_MANY_HSS = 9;
  SSERROR_NO_TABLE = 10;
  SSERROR_UNABLE_TO_OPEN_FILE = 11;
  SSERROR_INVALID_FILE = 12;
  SSERROR_INSERT_SHIFT_OFF_TABLE = 13;
  SSERROR_ONLY_ONE_RANGE = 14;
  SSERROR_NOTHING_TO_PASTE = 15;
  SSERROR_BAD_NUMBER_FORMAT = 16;
  SSERROR_TOO_MANY_FONTS = 17;
  SSERROR_TOO_MANY_SELECTED_RANGES = 18;
  SSERROR_UNABLE_TO_WRITE_FILE = 19;
  SSERROR_NO_TRANSACTION = 20;
  SSERROR_NOTHING_TO_PRINT = 21;
  SSERROR_PRINT_MARGINS_DONT_FIT = 22;
  SSERROR_CANCEL = 23;
  SSERROR_UNABLE_TO_INITIALIZE_PRINTER = 24;
  SSERROR_STRING_TOO_LONG = 25;
  SSERROR_FORMULA_TOO_LONG = 26;
  SSERROR_UNABLE_TO_OPEN_CLIPBOARD = 27;
  SSERROR_PASTE_WOULD_OVERFLOW_SHEET = 28;
  SSERROR_LOCKED_CELLS_CANNOT_BE_MODIFIED = 29;
  SSERROR_LOCKED_DOC_CANNOT_BE_MODIFIED = 30;
  SSERROR_INVALID_NAME = 31;
  SSERROR_CANT_DELETE_NAME_IN_USE = 32;
  SSERROR_UNABLE_TO_FIND_NAME = 33;
  SSERROR_NO_WINDOW = 34;
  SSERROR_SELECTION = 35;
  SSERROR_TOO_MANY_OBJECTS = 36;
  SSERROR_INVALID_OBJECT_TYPE = 37;
  SSERROR_OBJECT_NOT_FOUND = 38;
  SSERROR_INVALID_REQUEST = 39;

 Function SSAddColPageBreak (  hSS : longint ;   nCol  : integer ) : integer ;
 Function SSAddPageBreak   (  hSS : longint) : integer ;
 Function SSAddRowPageBreak   (  hSS : longint ;   nRow  : integer ) : integer;
 Function SSAddSelection   (  hSS : longint ;   nR1  : integer  ;
          nC1  : integer  ;   nR2  : integer  ;   nC2  : integer ) : integer ;
 Function SSAttach  (  hSS : longint ;   pTitle : PCHAR) : integer;
 Function SSAttachToSS   (  hDstSS : longint ;   hSrcSS : longint) : integer ;
 Function SSCalculationDlg   (  hSS : longint) : integer ;
 Function SSCallWindowProc   (  hSS : longint ;   nMessage  : integer  ;   wParam  : integer  ;   lParam : longint) : integer ;
 Function SSCancelEdit   (  hSS : longint) : integer ;
 Function SSCanEditPaste  (  hSS : longint ; var pCanEditPaste  : integer ) : integer ;
 Function SSEditPasteValues   (  hSS : longint) : integer ;
 Function SSCheckModified   (  hSS : longint) : integer ;
 Function SSCheckRecalc   (  hSS : longint) : integer ;
 Function SSClearClipboard  : integer ;
 Function SSClearRange   (  hSS : longint ;   nR1  : integer  ;   nC1  : integer  ;   nR2  : integer  ;
                         nC2  : integer  ;   nClearType  : integer ) : integer;
 Function SSColorPaletteDlg   (  hSS : longint) : integer ;
 Function SSColWidthDlg   (  hSS : longint) : integer;
 Function SSCopyAll    (  hDstSS : longint ;   hSrcSS : longint) : integer;
 Function SSCopyRange   (  hDstSS : longint ;   nDstR1  : integer  ;   nDstC1  : integer  ;
                         nDstR2  : integer  ;   nDstC2  : integer  ;
                         hSrcSS : longint ;   nSrcR1  : integer  ;   nSrcC1 : integer ;
                         nSrcR2  : integer  ;   nSrcC2 : integer ) : integer ;
 Function SSDefinedNameDlg   (  hSS : longint) : integer;
 Function SSDelete   (  hSS : longint ;   bSendDeleteTableMsg  : integer ) : integer;
 Function SSDeleteDefinedName   (  hSS : longint ;   pName : PCHAR) : integer;
 Function SSDeleteRange   (  hSS : longint ;   nR1  : integer  ;   nC1  : integer  ;
          nR2  : integer  ;   nC2  : integer  ;   nShiftType  : integer ) : integer;
 Function SSDeleteTable   (  hSS : longint) : integer ;
 Function SSDraw   (  hSS : longint ;   hDC  : integer  ;   x  : integer  ;
          y  : integer  ; cx  : integer;   cy : integer ;   nRow : integer ;   nCol : integer ;
          var nRows  : integer; var nCols : integer ;   nFixedRow : integer ;   nFixedCol : integer ;
          nFixedRows : integer ;   nFixedCols : integer) : integer ;
 Function SSEditBarDelete   (  hSSEdit : longint) : integer;
 Function SSEditBarHeight    : integer;
 Function SSEditBarMove   (  hSSEdit : longint ;   x  : integer  ;   y  : integer  ;
                              cx  : integer  ;   cy  : integer ) : integer;
 Function SSEditBarNew   (  hWndParent  : integer  ; var pSSEdit : longint)  : integer;
 Function SSEditClear   (  hSS : longint ;   nClearType  : integer ) : integer;
 Function SSEditCopy   (  hSS : longint) : integer;
 Function SSEditCopyDown  (  hSS : longint) : integer;
 Function SSEditCopyRight   (  hSS : longint) : integer;
 Function SSEditCut   (  hSS : longint) : integer;
 Function SSEditDelete   (  hSS : longint ;   nShiftType  : integer ) : integer;
 Function SSEditInsert   (  hSS : longint ;   nShiftType  : integer ) : integer;
 Function SSEditPaste   (  hSS : longint) : integer;
 Function SSEndEdit   (  hSS : longint) : integer;
 Function SSErrorNumberToText   (  nError  : integer  ;   pBuf : PCHAR ;   nBufSize  : integer ) : integer;
 Function SSFilePageSetupDlg   (  hSS : longint) : integer;
 Function SSFilePrint   (  hSS : longint ;   bShowPrintDlg  : integer ) : integer;
 Function SSFilePrintSetupDlg   (  hSS : longint) : integer;
 Function SSFormatAlignmentDlg   (  hSS : longint) : integer ;
 Function SSFormatBorderDlg   (  hSS : longint) : integer ;
 Function SSFormatCurrency0   (  hSS : longint) : integer;
 Function SSFormatCurrency2   (  hSS : longint)    : integer ;
 Function SSFormatDefaultFontDlg   (  hSS : longint) : integer;
 Function SSFormatFixed   (  hSS : longint)  : integer ;
 Function SSFormatFixed2   (  hSS : longint)  : integer ;
 Function SSFormatFontDlg   (  hSS : longint)  : integer ;
 Function SSFormatFraction   (  hSS : longint)  : integer ;
 Function SSFormatGeneral   (  hSS : longint)  : integer ;
 Function SSFormatHmmampm   (  hSS : longint)  : integer ;
 Function SSFormatMdyy   (  hSS : longint)  : integer ;
 Function SSFormatNumberDlg   (  hSS : longint)  : integer ;
 Function SSFormatPatternDlg   (  hSS : longint)  : integer ;
 Function SSFormatPercent   (  hSS : longint)  : integer ;
 Function SSFormatRCNr   (  hSS : longint ;   nRow  : integer  ;   nCol  : integer  ;
          bDoAbsolute  : integer  ;   pBuf : PCHAR ;   nBufSize  : integer )  : integer;
 Function SSFormatScientific   (  hSS : longint)  : integer ;
 Function SSGetActiveCell   (  hSS : longint ; var pRow : integer  ; var  pCol : integer ) : integer ;
 Function SSGetAlignment   (  hSS : longint ; var pHorizontal  : integer  ; var pWordWrap  : integer  ;
          var pVertical  : integer  ; var pOrientation  : integer ) : integer;
 Function SSGetAllowArrows   (  hSS : longint ; var  pAllowArrows  : integer )  : integer ;
 Function SSGetAllowDelete   (  hSS : longint ; var pAllowDelete  : integer )  : integer ;
 Function SSGetAllowEditHeaders   (  hSS : longint ; var pAllowEditHeaders  : integer )  : integer ;
 Function SSGetAllowFillRange   (  hSS : longint ; var pAllowFillRange  : integer )  : integer ;
 Function SSGetAllowInCellEditing   (  hSS : longint ; var pAllowInCellEditing  : integer )  : integer ;
 Function SSGetAllowMoveRange   (  hSS : longint ; var pAllowMoveRange  : integer )  : integer ;
 Function SSGetAllowObjSelections   (  hSS : longint ; var pAllowObjSelections  : integer )  : integer ;
 Function SSGetAllowResize   (  hSS : longint ; var pAllowResize  : integer )  : integer ;
 Function SSGetAllowSelections   (  hSS : longint ; var pAllowSelections  : integer )  : integer ;
 Function SSGetAllowTabs   (  hSS : longint ; var pAllowTabs  : integer )  : integer ;
 Function SSGetAllowFormulas   (  hSS : longint ; var pAllowFormulas  : integer )  : integer ;
 Function SSGetAppName   (  hSS : longint ;   pBuf : PCHAR ;   nBufSize  : integer )  : integer ;
 Function SSGetAutoRecalc   (  hSS : longint ; var pAutoRecalc  : integer )  : integer ;
 Function SSGetBackColor   (  hSS : longint ; var pBackColor : longint)  : integer ;
 Function SSGetBorder   (  hSS : longint ; var pLeft  : integer  ; var pRight  : integer  ; var pTop  : integer  ;
          var pBottom  : integer  ; var pShade  : integer  ; var pcrLeft : longint ; var pcrRight : longint ;
          var pcrTop : longint ; var pcrBottom : longint) : integer;
 Function SSGetColText   (  hSS :
...

read more »

  VTSS.BAS
< 1K Download

[ VTSS.TXT 33K ]
' vtss.txt
'
' Copyright (c) 1992-1995, Visual Components, Inc.
'
' Contains constants and function declarations for
' accessing the Formula One 2.0 engine, VTSSDLL.DLL
'

Type POLYPOINT
    x As Integer
    y As Integer
End Type

Global Const kFormatRCNrBufSize = 16

Global Const kModeNormal = 0
Global Const kModeLine = 1
Global Const kModeRectangle = 2
Global Const kModeOval = 3
Global Const kModeArc = 4
Global Const kModeChart = 5
Global Const kModeField = 6
Global Const kModeButton = 7
Global Const kModePolygon = 8
Global Const kModeCheckBox = 9
Global Const kModeDropDown = 10

Global Const kPolyEditModeNormal = 0
Global Const kPolyEditModePoints = 1

Global Const kShiftHorizontal = 1
Global Const kShiftVertical = 2
Global Const kShiftRows = 3
Global Const kShiftCols = 4

Global Const kHAlignGeneral = 1
Global Const kHAlignLeft = 2
Global Const kHAlignCenter = 3
Global Const kHAlignRight = 4
Global Const kHAlignFill = 5
Global Const kHAlignJustify = 6
Global Const kHAlignCenterAcrossCells = 7

Global Const kVAlignTop = 1
Global Const kVAlignCenter = 2
Global Const kVAlignBottom = 3

Global Const kClearDlg = 0
Global Const kClearAll = 1
Global Const kClearFormats = 2
Global Const kClearValues = 3

Global Const kFileFormulaOne = 1
Global Const kFileExcel4 = 2
Global Const kFileTabbedText = 3        ' Only SSRead() supports this type.

Global Const kSSObjLine = 1
Global Const kSSObjRectangle = 2
Global Const kSSObjOval = 3
Global Const kSSObjArc = 4
Global Const kSSObjButton = 7
Global Const kSSObjPolygon = 8
Global Const kSSObjCheckBox = 9
Global Const kSSObjDropDown = 10

Global Const SSM_CHANGE = 1024
Global Const SSM_SELCHANGE = 1025
Global Const SSM_STARTEDIT = 1026
Global Const SSM_ENDEDIT = 1027
Global Const SSM_STARTRECALC = 1028
Global Const SSM_ENDRECALC = 1029
Global Const SSM_CLICK = 1030
Global Const SSM_DBLCLICK = 1031
Global Const SSM_DELETEROW = 1032
Global Const SSM_REFRESHROW = 1033
Global Const SSM_CELLCHANGED = 1034
Global Const SSM_SETFOCUS = 1035
Global Const SSM_MODIFIED = 1036
Global Const SSM_DELETETABLE = 1037
Global Const SSM_HELP = 1038
Global Const SSM_DATAMOVE = 1039
Global Const SSM_CANCELEDIT = 1040
Global Const SSM_DIALOGBOXPARAM = 1041
Global Const SSM_FETCH = 1042
Global Const SSM_GETDATAROWS = 1043
Global Const SSM_TOPLEFTCHANGED = 1044
Global Const SSM_OBJCLICK = 1045
Global Const SSM_OBJDBLCLICK = 1046
Global Const SSM_RCLICK = 1047
Global Const SSM_RDBLCLICK = 1048

Global Const SSERROR_NONE = 0
Global Const SSERROR_GENERAL = 1
Global Const SSERROR_BAD_ARGUMENT = 2
Global Const SSERROR_NO_MEMORY = 3
Global Const SSERROR_BAD_FORMULA = 4
Global Const SSERROR_BUF_TOO_SHORT = 5
Global Const SSERROR_NOT_FOUND = 6
Global Const SSERROR_BAD_RC = 7
Global Const SSERROR_BAD_HSS = 8
Global Const SSERROR_TOO_MANY_HSS = 9
Global Const SSERROR_NO_TABLE = 10
Global Const SSERROR_UNABLE_TO_OPEN_FILE = 11
Global Const SSERROR_INVALID_FILE = 12
Global Const SSERROR_INSERT_SHIFT_OFF_TABLE = 13
Global Const SSERROR_ONLY_ONE_RANGE = 14
Global Const SSERROR_NOTHING_TO_PASTE = 15
Global Const SSERROR_BAD_NUMBER_FORMAT = 16
Global Const SSERROR_TOO_MANY_FONTS = 17
Global Const SSERROR_TOO_MANY_SELECTED_RANGES = 18
Global Const SSERROR_UNABLE_TO_WRITE_FILE = 19
Global Const SSERROR_NO_TRANSACTION = 20
Global Const SSERROR_NOTHING_TO_PRINT = 21
Global Const SSERROR_PRINT_MARGINS_DONT_FIT = 22
Global Const SSERROR_CANCEL = 23
Global Const SSERROR_UNABLE_TO_INITIALIZE_PRINTER = 24
Global Const SSERROR_STRING_TOO_LONG = 25
Global Const SSERROR_FORMULA_TOO_LONG = 26
Global Const SSERROR_UNABLE_TO_OPEN_CLIPBOARD = 27
Global Const SSERROR_PASTE_WOULD_OVERFLOW_SHEET = 28
Global Const SSERROR_LOCKED_CELLS_CANNOT_BE_MODIFIED = 29
Global Const SSERROR_LOCKED_DOC_CANNOT_BE_MODIFIED = 30
Global Const SSERROR_INVALID_NAME = 31
Global Const SSERROR_CANT_DELETE_NAME_IN_USE = 32
Global Const SSERROR_UNABLE_TO_FIND_NAME = 33
Global Const SSERROR_NO_WINDOW = 34
Global Const SSERROR_SELECTION = 35
Global Const SSERROR_TOO_MANY_OBJECTS = 36
Global Const SSERROR_INVALID_OBJECT_TYPE = 37
Global Const SSERROR_OBJECT_NOT_FOUND = 38
Global Const SSERROR_INVALID_REQUEST = 39

Declare Function SSAddColPageBreak% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nCol%)
Declare Function SSAddPageBreak% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSAddRowPageBreak% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nRow%)
Declare Function SSAddSelection% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nR1%, ByVal nC1%, ByVal nR2%, ByVal nC2%)
Declare Function SSAttach% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal pTitle$)
Declare Function SSAttachToSS% Lib "VTSSDLL.DLL" (ByVal hDstSS&, ByVal hSrcSS&)
Declare Function SSCalculationDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSCallWindowProc% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nMessage%, ByVal wParam%, ByVal lParam&)
Declare Function SSCancelEdit% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSCanEditPaste% Lib "VTSSDLL.DLL" (ByVal hSS&, pCanEditPaste%)
Declare Function SSEditPasteValues% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSCheckModified% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSCheckRecalc% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSClearClipboard% Lib "VTSSDLL.DLL" ()
Declare Function SSClearRange% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nR1%, ByVal nC1%, ByVal nR2%, ByVal nC2%, ByVal nClearType%)
Declare Function SSColorPaletteDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSColWidthDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSCopyAll% Lib "VTSSDLL.DLL" (ByVal hDstSS&, ByVal hSrcSS&)
Declare Function SSCopyRange% Lib "VTSSDLL.DLL" (ByVal hDstSS&, ByVal nDstR1%, ByVal nDstC1%, ByVal nDstR2%, ByVal nDstC2%, ByVal hSrcSS&, ByVal nSrcR1%, ByVal nSrcC1%, ByVal nSrcR2%, ByVal nSrcC2%)
Declare Function SSDefinedNameDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSDelete% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal bSendDeleteTableMsg%)
Declare Function SSDeleteDefinedName% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal pName$)
Declare Function SSDeleteRange% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nR1%, ByVal nC1%, ByVal nR2%, ByVal nC2%, ByVal nShiftType%)
Declare Function SSDeleteTable% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSDraw% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal hDC%, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%, ByVal nRow%, ByVal nCol%, nRows%, nCols%, ByVal nFixedRow%, ByVal nFixedCol%, ByVal nFixedRows%, ByVal nFixedCols%)
Declare Function SSEditBarDelete% Lib "VTSSDLL.DLL" (ByVal hSSEdit&)
Declare Function SSEditBarHeight% Lib "VTSSDLL.DLL" ()
Declare Function SSEditBarMove% Lib "VTSSDLL.DLL" (ByVal hSSEdit&, ByVal x%, ByVal y%, ByVal cx%, ByVal cy%)
Declare Function SSEditBarNew% Lib "VTSSDLL.DLL" (ByVal hWndParent%, pSSEdit&)
Declare Function SSEditClear% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nClearType%)
Declare Function SSEditCopy% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSEditCopyDown% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSEditCopyRight% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSEditCut% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSEditDelete% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nShiftType%)
Declare Function SSEditInsert% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nShiftType%)
Declare Function SSEditPaste% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSEndEdit% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSErrorNumberToText% Lib "VTSSDLL.DLL" (ByVal nError%, ByVal pBuf$, ByVal nBufSize%)
Declare Function SSFilePageSetupDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFilePrint% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal bShowPrintDlg%)
Declare Function SSFilePrintSetupDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatAlignmentDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatBorderDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatCurrency0% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatCurrency2% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatDefaultFontDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatFixed% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatFixed2% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatFontDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatFraction% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatGeneral% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatHmmampm% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatMdyy% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatNumberDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatPatternDlg% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatPercent% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSFormatRCNr% Lib "VTSSDLL.DLL" (ByVal hSS&, ByVal nRow%, ByVal nCol%, ByVal bDoAbsolute%, ByVal pBuf$, ByVal nBufSize%)
Declare Function SSFormatScientific% Lib "VTSSDLL.DLL" (ByVal hSS&)
Declare Function SSGetActiveCell% Lib "VTSSDLL.DLL" (ByVal hSS&, pRow%, pCol%)
Declare Function SSGetAlignment% Lib "VTSSDLL.DLL" (ByVal hSS&, pHorizontal%, pWordWrap%, pVertical%, pOrientation%)
Declare Function SSGetAllowArrows% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowArrows%)
Declare Function SSGetAllowDelete% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowDelete%)
Declare Function SSGetAllowEditHeaders% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowEditHeaders%)
Declare Function SSGetAllowFillRange% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowFillRange%)
Declare Function SSGetAllowInCellEditing% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowInCellEditing%)
Declare Function SSGetAllowMoveRange% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowMoveRange%)
Declare Function SSGetAllowObjSelections% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowObjSelections%)
Declare Function SSGetAllowResize% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowResize%)
Declare Function SSGetAllowSelections% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowSelections%)
Declare Function SSGetAllowTabs% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowTabs%)
Declare Function SSGetAllowFormulas% Lib "VTSSDLL.DLL" (ByVal hSS&, pAllowFormulas%)
Declare Function ...

read more »



Mon, 17 May 1999 03:00:00 GMT  
 VB or Delphi help : Accessing a DLL using CW 2001.001

Hi Corrie

How's Midrand today?

I assume your DLL is a 16-bit one (all those integers instead of longints
in the function prototypes).

Quote:
>   2) Can anyone help me to understand how to convert one of the
> existing      files for Clarion compatibility.
>      Out of the two examples - VB and Delphi - which one is the
> most      compatible to CW  ?

The Delphi code is probably the easiest to translate into CW.  I know that
much of what I have to say here is old news to you Corrie, but I include it
here for the benefit of those who don't know Delphi/CW.

Use the following map (slightly different than in the CW help files under
the topic "using Windows DLLs NOT Created in Clarion for Windows"):

Delphi keyword          Clarion equivalent
   integer                 short
   longint                 long
   double                  real
   pchar                           *cstring
   var integer             *short
   var longint             *long
   var double              *real

Notes:
1)  Whenever a * is prefixed to a parameter, include an ",RAW" at the end
of the prototype line

2)  Where the pacal parameter declaration is   NAME [colon] TYPE,  in CW it
is TYPE [space] NAME.  

3) Where the Pascal parameter separator is a semicolon in CW it is a comma.

4) In pascal the parameter list is terminated with a closing round bracket
and an optional colon and return type if it is a function.  In CW the
closing round bracket is followed with a comma and return type.

5) In pascal each prototype is introduced with the keyword 'function' or
'procedure' where in CW it is not since all the prototypes are in a MAP
block.

Example:  the followin Delphi code

Quote:
>  Function SSGetTabbedText  (  hSS : longint ;   nR1  : integer  ;
>           nC1  : integer  ;   nR2  : integer  ;   nC2  : integer  ;
>           bValuesOnly  : integer  ; var phText  : integer )  : integer ;

translates into CW as follows:-

        Map
                Module('vtss')
                        SSGetTabbedText( |
                                long hSS, |     SpreadSheet handle
                                short nR1, |    Top Row Index
                                short nC1, |    Left Column Index
                                short nR2, |    Bottom Row index
                                short nC2, |    Rightmost Column Index
                                short bValuesOnly, |    True/False
                                *short phText), |               Handle to a block of memory
                                        short,proc,pascal,raw
                        ....other prototypes
                End!module
        End!map

The phText parameter raises an interesting problem.  It is presumably a
handle to a block of memory obtained with GlobalAlloc.  How does one
afterwards work with the contents of that block in CW??  A little trick:

myCstring       group,pre()
ref                &cstring
                end

myLongCpointer  long,over(myCstring)

myBlock short

   Code

        ! Convert cell range A3:J12 to Tab-delimited text
        if ~SSGetTabbedText( hSS, 3, 1, 12, 10, true,  myBlock )
                ! Handle exception
        else
            myLongCpointer = GlobalLock( myBlock )

            Message(' In text form: <13><10>' & ref )
        end

6) A pascal RECORD is a GROUP in CW.  For example

Quote:
> Type POLYPOINT = Record
>        x : Integer ;
>        y : Integer ;
>       End;                                             { Record

Definition }

        becomes

PolyPoint       Group, Type
x                 short
y                 short
                End

7) A pascal Const is an Equate in CW

Quote:
>  Const kModeNormal = 0 ;
>   kModeLine = 1;
>   kModeRectangle = 2;
>   kModeOval = 3;
>   kModeArc = 4;
>   kModeChart = 5;
>   kModeField = 6;
>   kModeButton = 7;
>   kModePolygon = 8;
>   kModeCheckBox = 9;
>   kModeDropDown = 10;

        becomes

kModeNormal             equate(0)
kModeLine               equate(1)
kModeRectangle  equate(2)
kModeOval               equate(3)
kModeArc                equate(4)
kModeChart              equate(5)
kModeField              equate(6)
kModeButton             equate(7)
kModePolygon            equate(8)
kModeCheckBox   equate(9)
kModeDropDown   equate(10)

8) CW doesn't have dynamic arrays.

Quote:
> Doubletype  = array[1..50] of Double ;      { needs to be made as Dynamic

array }

The best workaround is this:

DoubleType      Group, type
value             Real,dim(50)
                End

someDoubleArray &DoubleType ! Reference variable

        Code
            someDoubleArray &= NEW(DoubleType)

                ....

           DISPOSE ( someDoubleArray )

--
Fred Trter
Micro Partners (Pty) Ltd
<http://home.global.co.za/~ftruter>



Mon, 17 May 1999 03:00:00 GMT  
 VB or Delphi help : Accessing a DLL using CW 2001.001



Quote:
> Hi all,

> Help !!  Help !!!

> I am trying to access the functions in a DLL (VTSSDLL.DLL). This DLL
> ships with a VBX called Formula One.
>     (Excel type grid - VTSSonly.vbx - Ver 2.04).

> The suppliers of the VBX sent me this message :-

> "We do not support our products use in Clarion.  We have no examples or
> header files for that environment. There has been no testing there
> either. "
>            (well maybe I/We can change that !!!!)

Hello Corrie!

Formula One is available as an OCX control which is working great with CW.
I am evaluating this stuff actualy and so far, it seems this will be a next
purchase.

They have a trial pack that you test and see for yourself. Just point your
browser to

http://www.visualcomp.com

and download it!



Tue, 18 May 1999 03:00:00 GMT  
 VB or Delphi help : Accessing a DLL using CW 2001.001

Quote:

>Formula One is available as an OCX control which is working great with CW.
>I am evaluating this stuff actualy and so far, it seems this will be a next
>purchase.

        Pierre,

        How did you install Formula One? I did what I suppose
        should be done but my OCXPRP32 does not show the
        control at all!!



Thu, 20 May 1999 03:00:00 GMT  
 VB or Delphi help : Accessing a DLL using CW 2001.001



Quote:

> >Formula One is available as an OCX control which is working great with
CW.
> >I am evaluating this stuff actualy and so far, it seems this will be a
next
> >purchase.

>    Pierre,

>    How did you install Formula One? I did what I suppose
>    should be done but my OCXPRP32 does not show the
>    control at all!!

I simply used the setup program! Just tested the OCXPRP32 program and the
OCX is listed. Did you use the setup?


Thu, 20 May 1999 03:00:00 GMT  
 VB or Delphi help : Accessing a DLL using CW 2001.001

Quote:

>>        How did you install Formula One? I did what I suppose
>>        should be done but my OCXPRP32 does not show the
>>        control at all!!

>I simply used the setup program! Just tested the OCXPRP32 program and the
>OCX is listed. Did you use the setup?

        Well, Pierre, I truly did! But I have a vague idea that
        I got a warning or an error of some sort or that _everything_
        did not go as expected.

        I'll try another installation!



Fri, 21 May 1999 03:00:00 GMT  
 VB or Delphi help : Accessing a DLL using CW 2001.001

Agreed, Formula One works great with CW. The installation
software registers the OCX automatically. In case you are having
trouble you can use te regsvr32.exe program available in the
installation CD. Be sure to register the OCX with the vcf1.lic
file in the same directory.

Quote:


> >Formula One is available as an OCX control which is working great with CW.
> >I am evaluating this stuff actualy and so far, it seems this will be a next
> >purchase.

>         Pierre,

>         How did you install Formula One? I did what I suppose
>         should be done but my OCXPRP32 does not show the
>         control at all!!



Sat, 22 May 1999 03:00:00 GMT  
 VB or Delphi help : Accessing a DLL using CW 2001.001

Quote:

>I simply used the setup program! Just tested the OCXPRP32 program and the
>OCX is listed. Did you use the setup?

        Well, Pierre:

        I have done the setup twice so far and I still cannot see the
        OCX in the OCXPRP32... all the rest of the OCX's I have
        installed can be found there but no sign of formula1...

        Where to look next - and what to look for?



Fri, 28 May 1999 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Converting Clarion DOS 2.1 *.DAT to CW - Choosing between CW VB Delphi

2. VB calling CW DLL - Help!!!

3. HELP!: Create Clarion DLL to be used by Delphi

4. HELP! Using DELPHI DLLs from MSFPS4.0

5. FiveWin, Clip4Win, Delphi, VO, VB,Access

6. A CW DLL called from Delphi

7. Delphi Function Call (to CW DLL)

8. Function call from Delphi to CW dll

9. Delphi Dll in CW 2003

10. Help on Net Express COBOL dll and calling the DLL from VB program

11. ACUODBC using VB or Delphi?

12. calling CW-dll from VB

 

 
Powered by phpBB® Forum Software