blob: c3782ed6e55cd97c88af5e3f162b7c724eeade96 [file] [log] [blame]
license.botf003cfe2008-08-24 09:55:55 +09001// Copyright (c) 2006-2008 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.
initial.commit3f4a7322008-07-27 06:49:38 +09004
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__
10
11#include <windows.h>
12#include <string>
13
14#include "base/basictypes.h"
15
16namespace base {
17// Function for getting a data resource (BINDATA) from a dll. Some
18// resources are optional, especially in unit tests, so this returns false
19// but doesn't raise an error if the resource can't be loaded.
20bool GetDataResourceFromModule(HMODULE module, int resource_id,
21 void** data, size_t* length);
22} // namespace
23
24#endif // BASE_RESOURCE_UTIL_H__
license.botf003cfe2008-08-24 09:55:55 +090025