blob: 8a37f952a1325db919ec734925fceca9d9a61741 [file] [log] [blame]
[email protected]f994f47b2010-08-14 17:44:301// Copyright (c) 2010 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commitd7cae122008-07-26 21:49:384
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]32b76ef2010-07-26 23:08:2410#pragma once
initial.commitd7cae122008-07-26 21:49:3811
12#include <windows.h>
initial.commitd7cae122008-07-26 21:49:3813
14#include "base/basictypes.h"
15
16namespace base {
[email protected]f994f47b2010-08-14 17:44:3017
initial.commitd7cae122008-07-26 21:49:3818// 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.
21bool GetDataResourceFromModule(HMODULE module, int resource_id,
22 void** data, size_t* length);
[email protected]f994f47b2010-08-14 17:44:3023} // namespace base
initial.commitd7cae122008-07-26 21:49:3824
[email protected]2fdc86a2010-01-26 23:08:0225#endif // BASE_RESOURCE_UTIL_H__