Quote Originally Posted by ABM View Post
It is my code which works fine on my work computer but not on my release version of the program.
Typical multithread issues.

As MikeAThon and myself have mentioned, whoever wrote the original code was not versed in proper usage of multiple threads and synchronization objects such as mutex, semaphore, critical section, etc.

If that person was versed in such topics, there wouldn't be the hack written using PeekMessage() and Sleep(). Once I see that, and the program is supposed to be multithreaded, it gives the impression that the code was written by someone who knows only about single-treaded programs and have no experience writing multi-threaded programs, therefore the hack that just happens to work on their computer.

Writing multithreaded programs takes experience in writing multi-threaded programs. This means knowing what the synchronization objects are (again, mutex, critical section, semaphore), how to use them, when to use them, and how to debug MT apps that do not behave correctly. You can have 20 years experience writing single-thread programs -- if you don't have experience writing MT programs, you wind up with a mess.

Regards,

Paul McKenzie