Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7651715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:34:32+00:00 2026-05-31T11:34:32+00:00

I have a dll with source code that is not thread safe yet. The

  • 0

I have a dll with source code that is not thread safe yet. The dll is quite complex and it will take quite a long time to make it thread safe. So i came up with the idea to just run several “copies” of the Dll independently. The easiest thing would probably be to create N renamed copies of the Dll and to load one separate Dll per thread.

Is this a possible solution?
Is there a better similar way?
Is there possibly some wrapper code existing ?

I know that this is not at all a good engineering solution. Please don’t blame me. But it might solve a number of problems.

EDIT 2017

I’ve done this and it works without Problems. Great!
Please note the following though:

http://msdn.microsoft.com/en-us/library/2s9wt68x%28v=vs.80%29.aspx

If a DLL declares any nonlocal data or object as __declspec( thread ), it can cause a protection fault if dynamically loaded.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:34:34+00:00Added an answer on May 31, 2026 at 11:34 am

    That solution is perfectly possible and, in my view, is the only viable way to deal with a DLL that has global state that is not thread-safe. It’s not pretty, but it does work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DLL that's compiled, and I don't have the source code for
I Have around say 6 dll's ( No source code ). They do not
I have a DLL, for which I do not have the source code. It
I have source code for a Windows DLL that is written in C++ and
Is it possible to convert a dll library back to source code? Not that
I have an external DLL whose source code is C#. From the documentation for
I am debugging a third-party DLL for which I don't have the source code.
I have DLL and application that will call some function in this dll. For
I have a closed source unmanaged DLL coded in C++ that I wanted to
Is it ok to write code in an MSVS that does not have commerical

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.