Click here to Skip to main content
15,922,574 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Successful Debug Build, but got Errors during Release Build Pin
PankajB4-Apr-09 2:44
PankajB4-Apr-09 2:44 
GeneralRe: Successful Debug Build, but got Errors during Release Build Pin
Joseph Marzbani4-Apr-09 4:02
Joseph Marzbani4-Apr-09 4:02 
QuestionIs it possible to get individual properties from a specific Flag value in VC++? Pin
Joseph Marzbani3-Apr-09 20:55
Joseph Marzbani3-Apr-09 20:55 
QuestionHelp Please!!! Pin
angel.monkey3-Apr-09 20:54
angel.monkey3-Apr-09 20:54 
AnswerRe: Help Please!!! Pin
Joseph Marzbani3-Apr-09 21:03
Joseph Marzbani3-Apr-09 21:03 
GeneralRe: Help Please!!! Pin
angel.monkey3-Apr-09 21:14
angel.monkey3-Apr-09 21:14 
AnswerRe: Help Please!!! - Warning, long reply! Pin
Iain Clarke, Warrior Programmer3-Apr-09 23:16
Iain Clarke, Warrior Programmer3-Apr-09 23:16 
AnswerRe: Help Please!!! Pin
Rajesh R Subramanian3-Apr-09 23:22
professionalRajesh R Subramanian3-Apr-09 23:22 
GeneralRe: Help Please!!! Pin
Iain Clarke, Warrior Programmer3-Apr-09 23:28
Iain Clarke, Warrior Programmer3-Apr-09 23:28 
GeneralRe: Help Please!!! Pin
Rajesh R Subramanian3-Apr-09 23:35
professionalRajesh R Subramanian3-Apr-09 23:35 
GeneralOT - Re: Help Please!!! Pin
Iain Clarke, Warrior Programmer3-Apr-09 23:47
Iain Clarke, Warrior Programmer3-Apr-09 23:47 
GeneralRe: OT - Re: Help Please!!! Pin
Rajesh R Subramanian4-Apr-09 0:45
professionalRajesh R Subramanian4-Apr-09 0:45 
GeneralRe: OT - Re: Help Please!!! [modified] Pin
angel.monkey4-Apr-09 10:06
angel.monkey4-Apr-09 10:06 
GeneralRe: OT - Re: Help Please!!! Pin
Iain Clarke, Warrior Programmer5-Apr-09 22:31
Iain Clarke, Warrior Programmer5-Apr-09 22:31 
GeneralRe: Help Please!!! [modified] Pin
Sauce!4-Apr-09 17:00
Sauce!4-Apr-09 17:00 
GeneralRe: Help Please!!! Pin
Rajesh R Subramanian5-Apr-09 2:49
professionalRajesh R Subramanian5-Apr-09 2:49 
QuestionUSB Drive Pin
MsmVc3-Apr-09 18:23
MsmVc3-Apr-09 18:23 
AnswerRe: USB Drive Pin
Iain Clarke, Warrior Programmer3-Apr-09 23:29
Iain Clarke, Warrior Programmer3-Apr-09 23:29 
QuestionHow can i call a function with a CString variable ? Pin
SNArruda3-Apr-09 16:57
SNArruda3-Apr-09 16:57 
AnswerRe: How can i call a function with a CString variable ? Pin
Divyang Mithaiwala3-Apr-09 21:16
Divyang Mithaiwala3-Apr-09 21:16 
AnswerRe: How can i call a function with a CString variable ? Pin
Iain Clarke, Warrior Programmer3-Apr-09 23:41
Iain Clarke, Warrior Programmer3-Apr-09 23:41 
Question_beginthreadex() conversion error Pin
Killiconn3-Apr-09 15:42
Killiconn3-Apr-09 15:42 
AnswerRe: _beginthreadex() conversion error Pin
sashoalm4-Apr-09 2:17
sashoalm4-Apr-09 2:17 
Hi, from the code you posted I can't be certain if WebServer::HandleRequest is a static function or not. But it must be a static function.

This is because the 3rd argument of _beginthreadex is a pointer to function, which must have exactly the same parameters and return type as the the function that is required.

In this case the function you supply must look like this:

unsigned __stdcall ThreadProc(void * param);

It MUST return an unsigned, and it MUST accept a void* as parameter, and it MUST NOT be a member function. You can still make it part of the class, but as a static function.

Also, never try to fool the compiler by casting the function pointer you pass as your callback - your program is going to try to execute this code, giving it the parameters it expects the function requires. So what if you cast a function that requires more parameters as one that requires less? It will get its arguments from uninitialized memory and will probably crash or cause memory corruption.

There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal

AnswerRe: _beginthreadex() conversion error Pin
Stuart Dootson4-Apr-09 2:48
professionalStuart Dootson4-Apr-09 2:48 
QuestionStrategy Question Pin
Parker M cCauley3-Apr-09 13:40
Parker M cCauley3-Apr-09 13:40 

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.