zoukankan      html  css  js  c++  java
  • 得到ARX程序当前的路径

    BOOL GetArxPath(CString &path)
    {
    CString ArxPath;
    ACHAR modulePath[512];//取应用程序路径
    //CString FileName = acedGetAppName(); //功能与下个函数重复,可能为空,不可靠
    HMODULE hModule = NULL;
    MEMORY_BASIC_INFORMATION mbi;

    if(::VirtualQuery(GetArxPath, &mbi, sizeof(mbi)) != 0)
    {
    hModule = (HMODULE) mbi.AllocationBase;
    }
    DWORD pathLength = GetModuleFileName(hModule, modulePath, 512);
    if (pathLength)
    {
    ArxPath=modulePath;
    int rs=ArxPath.ReverseFind('//'); //查找最后一个'//'的位置
    path = ArxPath.Left(rs); //去掉文件名
    return TRUE;
    }
    return FALSE;
    }
    ————————————————
    版权声明:本文为CSDN博主「无敌鼓舞」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/tong794729500/article/details/79201641

  • 相关阅读:
    The Chinese Postman Problem HIT
    Chinese Postman Problem Aizu
    矩阵游戏 HYSBZ
    最大获利 HYSBZ
    asp.net+MVC--1
    -----IT男生涯————初始篇
    Permutation
    RMQ with Shifts
    Fast Matrix Operations
    "Ray, Pass me the dishes!"
  • 原文地址:https://www.cnblogs.com/mjgw/p/12348175.html
Copyright © 2011-2022 走看看