Coblist

Hi,

I want typecast COblist variable to WPARAM and LPARAM.
Is it possible if possible then how and if not then why?

ex-->

COblist llsource;

(WPARAM)llsource;

COblist lltarget;

(LPARAM)lltarget;



How to achieve this conversion.

Thanx in advance.
I don't know what a COblist is (something from the C++ Std. Lib. I don't use?), but the LPARAM is used in Win32/64 Api coding to sometimes pass the address of something or other to various Win Api functions through a SendMessage() call. In such cases typically an address of something is cast to an LPARAM for a SendMessage() call. So you could use the address of operator ( & ) on a COblist object and cast that address to an LPARAM. However, I know of no Win32/64 Api functions or notification messages that take such an object, so there's no telling what will happen if you do it. Maybe nothing. Maybe a crash. Hard to tell in advance.
CObList is a linked list of CObjects I think. You can't typecast an actual CObList object, but you can typecast the address.
Topic archived. No new replies allowed.