Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

AfxBeginThread Fails on Win8.1

$
0
0

I have an MFC application which calls AfxBeginThread to start a worker thread frequently (approximately 5 threads per minutes)

(AfxBeginThread(ThreadFunc, param);

ThreadFunc is just a simple function that talks to a remote server and return quickly.

This application is running perfectly on Windows XP and Windows 7.

But when I run it on Win8.1 Pro, AfxBeginThread starts to fail (return NULL) after the application runs for 5-6 hours. I noticed that AfxBeginThread does not record any error upon failure, so I cannot get any information via GetLastError.

Now I have no clue why it fails. Best guess is that Win8 has difference managing kernal resources and after my applcation runs for a few hours it fails to create thread because of resouce problem.

Any suggestion will be appreciated.




Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>