Re: How can I access the worker thread data ?
From: Mihajlo Cvetanovic (mac_at_RnEeMtOsVeEt.co.yu)
Date: 11/19/04
- Next message: Andy Mortimer [MS]: "RE: CFileDialog, select more than 1143 filenames ..."
- Previous message: Bill Thompson: "Re: ToolTips in a View and TTN_NEEDTEXT"
- In reply to: Doug Harrison [MVP]: "Re: How can I access the worker thread data ?"
- Next in thread: Doug Harrison [MVP]: "Re: How can I access the worker thread data ?"
- Reply: Doug Harrison [MVP]: "Re: How can I access the worker thread data ?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 19 Nov 2004 17:38:13 +0100
Doug Harrison [MVP] wrote:
> Mihajlo Cvetanovic wrote:
>
>>Liviu Andron wrote:
>>
>>>CData* pData = dynamic_cast<CData*>(pParam);
>>>
>>>Isn't there supposed to be "reinterpret_cast" ?
>>
>>dynamic_cast should return zero if pParam never was of type CData*.
>
> No. As stated earlier, pParam has the type void*. The dynamic_cast operator
> cannot cast from void*, only to, and then only if pParam is of a polymorphic
> type, in which case, it returns a pointer to the complete object.
OK, I stand corrected. So, is there at all a way to check that some
void* actually points to some CData*? Maybe like this:
dynamic_cast<CData*>(reinterpret_cast<CData*>(pParam)) != NULL
- Next message: Andy Mortimer [MS]: "RE: CFileDialog, select more than 1143 filenames ..."
- Previous message: Bill Thompson: "Re: ToolTips in a View and TTN_NEEDTEXT"
- In reply to: Doug Harrison [MVP]: "Re: How can I access the worker thread data ?"
- Next in thread: Doug Harrison [MVP]: "Re: How can I access the worker thread data ?"
- Reply: Doug Harrison [MVP]: "Re: How can I access the worker thread data ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|