Visual studio version is working
This commit is contained in:
@@ -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