4#ifndef _Stroia_Foundation_Execution_DLLSupport_h_
5#define _Stroia_Foundation_Execution_DLLSupport_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
11#if qStroika_Foundation_Common_Platform_Windows
17#include "Stroika/Foundation/Characters/SDKString.h"
18#include "Stroika/Foundation/Execution/Exceptions.h"
29#if qStroika_Foundation_Common_Platform_Windows
30 using DLLHandle = HMODULE;
31 using ProcAddress = FARPROC;
33 using DLLHandle =
void*;
34 using ProcAddress =
void*;
37#if !qStroika_Foundation_Common_Platform_Windows
38 class DLLException :
public Execution::RuntimeErrorException<> {
40 DLLException (
const char* message);
55 DLLLoader (
const SDKChar* dllName,
const vector<filesystem::path>& searchPath);
56#if qStroika_Foundation_Common_Platform_POSIX
57 DLLLoader (
const SDKChar* dllName,
int flags);
58 DLLLoader (
const SDKChar* dllName,
const vector<filesystem::path>& searchPath,
int flags);
65 nonvirtual
operator DLLHandle ()
const;
71 nonvirtual ProcAddress
GetProcAddress (
const char* procName)
const;
72 nonvirtual ProcAddress
GetProcAddress (
const wchar_t* procName)
const;
85#include "DLLSupport.inl"
nonvirtual ProcAddress GetProcAddress(const char *procName) const
conditional_t< qTargetPlatformSDKUseswchar_t, wchar_t, char > SDKChar
basic_string< SDKChar > SDKString