[email protected] | f994f47b | 2010-08-14 17:44:30 | [diff] [blame] | 1 | // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 4 | |
5 | // This file contains utility functions for accessing resources in external | ||||
6 | // files (DLLs) or embedded in the executable itself. | ||||
7 | |||||
8 | #ifndef BASE_RESOURCE_UTIL_H__ | ||||
9 | #define BASE_RESOURCE_UTIL_H__ | ||||
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 10 | #pragma once |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 11 | |
12 | #include <windows.h> | ||||
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 13 | |
14 | #include "base/basictypes.h" | ||||
15 | |||||
16 | namespace base { | ||||
[email protected] | f994f47b | 2010-08-14 17:44:30 | [diff] [blame] | 17 | |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 18 | // Function for getting a data resource (BINDATA) from a dll. Some |
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. | ||||
21 | bool GetDataResourceFromModule(HMODULE module, int resource_id, | ||||
22 | void** data, size_t* length); | ||||
[email protected] | f994f47b | 2010-08-14 17:44:30 | [diff] [blame] | 23 | } // namespace base |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 24 | |
[email protected] | 2fdc86a | 2010-01-26 23:08:02 | [diff] [blame] | 25 | #endif // BASE_RESOURCE_UTIL_H__ |