Visual studio version is working
This commit is contained in:
@@ -14,14 +14,6 @@
|
||||
#include <charconv>
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
namespace sv {
|
||||
|
||||
bool case_insensitive_eq(string_view s1, string_view s2) {
|
||||
|
||||
@@ -279,10 +279,14 @@ static void ssl_load_certificate_authorities(SSL_CTX *ctx) {
|
||||
}
|
||||
|
||||
static void call_init_engine_wrapper(EngineWrapper *w) {
|
||||
HMODULE dll = LoadLibraryA(".\\luprex.dll");
|
||||
assert(dll != nullptr);
|
||||
HMODULE exe = GetModuleHandleA(NULL);
|
||||
using InitFn = void (*)(EngineWrapper *);
|
||||
InitFn initfn = (InitFn)GetProcAddress(dll, "init_engine_wrapper");
|
||||
InitFn initfn = (InitFn)GetProcAddress(exe, "init_engine_wrapper");
|
||||
if (initfn == nullptr) {
|
||||
HMODULE dll = LoadLibraryA(".\\luprexlib.dll");
|
||||
assert(dll != nullptr);
|
||||
initfn = (InitFn)GetProcAddress(dll, "init_engine_wrapper");
|
||||
}
|
||||
assert(initfn != nullptr);
|
||||
initfn(w);
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <profileapi.h>
|
||||
#elif defined(__linux__)
|
||||
#include <time.h>
|
||||
|
||||
Reference in New Issue
Block a user