Files

46 lines
980 B
C++
Raw Permalink Normal View History

2026-10-21 20:45:23 +01:00
#pragma once
#include <string>
//
// Platform Headers
//
#ifdef XR_USE_PLATFORM_WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif // !WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
#define NOMINMAX
#endif // !NOMINMAX
#include <windows.h>
#endif
#if defined(XR_USE_PLATFORM_WIN32) && !defined(XR_USE_PLATFORM_UWP)
#include "errhandlingapi.h"
#include "libloaderapi.h"
typedef HMODULE PluginHandle;
typedef FARPROC PluginFunc;
#elif defined(XR_USE_PLATFORM_UWP)
#include "errhandlingapi.h"
typedef HMODULE PluginHandle;
typedef FARPROC PluginFunc;
#else // Posix
#include <dlfcn.h>
typedef void* PluginHandle;
typedef void* PluginFunc;
#endif
PluginHandle Plugin_LoadLibrary(const wchar_t* libName);
void Plugin_FreeLibrary(PluginHandle handle);
PluginFunc Plugin_GetSymbol(PluginHandle handle, const char* symbol);
void Convert_utf16_to_utf8_char(char32_t utf16_codepoint, std::string& utf8_output);
std::string Convert_utf16_to_utf8(const wchar_t* libName);