I have just started using dlls and am trying to make a dynamic benchmarking application using dlls as benchmarks (one test per dll, all info inside dll).
However my program always fails to load dlls number 2 or more. Is there some limitations i'm not seeing?
I have narrowed it down to the following piece of code.
This will produce the output: Error: Dll2 could not be loaded!\r\n.Code:#include <stdio.h>
#include <windows.h>
int main(){
HINSTANCE dll1;
HINSTANCE dll2;
dll1 = LoadLibrary("a.dll");
dll2 = LoadLibrary("b.dll");
if(!dll1)printf("Error: Dll1 could not be loaded!\r\n");
if(!dll2)printf("Error: Dll2 could not be loaded!\r\n");
}
a.dll and b.dll are copies of the same file.
Both contain only the implimentations for the following functions:
Code:void __declspec (dllexport) getTestFunction(char* placement, int size);
long int __declspec (dllexport) realTestTwo()