Click here to Skip to main content
15,889,879 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: NetServerDiskEnum Example Pin
Richard MacCutchan14-Oct-09 21:59
mveRichard MacCutchan14-Oct-09 21:59 
GeneralRe: NetServerDiskEnum Example Pin
Abinash Mohanty14-Oct-09 23:09
Abinash Mohanty14-Oct-09 23:09 
QuestionMultithreaded App Pin
Manmohan2913-Oct-09 23:27
Manmohan2913-Oct-09 23:27 
AnswerRe: Multithreaded App Pin
CPallini13-Oct-09 23:45
mveCPallini13-Oct-09 23:45 
AnswerRe: Multithreaded App Pin
Game-point14-Oct-09 1:16
Game-point14-Oct-09 1:16 
AnswerRe: Multithreaded App Pin
Rajesh R Subramanian14-Oct-09 2:05
professionalRajesh R Subramanian14-Oct-09 2:05 
GeneralRe: Multithreaded App Pin
Manmohan2914-Oct-09 4:14
Manmohan2914-Oct-09 4:14 
AnswerRe: Multithreaded App Pin
Rajesh R Subramanian14-Oct-09 4:16
professionalRajesh R Subramanian14-Oct-09 4:16 
Manmohan29 wrote:
UINT CThreadDlg::ThreadFunc(LPVOID pParam) //---> Here is the problem!
{
return 0;
}

void CThreadDlg::OnBnClickedBthread()
{
// TODO: Add your control notification handler code here
AfxBeginThread(ThreadFunc, this);
}


The thread function should be a global function (not a member function of any class), or it must be a static member function of any class. Try this instead:

in your header file:
static UINT CThreadDlg::ThreadFunc(LPVOID pParam);

in the source file:
/*static*/ UINT CThreadDlg::ThreadFunc(LPVOID pParam){
OutputDebugString(_T("*********** Entered thread function ***********\n"));
return false;
}


Watch the output window of your debugger to see the text printed from your thread.


“Follow your bliss.” – Joseph Campbell

GeneralRe: Multithreaded App Pin
Roger Stoltz14-Oct-09 4:27
Roger Stoltz14-Oct-09 4:27 
GeneralRe: Multithreaded App Pin
Rajesh R Subramanian14-Oct-09 4:30
professionalRajesh R Subramanian14-Oct-09 4:30 
GeneralRe: Multithreaded App Pin
Manmohan2914-Oct-09 5:55
Manmohan2914-Oct-09 5:55 
Questionresolving link error LNK1241 Pin
KASR113-Oct-09 19:40
KASR113-Oct-09 19:40 
AnswerRe: resolving link error LNK1241 Pin
David Crow14-Oct-09 2:40
David Crow14-Oct-09 2:40 
QuestionCursor in edit box Pin
sonualex13-Oct-09 18:53
sonualex13-Oct-09 18:53 
AnswerRe: Cursor in edit box Pin
David Crow14-Oct-09 2:23
David Crow14-Oct-09 2:23 
GeneralRe: Cursor in edit box Pin
sonualex14-Oct-09 3:32
sonualex14-Oct-09 3:32 
GeneralRe: Cursor in edit box Pin
David Crow14-Oct-09 3:39
David Crow14-Oct-09 3:39 
GeneralRe: Cursor in edit box Pin
sonualex14-Oct-09 20:46
sonualex14-Oct-09 20:46 
QuestionRe: Cursor in edit box Pin
David Crow15-Oct-09 3:00
David Crow15-Oct-09 3:00 
AnswerRe: Cursor in edit box Pin
sonualex15-Oct-09 3:32
sonualex15-Oct-09 3:32 
AnswerRe: Cursor in edit box Pin
David Crow15-Oct-09 4:10
David Crow15-Oct-09 4:10 
GeneralRe: Cursor in edit box Pin
sonualex15-Oct-09 22:38
sonualex15-Oct-09 22:38 
GeneralRe: Cursor in edit box Pin
David Crow16-Oct-09 2:34
David Crow16-Oct-09 2:34 
GeneralRe: Cursor in edit box Pin
sonualex21-Oct-09 0:26
sonualex21-Oct-09 0:26 
QuestionRe: Cursor in edit box Pin
David Crow21-Oct-09 2:29
David Crow21-Oct-09 2:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.