WCHAR buffer[MAX_PATH]; GetModuleFileName(NULL, buffer, MAX_PATH ); wstring::size_type pos = wstring(buffer).find_last_of(TEXT("\\/")); WCHAR currentPath[MAX_PATH]=TEXT(""); lstrcat(currentPath, wstring(buffer).substr(0, pos).c_str());
WCHAR buffer[MAX_PATH]; GetModuleFileName(NULL, buffer, MAX_PATH ); wstring::size_type pos = wstring(buffer).find_last_of(TEXT("\\/")); WCHAR currentPath[MAX_PATH]=TEXT(""); lstrcat(currentPath, wstring(buffer).substr(0, pos).c_str());
相关文章: