From def5c50960eea4c112647f88361a3ae7155901a8 Mon Sep 17 00:00:00 2001 From: egor-tensin Date: Tue, 4 Jul 2023 00:48:00 +0000 Subject: =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20egor-tensin/wina?= =?UTF-8?q?pi-common@0c196cbe8b4927c78c02b2c7312fc69a507db845=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource_8hpp_source.html | 108 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 resource_8hpp_source.html (limited to 'resource_8hpp_source.html') diff --git a/resource_8hpp_source.html b/resource_8hpp_source.html new file mode 100644 index 0000000..ca1bcbb --- /dev/null +++ b/resource_8hpp_source.html @@ -0,0 +1,108 @@ + + + + + + + +winapi_common: include/winapi/resource.hpp Source File + + + + + + + + + +
+
+ + + + + + +
+
winapi_common +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
resource.hpp
+
+
+
1 // Copyright (c) 2020 Egor Tensin <Egor.Tensin@gmail.com>
+
2 // This file is part of the "winapi-common" project.
+
3 // For details, see https://github.com/egor-tensin/winapi-common.
+
4 // Distributed under the MIT License.
+
5 
+
6 #pragma once
+
7 
+
8 #include "buffer.hpp"
+
9 
+
10 #include <cstddef>
+
11 
+
12 namespace winapi {
+
13 
+
15 struct Resource {
+
16  // This is just a pointer to static data.
+
17 
+
18  Resource() = default;
+
19 
+
20  Resource(const void* data, std::size_t nb) : data{data}, nb{nb} {}
+
21 
+
23  Buffer copy() const { return {data, nb}; }
+
24 
+
25  const void* data = nullptr;
+
26  std::size_t nb = 0;
+
27 };
+
28 
+
29 } // namespace winapi
+
Binary data container.
Definition: buffer.hpp:24
+
Resources embedded in a PE (Portable Executable).
Definition: resource.hpp:15
+
Buffer copy() const
Definition: resource.hpp:23
+
+ + + + -- cgit v1.2.3