MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Dll.h
Go to the documentation of this file.
1
/** @noop License Comment
2
* @file
3
* @copyright
4
* This Source Code is subject to the terms of the Mozilla Public License, v2.0.
5
* If a copy of the MPL was not distributed with this file You can obtain one at
6
* https://mozilla.org/MPL/2.0/
7
*
8
* @author David Mórász
9
* @date 2025
10
*/
11
12
#pragma once
13
14
#include "CoreMinimal.h"
15
#include "
Mcro/Concepts.h
"
16
17
namespace
Mcro::Dll
18
{
19
using namespace
Mcro::Concepts
;
20
21
/** RAII wrapper around PushDllDirectory / PopDllDirectory */
22
struct
MCRO_API
FScopedSearchPath
23
{
24
FScopedSearchPath
(FString
const
& path);
25
~FScopedSearchPath
();
26
27
private
:
28
FString Path;
29
};
30
31
/** RAII wrapper around GetDllHandle / FreeDllHandle */
32
struct
MCRO_API
FScopedDll
33
{
34
FScopedDll
(
const
TCHAR* fileName);
35
~FScopedDll
();
36
37
private
:
38
void
* Handle;
39
};
40
41
/** Handle multiple DLL files in one set and an optional base path for them */
42
struct
MCRO_API
FScopedDllSet
43
{
44
FScopedDllSet
() {}
45
46
template
<CConvertibleTo<const TCHAR*>... Args>
47
FScopedDllSet
(FString
const
& pushPath, Args... args)
48
{
49
FScopedSearchPath
pathContext(pushPath);
50
(Dlls.Emplace(args), ...);
51
}
52
53
private
:
54
55
TArray<FScopedDll> Dlls;
56
};
57
}
Concepts.h
Mcro::Concepts
Definition
Concepts.h:34
Mcro::Dll
Definition
Dll.h:18
Mcro::Dll::FScopedDllSet
Definition
Dll.h:43
Mcro::Dll::FScopedDllSet::FScopedDllSet
FScopedDllSet()
Definition
Dll.h:44
Mcro::Dll::FScopedDllSet::FScopedDllSet
FScopedDllSet(FString const &pushPath, Args... args)
Definition
Dll.h:47
Mcro::Dll::FScopedDll
Definition
Dll.h:33
Mcro::Dll::FScopedDll::FScopedDll
FScopedDll(const TCHAR *fileName)
Mcro::Dll::FScopedDll::~FScopedDll
~FScopedDll()
Mcro::Dll::FScopedSearchPath
Definition
Dll.h:23
Mcro::Dll::FScopedSearchPath::~FScopedSearchPath
~FScopedSearchPath()
Mcro::Dll::FScopedSearchPath::FScopedSearchPath
FScopedSearchPath(FString const &path)
Mcro_Origin
Public
Mcro
Dll.h
Generated by
1.12.0