The most common mistake is the use of global variables. If you do not use any global variables (or correctly synchronize access to those that you use), you have a long way to ensure thread safety.
IsMultiThread used, for example, by the memory manager for optimization in a single-threaded case. Personally, I do not think that this is a worthwhile optimization these days, since almost all useful code has streams of some description. I would just set IsMultiThread to True at the beginning of your DLL, for example. in the begin / end block of your .dpr DLL file or in one of the initialization sections of your device, which is equivalent.
To answer your question directly, an instance of IsMultiThread in your DLL will not be set true unless you create a thread in this DLL. Since you create streams in EXE, you need to do it yourself in the DLL.
More generally, it is simply not possible to talk a lot about the thread safety of your code without knowing what it does and what you really mean by thread safety. The latter may seem strange, but I mean the question discussed in Eric Lippert, the famous What is this thing that you call "thread safe"? article.
source share