Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Multithreading Through a Wrapper DLL

Avatar of mooseware_ca
mooseware_ca asked on
ProgrammingCC++
7 Comments1 Solution441 ViewsLast Modified:
I've got a question about thread safe programming.  I'm a business application developer and don't really understand all of the implications of thread-safe programming.  I've got a customer who is using a third-party DLL which is thread-safe/multithreaded and stateful.  You can open many independent sessions in this DLL from many different calling programs and each session gets an integer handle that you use as part of subsequent calls to the API.  The DLL keeps all of these concurrent sessions on multiple threads separate and everything works great.

So here is my problem/issue/question.  My customer wants to have a wrapper written around certain parts of the API of this third-party DLL.  The point of the wrapper is just to reconfigure the function arguments.  The DLL uses standard C calling conventions and relies heavily on C structs.  The DLL is not COM or anything, just straight-forward static C functions.  My customer wants to access the API using a language which can't handle structs properly.  Therefore, they want a wrapper DLL that rejigs the structs as independent function arguments using basic data types.  This all seems pretty simple, just create a new DLL that wraps the third-party DLL with some static functions that do the translations to and from structs and basic types.  

What I don't know is this:  Will there be any threading complications if I build this simple DLL with straight forward static wrapper functions?  Do I need to do anything to avoid problems in a multi-threaded application?
ASKER CERTIFIED SOLUTION
Avatar of jkr
Commented:
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answers