在c语言中定义为:
typedef void (* NETUSB_PFUNC) (unsigned char* buff, size_t n)
请问在delphi中怎么移植? 谢谢

解决方案 »

  1.   

    可能是
    type
      NETUSB_PFUNC=procedure(buff:PChar;n:????);size_t不知道是什么数据类型
    ??
      

  2.   

    C++:
    typedef void (* NETUSB_PFUNC) (unsigned char* buff, size_t n) //这是函数指针
    Delphi:
    //size_t 在C++ 中 unsigned int 相当于 delphi 中 DWORD 或是 cardinal 
    Type  
      NETUSB_PFUNC = procedure (buff:pchar; cardinal: n );
      

  3.   

    Type
    NETUSB_PFUNC = procedure (buff:pchar; n: LongWord) of Object;
      

  4.   

    谢谢各位,问题解决了。
    type
      NETUSB_PFUNC = procedure(buff:PChar;n:integer);