//c++部分。其中最后一个参数是回调函数
typedef int (CALLBACK *FuncTotalDoneTp)(unsigned long nTotal, unsigned long nDone);
CallDllFunction(CString strDllPath, 
  char *strDevInfoBuf, unsigned long nDevInfoLen, 
  char *strSendBuf, unsigned long nSendLen, 
  char **pStrRecvBuf, unsigned long *pRecvLen, 
  FuncTotalDoneTp pFuncTotalDone)

解决方案 »

  1.   

    回调函数的话,在 Java 中要写个接口,在接口中写个回调方法
      

  2.   

    简单代码:
    接口:public interface CallDllInterface {
    public int CallDllFunction(String strDllPath其它参数);
    }实现类:public class CallDllImpl implements CallDllInterface { public int CallDllFunction(String strDllPath其它参数) {
    //回调函数的实现代码
    return 返回值;
    }}