Index: base/file_version_info_win.cc |
=================================================================== |
--- base/file_version_info_win.cc (revision 82561) |
+++ base/file_version_info_win.cc (working copy) |
@@ -31,10 +31,14 @@ |
} LanguageAndCodePage; |
// static |
-FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForCurrentModule() { |
- FilePath app_path; |
- if (!PathService::Get(base::FILE_MODULE, &app_path)) |
- return NULL; |
+FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForModule( |
+ HMODULE module) { |
+ // Note that the use of MAX_PATH is basically in line with what we do for |
+ // all registered paths (PathProviderWin). |
+ wchar_t system_buffer[MAX_PATH]; |
+ system_buffer[0] = 0; |
+ GetModuleFileName(module, system_buffer, MAX_PATH); |
wtc
2011/04/22 20:00:09
Should we check if GetModuleFileName fails (return
rvargas (doing something else)
2011/04/22 21:40:05
Done.
|
+ FilePath app_path(system_buffer); |
return CreateFileVersionInfo(app_path); |
} |