Solved

_beginthreadex function return value?

Posted on 1997-05-09
1
664 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
ID: 1397235
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

840 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