Discussion Locked

VB6SP5 Internal EXE Multithreading

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need to control multithread cls/dll's that are called withing an application. Does any one have an example of code that will work on VP6SP5? (createthread API causes error when executed)

3 replies

by peter ritchie

In Visual C++ the preferred method for creating a thread is to use AfxBeginThread.

Ideally you would create the thread suspsended (CREATE_SUSPENDED) and start it when all it's data has been properly initialized (e.g. the data associated with an CWinThread-derived class.

There's all sorts of good information on AfxBeginThread (including examples like MT)in the MSDN library included with Visual C++/Studio. As well, http://msdn.microsoft.com/ contains all that information and more.

This discussion is closed to new replies.