- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a DLL that is called by a multi-threaded main program. This program may create several instances of the DLL
Somewhere I read that the DLL itself, at least in DLLMain, should not call another DLL or create new threads, e g through parallelization of do-loops. What are the recommendations of the Forum on this issue ? Are there any risks for locks or racing conditions ? If so, how to mitigate ?
Best regards / Emilsson
Somewhere I read that the DLL itself, at least in DLLMain, should not call another DLL or create new threads, e g through parallelization of do-loops. What are the recommendations of the Forum on this issue ? Are there any risks for locks or racing conditions ? If so, how to mitigate ?
Best regards / Emilsson
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think it's possible to have "several instances of the DLL". As long as the DLL is written to be thread-safe, it should be fine. There's really little difference between calling a DLL and calling object code. You do want to make sure that the EXE and DLL are using the same run-time libraries.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think it's possible to have "several instances of the DLL". As long as the DLL is written to be thread-safe, it should be fine. There's really little difference between calling a DLL and calling object code. You do want to make sure that the EXE and DLL are using the same run-time libraries.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page