| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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 contains utility functions for accessing resources in external | 5 // This file contains utility functions for accessing resources in external |
| 6 // files (DLLs) or embedded in the executable itself. | 6 // files (DLLs) or embedded in the executable itself. |
| 7 | 7 |
| 8 #ifndef BASE_RESOURCE_UTIL_H__ | 8 #ifndef BASE_RESOURCE_UTIL_H__ |
| 9 #define BASE_RESOURCE_UTIL_H__ | 9 #define BASE_RESOURCE_UTIL_H__ |
| 10 #pragma once | 10 #pragma once |
| 11 | 11 |
| 12 #include <windows.h> | 12 #include <windows.h> |
| 13 #include <string> | |
| 14 | 13 |
| 15 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 16 | 15 |
| 17 namespace base { | 16 namespace base { |
| 17 |
| 18 // Function for getting a data resource (BINDATA) from a dll. Some | 18 // Function for getting a data resource (BINDATA) from a dll. Some |
| 19 // resources are optional, especially in unit tests, so this returns false | 19 // resources are optional, especially in unit tests, so this returns false |
| 20 // but doesn't raise an error if the resource can't be loaded. | 20 // but doesn't raise an error if the resource can't be loaded. |
| 21 bool GetDataResourceFromModule(HMODULE module, int resource_id, | 21 bool GetDataResourceFromModule(HMODULE module, int resource_id, |
| 22 void** data, size_t* length); | 22 void** data, size_t* length); |
| 23 } // namespace | 23 } // namespace base |
| 24 | 24 |
| 25 #endif // BASE_RESOURCE_UTIL_H__ | 25 #endif // BASE_RESOURCE_UTIL_H__ |
| OLD | NEW |