How to get the pointer of "this" ?
Vinod K Chandran
kcvinu82 at gmail.com
Mon May 25 22:31:00 UTC 2020
On Monday, 25 May 2020 at 21:45:39 UTC, welkam wrote:
> On Sunday, 24 May 2020 at 17:05:16 UTC, Vinod K Chandran wrote:
>> cast(DWORD_PTR) this);
>
> Where is DWORD_PTR defined? I cant find it in docs. If its an
> alias of long then you have to cast to a pointer like this
> cast(long*) this;
> you need to specify that you want to cast to a pointer of type
> T. In this case T is long.
Hi,
Thanks for the reply. Well, DWORD_PTR is a win32 data type. It is
defined in the file windows.h. A dword is an unsigned, 32-bit
unit of data. We can use uint in D. I have tried that too, but no
luck.
More information about the Digitalmars-d-learn
mailing list