在vb中声明如下:
declare function write1 lib "easy12.dll" (byref pdata as byte,byval ilen as integer) as integer
在delphi中如何声明?
在vb中调用如下:
 dim combuf(1) as byte
    combuf(0)=asc("w")
    combuf(1)=2
    st=write1(combuf(0),2)
在delphi中如何调用呢?
  其中pdata为缓冲区首地址,ilen为写数据长度

解决方案 »

  1.   

    function writel(pdata:pchar;ilen:integer):smallint;stdcall;
      far;external 'easy12.dll'name 'writel';要声明combuf:array[0..128] of char;
    调用过程如下:
    st:=write1(combuf[0],2);
      

  2.   

    这样给combuf[0]和combuf[1]附值怎么附
      

  3.   

    上面的应该是:
    combuf:array[0..128] of byte;
    付值:
    combuf[0]:=ord['w'];
    combuf[1]:=2;