Solved

_beginthreadex function return value?

Posted on 1997-05-09
1
631 Views
Last Modified: 2013-12-04
The _beginthreadex function takes as the third parameter
(the thread start location) a function which returns an unsigned int.  My question is, where/when do you get access
to that return value?  At the point where the thread is
finished, the thread which started the auxilliary thread
will be long past the point where the stack could be used
to examine the value that the thread function returned.
0
Comment
Question by:flash103
1 Comment
 
LVL 4

Accepted Solution

by:
emmons earned 100 total points
Comment Utility
After the thread finishes, you can still call GetExitCodeThread to find out what the value was that was returned.
BOOL GetExitCodeThread( HANDLE hThread, LPDWORD lpdwExitCode)

The exit code is returned in the DWORD. If the thread has not yet termineated, the DWORD contains STILL_ACTIVE (0x103). If it is successful, it returns TRUE.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Run Program using VBScript 3 50
SQL to ElasticSearch Query 1 518
Example of WebAPI 7 29
Need more details 5 80
This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now