I checked the source code of the _beginthread() routine and it indeed returns the Win32 thread handle. You can safely do the simple cast. Bob Ammerman RAm Systems ----- Original Message ----- From: To: Sent: Wednesday, February 04, 2004 5:47 PM Subject: [OT]: Win32 Thread Priority in C++ > I'm writing a DLL that does threading, but I'm not using the MSVC++ library. I'm using the C runtime library. > > what I can't figure out is how to convert from the C runtime library thread handle (an unsigned int) to the Win32 API thread handle (void*). > > The sole reason that I need to do this is so that I can change a thread's priority. > > Any other means of changing the thread priority works for me, but the C runtime library specifically states that you should use _beginthread() rather than calling the equivalent Win32 API. > > I'm using _beginthread() to create my thread, and all my threading works... except the thread priority portion. > > How do I alter the priority of a thread created by _beginthread()? Will casting the unsigned int to a a void* have the desired effect or will it start randomly crashing things? > > --Brendan > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body