I want to load a dll from a hidden process that I compiled with -mwindows in g ++ but it does not load but I remove the flag > -mwindows is loading well.
Here's the code:
load_dll.cpp
HINSTANCE hGetProcIDDLL = LoadLibrary("MiLibreria");
f_funci funci = (f_funci)GetProcAddress(hGetProcIDDLL, "funci");
f (!funci) { /*...*/
Dll.cpp
extern "C" __declspec(dllexport) int funci() {
MessageBoxA(NULL, "HOLA DESDE PLUGIN", "Plugin-msg", NULL);
return 0;
}
complete compiler line g ++ program.cpp -o calculate.exe -std = c ++ 11 -fno-rtti -fno-inline -O3 -static -static-libstdc ++ -lole32 -loleaut32 -luuid -mwindows