在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为写数据长度
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为写数据长度
far;external 'easy12.dll'name 'writel';要声明combuf:array[0..128] of char;
调用过程如下:
st:=write1(combuf[0],2);
combuf:array[0..128] of byte;
付值:
combuf[0]:=ord['w'];
combuf[1]:=2;