DLL如何调用另一个DLL

vconan 2007-06-28 11:27:21
library Project1;

{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }

uses
SysUtils,Classes,Windows, Messages, Variants, Graphics, Controls, Forms,
Dialogs, StdCtrls,IniFiles,Wcrypt2, comObj,ComServ;

type
HS_FILEINFO=record
dwFileID:integer;
end;
procedure _SignFile(var szSourceFile,szSignatureFile,szDescription :string);
procedure readusbkeyfile_HD; //华大产品
procedure CleanAll;
procedure _Exit(msg :string);
function EOF(hFile :THANDLE; BytesRead :DWORD):boolean;

var
v1:string;
temp_path:string;
hSourceFile :THANDLE;
hSourceFilex :THANDLE;
function HSFormat(hcard:pointer;FormatInfo:HS_FORMATINFO):DWORD;stdcall ; external 'HD_GPAPI.dll' ;

{$R *.res}

begin
end.



build的时候出错 Invalid compiler directive: 'EXTERNAL'

有没有办法在编写DLL的时候调用其他的DLL文件,具体如何调用?
...全文
212 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhaojinwen 2007-07-02
  • 打赏
  • 举报
回复
好象少什么东西哦!
vconan 2007-06-28
  • 打赏
  • 举报
回复
放在VAR之前可以通过
但是错误又来了,在最后一行的end.那里出错

[Error] Project1.dpr(137): ';' expected but '.' found

格式没对?不会吧
ly_liuyang 2007-06-28
  • 打赏
  • 举报
回复
方法正确的~DLL就是这样的嘛~
放在VAR之前嘛~
zhao_yong 2007-06-28
  • 打赏
  • 举报
回复
仔細看看有沒有少什麽東西吧

16,748

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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