delphi调用VB编写的DLL函数
我在delphi调用VB编写的DLL函数碰到个问题,请各位大侠帮忙看下。
VB本身调用该DLL文件,按以下方式定义
Declare Function read Lib "JNDll.dll" Alias "rrrr" (ByRef syscode$, ByRef gas_total As Long) As Integer
在调用该DLL的VB中使用以下调用
Dim syscode$
Dim gastotal As Long
st As Integer
st = read(syscode, gastotal)
在VB中执行正确。
请教在delphi中该如何定义?
我在delphi中定义函数时,将变量syscode分别定义为string/widestring/pchar/PWideChar,gastotal分别定义为integer/longint/pinteger/PLongint,结果均报错。错误信息:
access violation as oX10002228:write of address 0x0045b2b0