I have a DLL which is written in Visual C++ 6.0. It is called from a program written in Visual Basic 6.0 (yes, I know, it is obsolete now but changing up will be a big task - maybe later!)

I may well have several copies running at the same time and in order for the copies to talk to each other (eg "I am copy 3 and you are copy 5") I use the Pragma area. This has been working pretty well but occasionally when running multiple copies one of them will crash, especially when the multiple copies are being generated (the program will say eg "you have a six core processor, do you want to run six copies?" and then generate five more copies of itself - it is looking for solutions to a big problem and may run for several days so six copies running will find a solution six times quicker generally speaking)

It crosses my mind that this could be because of conflict in reading and writing to from the Pragma Area. So, my question is:

"Is the Pragma Area automatically locked to prevent conflict or is this something I will have to do myself?"

All help and suggestions appreciated!
Bob
.