vc 定义
typedef char *(CALLBACK *Func_Data)(long machineNo, UI2 fileIndex, UI4 addIndex, UI4 delIndex, UI2 recordCount, UI4 uploadedCount);
...
HANDLE CALLBACK StartListen(UI2 port
    , Func_Data    callback
);
...
if(callback!=NULL){
    string result = callback(100, 1, 1, 1, 100, 0);
}c#:
public delegate string Func_Data(int machineNo, ushort fileIndex, uint addIndex, uint delIndex, ushort recordCount, uint uploadedCount);
不知道这样定义是否正确?为什么偶尔可以,但很多时候都会崩溃~~