type
TIntFunc=function(i:integer):integer;stdcall;
var
Th:Thandle;
Tf:TIntFunc;
//Tp:TFarProc;begin
Th:=LoadLibrary('d:\dll3\dll3.dll');
if Th>0 thentry@Tf:=GetProcAddress(Th,'Test');
//<:::::::::::::::::这里@tf总是nil,但是我的dll3.dll里确实有test这个函数啊
//我用静态调用都可以的:)
if @Tf<>nil then
TIntFunc=function(i:integer):integer;stdcall;
var
Th:Thandle;
Tf:TIntFunc;
//Tp:TFarProc;begin
Th:=LoadLibrary('d:\dll3\dll3.dll');
if Th>0 thentry@Tf:=GetProcAddress(Th,'Test');
//<:::::::::::::::::这里@tf总是nil,但是我的dll3.dll里确实有test这个函数啊
//我用静态调用都可以的:)
if @Tf<>nil then
解决方案 »
- TStringList AddObject 怎么存储Integer
- 请问大家一个关于SQL语句的问题。
- Delphi6中,接收到的UTF-8编码的乱码中文如何转化为可识别中文(小鸟在线等)
- *****请问如何根据窗体名来结束应用程序*********
- 请问 DbGridEh 用 clientdataset 作数据源时 怎样 实现 点击 列头 时 实现 排序 ??????????
- 想格掉WINDOW2003换成2000SERVER怎么办呀 高手请进。
- 关于删除文件的问题
- 请问一个dbgrid问题,谢谢!
- 主窗体隐藏问题
- 请问:如何判断1个文件是否存在?
- ****高分请教,不够再加,自己定义的控件的属性问题
- 不错的数学题 汽油和车
Th:=LoadLibrary('d:\dll3\dll3');后面不要dll,否则他就找不到
test;
我是刚学DEPHI的哦,请大家帮忙拉
funname : function(i:integer):integer;stdcall;
hdll : Thandle;
begin
hdll := loadlibrary('dllname.dll');
if hdll <= 0 then
begin
showmessage('load Fail');
exit;
end;
funname := GetProcAddress(hdll,'调用函数名');
if not Assigned(funname) then
BEGIN
showmessage('getprocaddress FAIL');
exit;
END;
end;
TIntFunc=function(i:integer):integer;stdcall;
var
Th:Thandle;
Tf:TIntFunc;
Tp:TFarProc;begin
Th:=LoadLibrary('d:\dll3\dll3.dll');
if Th>32 then
begin
Tp:=GetProcAddress(Th,'Test');
TIntFunc(Th)(6);
end;
end;