vb调用delphi dll

opqwthy 2009-03-25 11:00:15
我用DEPHI7.0编写了一个DLL,在DELPHI里可以调用,但我不知道怎么在VB里调用,有高手懂请一定赐教,感恩不尽!
下面是DLL模块里的部分代码:
library prjDLL;

uses
SysUtils,
Forms,
Windows,
Messages,
Classes,
DLLFormUnit in 'DLLFormUnit.pas' {frmDLLForm},
AboutUnit in 'AboutUnit.pas' {frmAbout},
sumt_fgh in 'sumt_fgh.pas' {Form3};

{$R *.res}

var
DLLApp: TApplication;
DLLScr: TScreen;
function CreateDLLForm(App: TApplication; Scr: TScreen):TForm;


var
ptr:PLongInt;
begin
Application := App;
Screen := Scr;
Application.CreateForm(TfrmDLLForm, frmDLLForm);
Application.CreateForm(TfrmAbout, frmAbout);
Application.CreateForm(TForm3, Form3);
result:=frmDLLForm;
end;

procedure ExitDLL(Reason: Integer);
begin
if Reason = DLL_PROCESS_DETACH then
begin
Application := DLLApp;
Screen := DLLScr;
end;
end;

exports
CreateDLLForm;

begin
DLLApp := Application;
DLLScr := Screen;
DLLProc := @ExitDLL;

end.
...全文
115 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
如果是CreateDLLForm的话 VB调用很有难度.

DLL写的有问题
ZW_LM 2009-04-06
  • 打赏
  • 举报
回复
我也来学习学习,帮你顶上去

1,488

社区成员

发帖
与我相关
我的任务
社区描述
VB API
社区管理员
  • API
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧