Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Accessing files which are in JAR Pin
Michael Schubert9-Sep-09 21:20
Michael Schubert9-Sep-09 21:20 
QuestionVC++ Basic Threading - help Pin
GC1049-Sep-09 1:31
GC1049-Sep-09 1:31 
AnswerRe: VC++ Basic Threading - help Pin
CPallini9-Sep-09 1:59
mveCPallini9-Sep-09 1:59 
AnswerRe: VC++ Basic Threading - help Pin
Selvam R9-Sep-09 2:11
professionalSelvam R9-Sep-09 2:11 
AnswerRe: VC++ Basic Threading - help [Updated] Pin
Nuri Ismail9-Sep-09 2:28
Nuri Ismail9-Sep-09 2:28 
AnswerRe: VC++ Basic Threading - help Pin
GC1049-Sep-09 4:12
GC1049-Sep-09 4:12 
GeneralRe: VC++ Basic Threading - help Pin
Cedric Moonen9-Sep-09 4:20
Cedric Moonen9-Sep-09 4:20 
AnswerRe: VC++ Basic Threading - help Pin
Rajesh R Subramanian9-Sep-09 6:07
professionalRajesh R Subramanian9-Sep-09 6:07 
Just adding to the previous reply

GC104 wrote:
// why is a 'this' pointer passed as the pParam?


Because inside the worker thread, a CMyView object is being manipulated (in this case). This particular thread function needs a CMyView object be passed to it.

Note: However, it would be a lot better if threads can accept any object (or data type) passed as the parameter in general. Because different threads do different things. Some threads won't require anything at all. Therefore, the best approach would be to pass a pointer to "something". And this something is known to the calling code (it sets up the parameter) and the thread also know what exactly is the pointer pointing to and so you cast it to the appropriate type.


GC104 wrote:
//why is 'p' cast from something that already seems to be


p is a pointer to void (remember that LPVOID is nothing but void *). Therefore, you must cast it to an appropriate type (read my note above?)

Hope that helps. Smile | :)


It is a crappy thing, but it's life -^ Carlo Pallini

GeneralRe: VC++ Basic Threading - help Pin
GC10410-Sep-09 23:01
GC10410-Sep-09 23:01 
QuestionHow do I rename Outlook Pst newly created folder 'Personal Folders' programmatically ? Pin
SherTeks9-Sep-09 0:54
SherTeks9-Sep-09 0:54 
AnswerRe: How do I rename Outlook Pst newly created folder 'Personal Folders' programmatically ? Pin
Selvam R9-Sep-09 1:22
professionalSelvam R9-Sep-09 1:22 
AnswerRe: How do I rename Outlook Pst newly created folder 'Personal Folders' programmatically ? Pin
Adam Roderick J9-Sep-09 1:31
Adam Roderick J9-Sep-09 1:31 
Questionhow to create conference with iaxclient.dll? Pin
nitu dhanurved9-Sep-09 0:48
nitu dhanurved9-Sep-09 0:48 
AnswerRe: how to create conference with iaxclient.dll? Pin
Adam Roderick J9-Sep-09 2:09
Adam Roderick J9-Sep-09 2:09 
AnswerRe: how to create conference with iaxclient.dll? Pin
Richard MacCutchan9-Sep-09 3:07
mveRichard MacCutchan9-Sep-09 3:07 
QuestionCVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Vetukuri Raju8-Sep-09 23:40
Vetukuri Raju8-Sep-09 23:40 
AnswerRe: CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Adam Roderick J9-Sep-09 0:02
Adam Roderick J9-Sep-09 0:02 
GeneralRe: CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Vetukuri Raju9-Sep-09 0:20
Vetukuri Raju9-Sep-09 0:20 
QuestionRe: CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Adam Roderick J9-Sep-09 0:32
Adam Roderick J9-Sep-09 0:32 
AnswerRe: CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Vetukuri Raju9-Sep-09 0:38
Vetukuri Raju9-Sep-09 0:38 
QuestionRe: CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Adam Roderick J9-Sep-09 0:50
Adam Roderick J9-Sep-09 0:50 
GeneralRe: CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Vetukuri Raju9-Sep-09 1:00
Vetukuri Raju9-Sep-09 1:00 
GeneralRe: CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Adam Roderick J9-Sep-09 1:16
Adam Roderick J9-Sep-09 1:16 
GeneralRe: CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Vetukuri Raju9-Sep-09 1:25
Vetukuri Raju9-Sep-09 1:25 
GeneralRe: CVTRES : fatal error CVT1100: duplicate resource. type:DIALOG, name:PRINTSTATUS, language:0x0409 Pin
Adam Roderick J9-Sep-09 1:34
Adam Roderick J9-Sep-09 1:34 

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.