D
dude
I am trying to test out _beginthread() but I keep getting an error that:
_beginthread : undeclared identifier
I am using Visuall C++ with DotNET Studio and am on windows XP.
Here is the full program:
*******************************************************************
#include <windows.h>
#include <process.h>
HANDLE mainthread;
void beepthread(void *)
{
DWORD xitcode;
while (GetExitCodeThread(mainthread, &xitcode)&&xitcode==STILL_ACTIVE)
{
MessageBeep(-1);
Sleep(1000);
}
}
void main()
{
mainthread=GetCurrentThread();
_beginthread(beepthread,0,NULL);
MessageBox(NULL,"Red Alert","Alert",MB_OK);
}
****************************************************************************
_beginthread : undeclared identifier
I am using Visuall C++ with DotNET Studio and am on windows XP.
Here is the full program:
*******************************************************************
#include <windows.h>
#include <process.h>
HANDLE mainthread;
void beepthread(void *)
{
DWORD xitcode;
while (GetExitCodeThread(mainthread, &xitcode)&&xitcode==STILL_ACTIVE)
{
MessageBeep(-1);
Sleep(1000);
}
}
void main()
{
mainthread=GetCurrentThread();
_beginthread(beepthread,0,NULL);
MessageBox(NULL,"Red Alert","Alert",MB_OK);
}
****************************************************************************