有个dll(应该是用vc做的),我要在delphi 6调用,但始终出错,请各位看看毛病在哪?
函数说明(vc调用例程里的)
extern "C" __declspec(dllexport) bool _stdcall OpenDataBase(HWND hMainWnd);   //打开数据源    返回true 成功   返回false 失败我的调用程序如下:type
TFunc =function(hMainWnd:hwnd):boolean;stdcall;
var
   handle:Thandle;
   Tf:TFunc;
   Tp:TFarProc;
begin
  handle :=LoadLibrary('CXK.dll');    {load dll}
  if(handle>0) then
  try
   Tp :=GetProcAddress(handle,PChar('OpenDataBase'));
 if(Tp <>nil) then
   begin
    Tf :=TFunc(Tp);
    if Tf(handle) then    //此句出错!!!!
        ShowMessage('ok.');
   end
  else
     ShowMessage('function not found.');
   finally
  FreeLibrary(handle);
end;
我用vc调用就没问题