Closed drvoss closed 4 years ago
Could you please explain the problem that this change is fixing?
@jkotas
#define symLoad GetProcAddress
The #define statement takes two strings. first identifier and second token-string. The #define line occurs compile error.
ref : https://docs.microsoft.com/en-us/cpp/preprocessor/hash-define-directive-c-cpp?view=vs-2019
#include <unistd.h>
// ..
#ifndef F_OK
#define F_OK 0
#endif
Visual C++ has no unistd.h. It's for linux. So, if It can't find the F_OK definition, defined it.
HINSTANCE handle = LoadLibraryA(path);
The default LoadLibrary defines LoadLibraryW. It takes Unicode as an argument. Path is ansi string. So I fix it LoadLibraryA.
ref : https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryw
Support Visual C++ compiler