SICL

From: Tomasz Rygulski (trg_at_poczta.onet.pl)
Date: 12/30/03

  • Next message: Frank: "A possibly nil parameter"
    Date: 30 Dec 2003 01:43:42 -0800
    
    

    Hi,

    >From a moth I've been writing a program (under Delphi 5.0) which could
    operate Agilent Analyzer. I use sicl32.dll and vbsicl32.dll and I've
    got i big problem. I can drive the device but I can't read from it!
    Maybe has someone got the SICL32.PAS?

    I've written down the summary of my problem:
     
    Here You are a sample of declaration in Visual Basic that i've read in
    the programmer's manual (also in sicl32.bas library):
     
    Declare Function vb_iwrite Lib "vbsicl32.dll" (ByVal which As Integer,
    ByVal id As Integer, ByVal buf As Variant, ByVal datalen As Long,
    ByVal endi As Integer, actual As Long) As Integer

    Declare Function vb_iread Lib "vbsicl32.dll" (ByVal which As Integer,
    ByVal id As Integer, buf As Variant, ByVal bufsize As Long, reason As
    Integer, actual As Long) As Integer
     
    My declaration under Delphi:
     
    function vb_iread(which: Smallint; id: Smallint; var buf: OLEVariant;
    bufsize: Integer; reason: Smallint; var actual: Integer): SmallInt;
    stdcall; external 'vbsicl32.dll';

    function vb_iwrite(which: Smallint; id: Smallint; buf: OLEVariant;
    datalen: Integer; endi: Smallint; var actual: Integer): SmallInt;
    stdcall; external 'vbsicl32.dll';
     
    Conclusion:
     
    vb_iread - works well
    vb_iwrite - returns invalid type parameter. I think that the type of
    "buf" is wrong.
     
    Help me, please :)
     
    Best regards
    Tomasz Rygulski


  • Next message: Frank: "A possibly nil parameter"