OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This file implements PEImage, a generic class to manipulate PE files. | 5 // This file implements PEImage, a generic class to manipulate PE files. |
6 // This file was adapted from GreenBorder's Code. | 6 // This file was adapted from GreenBorder's Code. |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include "base/win/pe_image.h" | 10 #include "base/win/pe_image.h" |
9 | 11 |
10 namespace base { | 12 namespace base { |
11 namespace win { | 13 namespace win { |
12 | 14 |
13 // TODO(jschuh): crbug.com/167707 Make sure this code works on 64-bit. | 15 // TODO(jschuh): crbug.com/167707 Make sure this code works on 64-bit. |
14 | 16 |
15 // Structure to perform imports enumerations. | 17 // Structure to perform imports enumerations. |
16 struct EnumAllImportsStorage { | 18 struct EnumAllImportsStorage { |
17 PEImage::EnumImportsFunction callback; | 19 PEImage::EnumImportsFunction callback; |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 DWORD disk_offset; | 581 DWORD disk_offset; |
580 | 582 |
581 if (!ImageAddrToOnDiskOffset(in_memory, &disk_offset)) | 583 if (!ImageAddrToOnDiskOffset(in_memory, &disk_offset)) |
582 return NULL; | 584 return NULL; |
583 | 585 |
584 return PEImage::RVAToAddr(disk_offset); | 586 return PEImage::RVAToAddr(disk_offset); |
585 } | 587 } |
586 | 588 |
587 } // namespace win | 589 } // namespace win |
588 } // namespace base | 590 } // namespace base |
OLD | NEW |