龙
龙在江湖
Unregistered / Unconfirmed
GUEST, unregistred user!
动态连接库源代码(D5)(DLL.DLL)
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
procedure gc(var STTchar);stdcall;
export;
{过程带变参}
implementation
procedure gc(var STTchar){过程};
var
Ssss:String;
begin
Ssss:='字符串';
showmessage(STT);
STT:=pchar(Ssss);
end;
exports
gc;
{过程}
end.
在D5中调用一切正常,但是在VB中调用总是一运行就出现错误
错误提示为:vb6发生错误(Dll.dll)。
vb6即将关闭。
vb源代码
Private Declare Sub gc Lib "dll.dll" (ByVal STT As String)
Private Sub Command1_Click()
Dim aa As String
aa = "ss"
gc (aa)
MsgBox aa, , "操作成功"
End Sub
请各位帮忙给小弟指出错误。最好能给我一段代码。
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
procedure gc(var STTchar);stdcall;
export;
{过程带变参}
implementation
procedure gc(var STTchar){过程};
var
Ssss:String;
begin
Ssss:='字符串';
showmessage(STT);
STT:=pchar(Ssss);
end;
exports
gc;
{过程}
end.
在D5中调用一切正常,但是在VB中调用总是一运行就出现错误
错误提示为:vb6发生错误(Dll.dll)。
vb6即将关闭。
vb源代码
Private Declare Sub gc Lib "dll.dll" (ByVal STT As String)
Private Sub Command1_Click()
Dim aa As String
aa = "ss"
gc (aa)
MsgBox aa, , "操作成功"
End Sub
请各位帮忙给小弟指出错误。最好能给我一段代码。