blob: 3fda73e461077c1ea765e8ddd92ed18309b97798 (
plain) (
tree)
|
|
// Copyright (c) 2020 Egor Tensin <Egor.Tensin@gmail.com>
// This file is part of the "winapi-common" project.
// For details, see https://github.com/egor-tensin/winapi-common.
// Distributed under the MIT License.
#pragma once
#include "buffer.hpp"
#include <cstddef>
namespace winapi {
struct Resource {
// This is just a pointer to static data.
Resource() = default;
Resource(const void* data, std::size_t nb) : data(data), nb(nb) {}
Buffer copy() const { return {data, nb}; }
const void* data = nullptr;
std::size_t nb = 0;
};
} // namespace winapi
|