Restructuring

This commit is contained in:
Krzosa Karol
2024-01-12 11:28:19 +01:00
parent dde2334f95
commit eb60189b4b
39 changed files with 55 additions and 55 deletions

View File

@@ -0,0 +1,26 @@
#include "load_library.h"
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
LIB_Library LIB_LoadLibrary(char *str) {
HMODULE module = LoadLibraryA(str);
return (LIB_Library)module;
}
void *LIB_LoadSymbol(LIB_Library lib, char *symbol) {
void *result = (void *)GetProcAddress((HMODULE)lib, symbol);
return result;
}
bool LIB_UnloadLibrary(LIB_Library lib) {
BOOL result = FreeLibrary((HMODULE)lib);
if (result == 0) return false;
return true;
}
#endif // _WIN32