OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/installer/mini_installer/pe_resource.h" | 5 #include "chrome/installer/mini_installer/pe_resource.h" |
6 | 6 |
7 PEResource::PEResource(HRSRC resource, HMODULE module) | 7 PEResource::PEResource(HRSRC resource, HMODULE module) |
8 : resource_(resource), module_(module) { | 8 : resource_(resource), module_(module) { |
9 } | 9 } |
10 | 10 |
11 PEResource::PEResource(const wchar_t* name, const wchar_t* type, HMODULE module) | 11 PEResource::PEResource(const wchar_t* name, const wchar_t* type, HMODULE module) |
(...skipping 27 matching lines...) Expand all Loading... |
39 return false; | 39 return false; |
40 } | 40 } |
41 DWORD written = 0; | 41 DWORD written = 0; |
42 if (!::WriteFile(out_file, data, static_cast<DWORD>(resource_size), | 42 if (!::WriteFile(out_file, data, static_cast<DWORD>(resource_size), |
43 &written, NULL)) { | 43 &written, NULL)) { |
44 ::CloseHandle(out_file); | 44 ::CloseHandle(out_file); |
45 return false; | 45 return false; |
46 } | 46 } |
47 return ::CloseHandle(out_file) ? true : false; | 47 return ::CloseHandle(out_file) ? true : false; |
48 } | 48 } |
OLD | NEW |