请问:怎样得到当前应用程序所在的路径?

解决方案 »

  1.   

    WINAPI DWORD GetModuleFileName( 
    HMODULE hModule,
    LPWSTR lpFilename, 
    DWORD nSize
    );
    Parameters
    hModule 
    [in] Handle to the module whose executable file name is being requested. If this parameter is NULL, GetModuleFileName returns the path for the file used to create the calling process. 
    lpFilename 
    [out] Pointer to a buffer that is filled in with the path and file name of the given module. 
    nSize 
    [in] Specifies the length, in characters, of the lpFilename buffer. If the length of the path and file name exceeds this limit, the string is truncated.