mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
23 lines
469 B
C
23 lines
469 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <string_view>
|
||
|
|
#include <optional>
|
||
|
|
#include <span>
|
||
|
|
#include <filesystem>
|
||
|
|
|
||
|
|
class RcResource
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
std::span<const std::byte> _memory;
|
||
|
|
|
||
|
|
static std::optional<RcResource> create(int resource_id, const std::wstring_view resource_class);
|
||
|
|
bool saveAsFile(const std::filesystem::path destination);
|
||
|
|
|
||
|
|
private:
|
||
|
|
RcResource() = delete;
|
||
|
|
RcResource(std::span<const std::byte> memory) :
|
||
|
|
_memory{ std::move(memory) }
|
||
|
|
{
|
||
|
|
}
|
||
|
|
};
|