[MFC] GetModuleFileName 이용하여 현재 실행 경로 얻기
※ 요약 API함수 GetModuleFileName를 이용하여 현재 실행중인 실행 파일의 경로를 얻는 방법이다. 자주는 아니지만 실행 중인 파일의 경로가 필요할때가 있는데 그럴때 사용하면 되며, 필자는 보통 프로그램 시작시 실행 경로를 얻고, 필요할 때마다 사용하는 편이다. ※ 소스CString CAdoTestDlg::GetExecutedPath( ) { CString strResult; CString strPath; if( GetModuleFileName( nullptr, strPath.GetBuffer(_MAX_PATH + 1), MAX_PATH ) != FALSE ) { strPath.ReleaseBuffer( ); strResult = strPath.Left( strPath.ReverseFind(..