Hello everyone.I just have a curiosity which i think i won't be able to satisify by myself.
Say we have this function :
extern "C" __declspec (dllexport) void whatever () {
printf ("%s","whatever");
}
if you try to call it from a process like this
typedef void (*pfWhatever)();
HINSTANCE lib=LoadLibrary("lib");
pfWhatever=(*pfWhatever)GetProcAddress((HMODULE))lib,"whatever");
will throw an error but calling it instead like this
pfWhatever=(*pfWhatever)GetProcAddress((HMODULE))lib,"_whatever"); //preceded by an underline
will do the job.
Thanks a lot for your time.