Hi Joel,
>In my testing, MTDLLs are truly multi-threaded. Multiple processes can run simultaneously in a single runtime environment. This should mean lower overhead than loading up multiple EXEs.
COM objects compiled as MTDLLs and such compiled as plain DLLs are identical as far as multi-threading abilities are concerned. Both can run a single DLL in multiple threads. The difference is that the DLL runtime is not thread-safe. Therefore the second thread creates a copy of the runtime DLLS and loads the copy instead. Therefore, plain DLLs require a lot more memory than MTDLLs. OTOH, instances are truly separated. In an MTDLL, multiple DLLs share the same thread local storage and therefore some environment settings in VFP. Whether or not an MTDLL truly runs in various threads, depends on the application that created them. DLLs run in the same thread as the host application. If the host isn't multithreaded, a MTDLL isn't, neither.
--
Christof
--
Christof