Compute can_use_lcd_text using property trees.
[chromium-blink-merge.git] / base / win / resource_util.h
blob8a8baa0f532d07584f1db02905389b1fd202e5cc
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file contains utility functions for accessing resources in external
6 // files (DLLs) or embedded in the executable itself.
8 #ifndef BASE_WIN_RESOURCE_UTIL_H_
9 #define BASE_WIN_RESOURCE_UTIL_H_
11 #include <windows.h>
13 #include "base/base_export.h"
14 #include "base/basictypes.h"
16 namespace base {
17 namespace win {
19 // Function for getting a data resource of the specified |resource_type| from
20 // a dll. Some resources are optional, especially in unit tests, so this
21 // returns false but doesn't raise an error if the resource can't be loaded.
22 bool BASE_EXPORT GetResourceFromModule(HMODULE module,
23 int resource_id,
24 LPCTSTR resource_type,
25 void** data,
26 size_t* length);
28 // Function for getting a data resource (BINDATA) from a dll. Some
29 // resources are optional, especially in unit tests, so this returns false
30 // but doesn't raise an error if the resource can't be loaded.
31 bool BASE_EXPORT GetDataResourceFromModule(HMODULE module,
32 int resource_id,
33 void** data,
34 size_t* length);
36 } // namespace win
37 } // namespace base
39 #endif // BASE_WIN_RESOURCE_UTIL_H_