we tried to encrypt a dll with basic features of our software, so that potential calls from the "wrapper" executable could be debugged [in regard to our previous question.]
However, as soon as we encrypt the dll, our wrapper-application stops (and seems to wait for the dll to check for licensing information).
We build a minimal example project for windows:
Code: Select all
#include <windows.h>
__declspec(dllexport) int check(int val) { return 123; }
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) { return TRUE; }
Code: Select all
#include <windows.h>
#include <iostream>
typedef int(*TestFunc)(int);
int main() {
TestFunc _TestFunc;
HINSTANCE hInstLibrary = LoadLibrary("Compiled_DLL.dll");
if (hInstLibrary) {
_TestFunc = (TestFunc)GetProcAddress(hInstLibrary, "check");
if (_TestFunc) {
std::cout << _TestFunc(23) << std::endl;
}
FreeLibrary(hInstLibrary);
} else {
std::cout << "DLL Failed To Load!" << std::endl;
}
return 0;
}
Are there specific Options during Encryption, which lead to our problem?
Regards
J