How can I make this work?

Jack jckj33 at gmail.com
Sun Feb 28 07:05:27 UTC 2021


I'm using a windows callback function where the user-defined 
value is passed thought a LPARAM argument type. I'd like to pass 
my D array then access it from that callback function. How is the 
casting from LPARAM to my type array done in that case?

for example, I need something like this to work:

int[] arr = [1, 2, 3];
long l = cast(long) cast(void*) arr.ptr;
int[] a = cast(int[]) cast(void*) l;


More information about the Digitalmars-d-learn mailing list