accessing memory from address

bojoe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 30 06:51:22 PDT 2014


On Saturday, 30 August 2014 at 13:41:27 UTC, bojoe wrote:
> I am interfacing with a dll that returns a pointer to an int.
>
> In python, I can use from_address:
>
>  shape=list((c_int*rank).from_address(pi[2].contents.value))
>
> Is there something equivalent in d? Or do I need to manually 
> call ReadProcessMemory at that location?


that was silly - looks like I just needed to do this:

int shapex = *(cast(int*)shape);


More information about the Digitalmars-d-learn mailing list