c#和c++互操作
C# and C++ interop
我有一个c++函数定义为
#define DllExport __declspec( dllexport )
extern "C" DllExport void _stdcall CppAmp::square_array(float* arr, int n)
和c#代码
[DllImport("C++AmpProject.dll", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Auto)]
extern unsafe static void square_array(float* array, int length);
然而,我得到一个异常System.EntryPointNotFoundException
我在这里做错了什么?
我认为你应该在使用它之前通过Dependency Walker检查。您的函数可能不会命名为square_array
结果是参数名称必须完全匹配。
相关文章:
- 如何读取 C++ SAFEARRAY**,该 SAFEARRAY** 是 COM 互操作的结果,其中 C# 返回值为
- 编译为 wasm 的 C++ 和 Rust 程序可以以某种方式互操作吗?
- 有什么语言可以与C++互操作吗
- 使 Flutter C/C++ 互操作示例正常工作
- C++互操作(隐式 PInvoke)的限制
- COM 互操作结构定义与内存布局不匹配
- _Complex 和 std::complex 之间的 C/C++ 互操作
- C# COM 服务器互操作 - System.InvalidCastException.
- 从C++与 C 灵活阵列成员互操作的正确方法是什么?
- 如何通过 COM 互操作访问复杂对象的属性?
- 如何区分"QObject"的亲子关系关注点,例如与其他所有者进行互操作?
- DirectWrite GDI 互操作:使用"IDWriteFontFace"绘制文本的简单方法
- opencl openGL互操作内核参数用于读取 写入
- Rust 互操作与 C++ std::string
- 将互操作 HwndSource 包装在 c++/cli 中,以用于本机 c++/MFC 应用程序
- 跨 C# 和 COM 互操作使用对象C++
- 尝试为c++互操作自动生成库时出错
- 在MS Visual Studio 2010上使用带有Cuda互操作的OpenGL缓冲区时出现异常错误
- WinRT 组件内C++类之间的互操作
- 从c#到c++的互操作传递结构