如何保留我的unity3d程序(c#v3.5),即使c ++ dll /本机插件中有exit(1)
How to keep my unity3d program (c# v3.5) even if there is an exit(1) in a c++ dll / native plugin?
我在unity3d项目中使用c ++ dll,如果任何输入不正确,库使用exit(1),这会使unity3d崩溃/关闭。有没有办法在不修改原始 c++ 代码的情况下避免这种行为?
我不知道
这是否有效,但请尝试在 try 和 catch子句中调用C++函数。例如:
try{
//Call you C++ function from C# here
}catch(Exception e){
}
相关文章:
- 如何在C++非托管/本机 DLL 中从注册免费 COM C# 托管 DLL 创建 COM 对象
- C++/CLI 混合托管/本机 DLL 不起作用
- 努力使用 C# 从本机 DLL 调用该方法
- 本机 dll 中的动态内存分配
- 本机 dll 从 c# 中踢出,没有错误消息
- Unity 如何使用本机 dll 或转换为托管
- 整齐地打包依赖于大量本机 DLL 的 C++/CLI DLL
- 线程"main" java.lang.UnsatisfiedLinkError: Native.initiate(I)V 从 Java 运行本机 dll 时
- JNI DLL如何搜索其依赖的本机DLL
- 正在尝试从本机dll获取字符串值
- 从多线程.net应用程序调用的本机dll中的tbb存在问题
- 将 SIMULINK 中的本机.dll文件添加到 Visual Studios C#
- 如何将 C 函数签名转换为 C# 并在本机 DLL 中调用该函数
- 用CLR编译的本机DLL,在使用它们之前,我必须公开这些函数吗
- 本机 DLL 和 JRE 地址模型是否匹配
- 将 CLR DLL 包装在本机 DLL 中
- 从Unity3d调用本机DLL的最佳方式是什么
- 将本机dll或.NET程序集嵌入COM
- 找不到本机DLL
- 混合程序集未发现本机DLL