I got a doubt in the following issue...

let said i wrote a dll by exporting a class, so when the external program create a new instances of this class and call a function let said StartCount which intenally will create a thread to perform the looping. This is running fine, but when within the same application I create another new instance of this class follow by calling the same function StartCount without destroy the previous class.

So, my question is will my dll go crazy of the looping thread. which eventually will cause the variable being over written by two running thread?

Or, i need to do my internal synchronization? or it is better to develop a COM dll rather than a normal WIN32 dll.

I know the above problem does not occur when the StartCount function is being call by two seperate program simultanoiusly.

regards,
Chris.C