请问function GetListViewText(mHandle: THandle; mStrings: TStrings): Boolean;stdcall;这个方法该怎么调用,在DELPHI里.我想把这个函数导出(DLL工程)在VC++里调用,可以直接调用吗?如果不能 该怎么再封装一个函数呢?

解决方案 »

  1.   

    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;
      

  2.   

    我的意思是...把这个函数导出..我要在VC里调用... 我不知道参数应该如何转换, TStrings 类型是一个字符串数组吧.我不可能在VC里传递CStringArray对象吧...