Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

_beginthread on embedded VC++

249 views
Skip to first unread message

Hetal Patel

unread,
Feb 16, 2003, 7:31:45 PM2/16/03
to
Hi All,

When I compiled a project ported from Windows PC to
Windows CE, using embedded VC++, I get the following error
message.

_beginthread' : undeclared identifier
_endthread' : undeclared identifier

I include stdlib.h. I realized that Windos CE does not
have process.h file which is required on the PC to use
beginthread.

Any idea whats happening
thanks,
Hetal.

Steve Maillet (eMVP)

unread,
Feb 16, 2003, 7:45:55 PM2/16/03
to
As of V2.0x _beginthread is not needed in Windows CE> Since the C Runtime
library is part of CoreDll.dll ALL applications always get the Multithreaded
library that takes care of thread initialization automatically.

--
Steve Maillet (eMVP)
Entelechy Consulting
smaillet_AT_EntelechyConsulting_DOT_com


Dirk Gaudian

unread,
Feb 17, 2003, 4:21:11 AM2/17/03
to
On Sun, 16 Feb 2003 19:45:55 -0500, Steve Maillet (eMVP) wrote:

> As of V2.0x _beginthread is not needed in Windows CE> Since the C Runtime
> library is part of CoreDll.dll ALL applications always get the Multithreaded
> library that takes care of thread initialization automatically.

Yes, but _beginthread would also create the new thread: CreateThread is
what to use instead of _beginthread to answer the question completely.

Andrew Tucker

unread,
Feb 17, 2003, 1:53:04 PM2/17/03
to
These functions are used to start a thread and properly initialize the CRT
for multithreaded use. They are unnecessary in CE the CRT is always
multithreaded. Instead of _beginthread/_endthread you should use the API
functions CreateThread/ExitThread.

HTH,

Andrew Tucker
CE MVP


"Hetal Patel" <Patel...@msn.com> wrote in message
news:038d01c2d61b$f37509f0$2f01...@phx.gbl...

Phil Frisbie, Jr.

unread,
Feb 18, 2003, 11:48:57 AM2/18/03
to
Hetal Patel wrote:
> Hi All,
>
> When I compiled a project ported from Windows PC to
> Windows CE, using embedded VC++, I get the following error
> message.
>
> _beginthread' : undeclared identifier
> _endthread' : undeclared identifier
>
> I include stdlib.h. I realized that Windos CE does not
> have process.h file which is required on the PC to use
> beginthread.

Here is what I use for portable Windows code using _beginthreadex:

#if defined (_WIN32_WCE)
#define _beginthreadex(security, \
stack_size, \
start_proc, \
arg, \
flags, \
pid) \
CreateThread(security, \
stack_size, \
(LPTHREAD_START_ROUTINE) start_proc, \
arg, \
flags, \
pid)
#else /* !(_WIN32_WCE) */
#include <process.h>
#endif /* !(_WIN32_WCE) */


--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com

0 new messages