Hi .... I am getting the error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt". This is basically happening when i use threads in my application. When i remove the Thread invocation and use the function without the threading, it works fine.

Some background on the Project: It is basically a CAD simulation project using API of a software. The error basically happens at the API's function call. But works fine if i dont use any threads. But then if the part that is executing the API runs in a seperate thread, i get this error.

I tried to search a lot on this issue, and people have given some solutions which have worked for them but isn't working in my case.

Please let me know if you have any ideas on how to go about it.

Thanks.