Your main program should use the
LoadLibrary()[
^] function to load the DLL specific to the users report type. Then having obtained the handle to the DLL you can get the address of each required function via
GetProcAddress()[
^] and call it to create your report. Something like :
if (bFinancial)
HMODULE hModule = LoadLibrary("FinancialReport.dll");
else if (bCommercial)
HMODULE hModule = LoadLibrary("CommercialReport.dll");
else
HMODULE hModule = LoadLibrary("BasicReport.dll");
FARPROC fProc = GetProcAddress(hModule, "Create");
fProc( ... );