2023年11月25日

C#调用C++类库的几种方式

摘要: 1、 直接调用C++类库中的公共方法 使用DllImport特性对方法进行调用,比如一个C++类库SampleCppWrapper.dll中的公共方法: extern "C" __declspec(dllexport) int __stdcall Add(int n1, int n2); __std 阅读全文

posted @ 2023-11-25 21:44 jack_Meng 阅读(752) 评论(0) 推荐(0) 编辑

C++回调函数的定义和调用

摘要: 文章目录 一、C++回调函数 1. C/C++回调函数 2. 普通回调 3. 函数指针 4. C++类的静态函数作为回调函数 5. 类的非静态函数作为回调函数 6. Lambda表达式作为回调函数 7. std::funtion和std::bind的使用 二、其他参考资料 一、C++回调函数 C++ 阅读全文

posted @ 2023-11-25 17:23 jack_Meng 阅读(825) 评论(0) 推荐(0) 编辑

导航