不可能这样在dll间传递对象!
请改用别的方法。

解决方案 »

  1.   

    //Dll中
    procedure ReDraw(var pBox:TPaintBox);stdcall;
    exports ReDraw index 1;
    //exe中
    procedure ReDraw(var pBox:TPaintBox);stdcall;external 'F:\new0708\Category\H型\1H\prj1H.dll';
    参数是一个paintbox
      

  2.   

    在 Dll 中
    procedure ReDraw(const pBox: TPaintBox);
    begin
        // ??? ... ...
    end;procedure ReDrawEx(const pBox: Pointer); stdcall;
    begin
        ReDraw(TPaintBox(pBox));
    end;在 Exe 中
    procedure ReDrawEx(const pBox: Pointer); stdcall; external 'prjlH.dll';procedure ReDraw(const pBox: TPaintBox);
    begin
       ReDrawEx(Pointer(pBox));
    end;经过这样的转换,问题也就解决了。