一个用vc写的动态链接'MapDrawDll.dll',其中有一个函数是:
extern "C" _declspec(dllexport) void OnDll_DrawMap(CDC *pDC,CRect rc,BOOL showreseau);
   我在delphi中是这样写的:
procedure  OnDll_DrawMap(canvas:TCanvas;rc:TRect;showreseau:boolean)stdcall;external 'MapDrawDll.dll';
   编译通过了,但运行时有错误:...'External exception E06D7363'...
请大家帮忙啊,多谢多谢!!!

解决方案 »

  1.   

    procedure  OnDll_DrawMap(dc: THandle; rc:TRect;showreseau:boolean)stdcall;external  'MapDrawDll.dll ';
    这样才对dc 的参数是Canvas.Handle
      

  2.   

    晕,还是不对
    procedure  OnDll_DrawMap(var dc: THandle; rc:TRect;showreseau:boolean)stdcall;external   'MapDrawDll.dll  ';为什么要用指针送 device context,难道里面可以改?
      

  3.   

    我没有dll的原文件,人家给的接口就是上面的,没办法,只能那么写。写成dc: THandle;有错误,请帮忙。
      

  4.   

    有什么错..use 部分包括 windows, dc 不行, 按上面定义要写到 var dc: THandle