As far as I know, exe and dll are essentially the same thing, only in dll there is an export table . Earlier I tried to export something simple from exe (like Sleep() ). Now there is a need for it, but everything is complicated. What's happening:
I load the file from another file with LoadLibrary() ( GetLastError() returns 0), I get the function GetProcAdress() ( GetLastError() all also returns zero). In the version that exports, about the code
extern"C" _declspec(dllexport) void go(); static int a=0; void go() { a=1; } Actually the question:
If an exe with the exported function is already running, and I load it from the second exe and call go() , will the variable a change in an already running process?