| Index: base/native_library_win.cc
|
| diff --git a/base/native_library_win.cc b/base/native_library_win.cc
|
| index bcea485a1d10582016622738f1081fde471cd567..f78c0c23fc7e34d9aa49e45e3f3b3eb983fdedaa 100644
|
| --- a/base/native_library_win.cc
|
| +++ b/base/native_library_win.cc
|
| @@ -17,7 +17,7 @@ typedef HMODULE (WINAPI* LoadLibraryFunction)(const wchar_t* file_name);
|
|
|
| NativeLibrary LoadNativeLibraryHelper(const FilePath& library_path,
|
| LoadLibraryFunction load_library_api,
|
| - std::string* error) {
|
| + uint32* error_code) {
|
| // LoadLibrary() opens the file off disk.
|
| ThreadRestrictions::AssertIOAllowed();
|
|
|
| @@ -34,10 +34,9 @@ NativeLibrary LoadNativeLibraryHelper(const FilePath& library_path,
|
| }
|
|
|
| HMODULE module = (*load_library_api)(library_path.value().c_str());
|
| - if (!module && error) {
|
| + if (!module && error_code) {
|
| // GetLastError() needs to be called immediately after |load_library_api|.
|
| - DWORD last_error = GetLastError();
|
| - *error = StringPrintf("%u", last_error);
|
| + *error_code = GetLastError();
|
| }
|
|
|
| if (restore_directory)
|
| @@ -48,8 +47,9 @@ NativeLibrary LoadNativeLibraryHelper(const FilePath& library_path,
|
|
|
| // static
|
| NativeLibrary LoadNativeLibrary(const FilePath& library_path,
|
| - std::string* error) {
|
| - return LoadNativeLibraryHelper(library_path, LoadLibraryW, error);
|
| + std::string* /* error_message */,
|
| + uint32* error_code) {
|
| + return LoadNativeLibraryHelper(library_path, LoadLibraryW, error_code);
|
| }
|
|
|
| NativeLibrary LoadNativeLibraryDynamically(const FilePath& library_path) {
|
|
|