请问用什么函数可以得到本执行程序的全路径?给分!

解决方案 »

  1.   

    GetModuleFileName
    可以得到可执行程序自身的全路径,包括可执行文件名。
      

  2.   

    GetCurrentDirect(...);记不是很清了,你再找一下MSDN喽或是告诉我你的MAIL,回头给你!
      

  3.   

    DWORD GetModuleFileName(
      HMODULE hModule,    // handle to module
      LPTSTR lpFilename,  // file name of module
      DWORD nSize         // size of buffer
    );
      

  4.   

    char szExePath[MAX_PATH];
    GetModuleFileName( NULL, szExePath, sizeof(szExePath) );
      

  5.   

    同意:GetModuleFileName( NULL, szExePath, sizeof(szExePath) );另外一种方法:
     PROCESSENTRY32::szExeFile