char sCurrentPath[MAX_PATH]; int ret = GetModuleFileName(::AfxGetInstanceHandle(), sCurrentPath, MAX_PATH); // 0だと失敗