//找到当前路径,不含运行文件的路径
void GetCurrentProcessPath(char* strname, int len)//获取当前进程路径
{
char strdir[1024] = "";
memset(strdir, 0, sizeof(strdir));
if (GetModuleFileName(NULL, strdir, sizeof(strdir)))
{
char *p = strdir;
char *name = strdir;
char *path = strdir;
while (p)
{
p = strstr(p, "\\");
if (p)
{
p++;
name = p;
}
}
int i = name - 1 - path;
if (i
C++程序设置 开机自动启动
最新推荐文章于 2024-07-15 12:42:18 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)