获取当前工作路径

    技术2022-05-11  61

    C#

     string assemblyFolder =

    System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); 

    EVC

    wchar_t pBuf[256];

    GetModuleFileName(NULL,pBuf,sizeof(pBuf)/sizeof(wchar_t));

    szPath=pBuf;

    szPath = szPath.Left(szPath.ReverseFind(’//’)+1);

     

    最新回复(0)