你换个思考角度用TCP/UDP程序吧,JAVA的CLASS调用的结果通过流传递给C/C++的Server。。。貌似我只能想到这样了。
望采纳!!
简单的你会写,那就好办,直接上代码
public interface TestAPI extends StdCallLibrary {interface LoginReply extends StdCallCallback {
/**
* 登录回调
*/
void invoke(String userId, long retCode, String retMsg)
}
/**
* 注册一个登录回调方法.此方法是dll提供的
*/
void RegisterLoginReply(LoginReply loginReply)
}
/**
* 实现登录回调方法
*/
private class LoginReplyCallBack implements TestAPI.LoginReply {
@Override
public void invoke(String userId, long retCode, String retMsg) {
log.info("登录回调方法:{},{},{}", userId, retCode, retMsg)
}
}
// 设置登录回调
api.RegisterLoginReply(loginReplyCallBack)