随笔分类 -  c++ dll

c++ dll 传递string参数
摘要:用c++编写了一个dll,需要传递一个路径的变量参数,刚开始想着使用string变量,但是在实践过程中string变量会成为乱码,尽量避免使用string变量传递参数,可以使用const char* str 来代替 string str 阅读全文

posted @ 2022-08-29 22:20 裹紧我的小棉袄 阅读(302) 评论(0) 推荐(0)

c++ 在项目中创建DLL,并调用
摘要:创建DLL分为两种方法,先介绍第一种 一、创建DLL (1) // dll.h #pragma once //dll.h #ifndef DLL_H_ #define DLL_H_ void printhello(); void callPython(); extern "C" _declspec( 阅读全文

posted @ 2022-08-29 14:44 裹紧我的小棉袄 阅读(475) 评论(0) 推荐(0)

使用dumpbin查看dll文件中的api
摘要:一、找到vs自带的dumpbin 我的目录如下: C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64 双击可以打开,如下 dumpbin命令行介绍:官 阅读全文

posted @ 2022-07-04 16:16 裹紧我的小棉袄 阅读(816) 评论(0) 推荐(0)