views:

38

answers:

1

I need to load the same dll and use its functionalities in "n" number of threads in the same process.

Will there be any problem in doing so or is there a better way to handle the above scenario?

A: 

What you are describing is perfectly valid. The potential issues are, generally speaking, the same as if the functions you call exist in the calling module. If the function simply operates on given non-shared data, then there is not likely to be any concurrency problem. The potential issues arise when using a shared resource. If there is a shared resource in the DLL and the functions themselves do not synchronize that access then you need to provide the synchronization in the calling functions.

Mark Wilkins