As a first step you should try capturing a crash dump for such 'random app crashes in production'. Dr Watson can help you get a crash dump. If you can get the crash dump, then you can at least point...
I do not see anything wrong with the code that you have pasted so far. You will have to send in more code to show us where that rectangle list is coming from - how it is created, how it was...
When you say the app runs slowly what exactly do you mean? Slowly as in running the app in one shot is slow, OR slowly as in application is used over a period of time and it runs slowly during that...
Try this - Delete the /Zc:wchar_t compiler option in your project settings. Then see if it compiles with original unsigned short* and if your other problems go away. Please let us know what you find...
1. You are going in a very roundabout way of doing things.
2. Your code works because you have ** force ** treated your integer variable as a literal binary representation of your input (which it...
You can pass data by passing in pointers to lists or Qs and then can implement your own synchronization mechanisms. That is what I also said as one of the mechanisms. But why would you want to go to...
Any type of producer/consumer problem can be neatly solved by using thread messages. Just passing the this pointer works only in cases where the worker thread just munges on some data from the class...
You do not need to make it a friend. That sort of does not even make sense. If a function is part of a class, it is part of the class. It is more than a friend. Real life analogy - if you are part of...
For other cases, the easiest, and most straightforward way is to use thread messsage Qs and send windows messages to your worker thread. Remember to...
Jeffery Richter book - 'Programming Applications for Microsoft Windows' has a whole page dedicated to this. It is a good read. Basically, the reasons are same as the ones pointed to by kirants.
...