当前位置:网站首页>获取当前dll或者exe路径
获取当前dll或者exe路径
2022-04-22 06:25:00 【Happinessคิดถึง】
**
更新时间:2022-04-08
**
MFC获取当前dll路径(windows版本)
void getCurPath()
{
CString path;
TCHAR curPath[MAX_PATH] = {
0 };
GetModuleFileName(AfxGetInstanceHandle(), curPath, MAX_PATH);
int index = CString(curPath).ReverseFind('\\');
if (index > 0)
{
path = CString(curPath).Left(index + 1);
}
return path;
}
输出:c:xx\xx\
版权声明
本文为[Happinessคิดถึง]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_44353958/article/details/124039523
边栏推荐
猜你喜欢

Information System Project Manager --- Chapter IV examination questions of overall project management over the years

【通信接口 - CAN总线】

可视化编程——实验二

Case case case

Why is MySQL self incrementing primary key not continuous?

JWT实现登录认证,密码加密及Token校验全过程(附源码)
![OOPC [一] C语言对象化](/img/dc/4a12d350dc9934df3eb79796e1aa82.png)
OOPC [一] C语言对象化

动态库总结

JS - 精度问题

依赖冲突查找与解决办法(以EasyPoi为例,出现 NoSuchMethodError 或 NoClassDefFoundError )
随机推荐
单片机原理[一] 学好单片机必会的五张图
可视化编程——实验一
C#接口
ActiveMQ的消息模式——队列模式
线程池使用
C#变量的使用及注意事项
数据库高级查询(2)
爬虫51job
变量定义以及使用
Dependency conflict finding and resolution (taking easypoi as an example, nosuchmethoderror or NoClassDefFoundError appears)
oracle唯一索引
Oracle sequence usage collation
JS realizes web page special effects on PC and mobile terminals
循环详解和各种小细节
ActiveX控件使用总结
第八章 异常处理和字符串处理和文件操作
7-3 聚宽
MySQL 中文字段排序问题(根据中文拼音排序)
标识符和类型转换
数据库-Mysql--Navicat 导入sql出现错误 1067 - Invalid default value for ‘payDate‘