Code:
#include <stdio.h>
#include <windows.h>
extern "C"{
void __declspec (dllexport) getTestFunction2(char* placement, int size){
snprintf(placement, size, "realTestTwo1243214");
//snprintf(placement, size, "7zFunctionName");
return;
}
long int __declspec (dllexport) realTestTwo1243214(){
printf("Currently in the realTest function in the DLL! \x02\r\n");
return 0;
}
}
bool APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
That is the dll's code. The first dll is the same code, but with different function names
Edit: GetLastError returns 998 - Invalid access to memory location on 2nd dll.