首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

最基本的有关问题.

2012-03-18 
最基本的问题..请问function GetListViewText(mHandle: THandle mStrings: TStrings): Booleanstdcall

最基本的问题..
请问

function GetListViewText(mHandle: THandle; mStrings: TStrings): Boolean;stdcall;

这个方法该怎么调用,在DELPHI里.

我想把这个函数导出(DLL工程)在VC++里调用,可以直接调用吗?如果不能 该怎么再封装一个函数呢?

[解决办法]
Type
TmyFunc=function GetListViewText(mHandle: THandle; mStrings: TStrings): Boolean;stdcall; 
var
dllHandle:Thandle;
mf:TmyFunc;
begin
dllHandle:=LoadLibrary(’你的.dll’); 
try
if dllHanlde<=0 then showmessage('装载失败')
else
@mf:=GetProcAddress(dllHandle,PChar('GetListViewText')); 
//调用
 mf(mHandle,mStrings);
finally
FreeLibrary(dllHandle);
end;

end;

热点排行