access violation at 0x0044ead1:write of address 0x00000001'.

解决方案 »

  1.   

    无参数的时候调用好使,一有参数就不行了
    出现上面的错误!~
    delphi中的声明:
    function MatOpenEng(p:PChar):Integer;stdcall;external'DpLab.dll';
    function MatCloseEng:Integer;stdcall;external'DpLab.dll';
    function MatExec(p:PChar):Integer;stdcall;external'DpLab.dll';
    function MatCreateDoubleD(p:Pointer;num:Integer;dd:array of double):Integer;stdcall;external'DpLab.dll';
    function MatGetDoubleData(p:Pointer;num:Integer;dd:array of double):Integer;stdcall;external'DpLab.dll';
      

  2.   

    vc中的声明extern "C" __declspec(dllexport) int MatOpenEng(far char *cc)
    extern "C" __declspec(dllexport) int MatCloseEng(void)
    extern "C" __declspec(dllexport) int MatExec(far char *cc)
    extern "C" __declspec(dllexport) int  MatCreateDoubleD(char *cc,int num,double dd[])
    extern "C" __declspec(dllexport) int MatGetDoubleData(char *cc,int num,double dd[])
      

  3.   

    http://www.vchome.net/showart.asp?art_id=36&cat_id=2
      

  4.   

    pchar之类的指针需要在调用端开辟空间。
      

  5.   

    两边调用约定不对.
    function MatOpenEng(p:PChar):Integer;stdcall;external'DpLab.dll';
    里面stdcall应该改为cdecl
      

  6.   

    调用约定的问题,在要么改为 halfdream(哈欠) 的办法,要么在VC中加入stdcall语句。
      

  7.   

    function MatOpenEng(p:PChar):Integer;stdcall;external'DpLab.dll';
    里面stdcall应该改为cdecl
      

  8.   

    vc里调用改成 stdcall 可能不对 LZ试试。
      

  9.   

    delphi function 部分 stdcall 改成 cdecl