以下是函数声明unsigned WINAPI ICC_reset(
HANDLE fd,
unsigned char *lenr,
unsigned char *resp
);请:1、帮忙将这个VC6的函数声明改成DELPHI6的2、再写一个DELPHI6的程序调用1中的函数。

解决方案 »

  1.   

    发两份....
    function ICC_reset( fd : THandle ; lenr:pbyte; resp:pbyte):Cardinal;stdcall;
      

  2.   


    //函数申明
    function ICC_reset( fd : THandle ; lenr:pChar; resp:pChar):Cardinal;
    ...
    //调用函数
    var
      aLenr,aResp:pChar;
      ICC_reset(application.Handle;aLenr,aResp);
      

  3.   

    unsigned WINAPI ICC_reset  是否漏了数据类型?Byte 0..255 unsigned 8-bit
    Word 0..65535 unsigned 16-bit
    Longword 0..4294967295 unsigned 32-bitTicc_recset=function(fd:THandle;var lenr,resp:byte):logword;stdcall;var 
    micc_reset:Ticc_recset;
    mlenr,mresp:byte;
    mresult:longword;
    handle:Thandle;hLibrary:=loadlibrary('你的DLL文件');@micc_reset:=GetProcAddress(hLibrary, 'ICC_reset') ;
    mresult:=micc_reset(handle,mlenr,mresp);