Can i safely cast void* from void[]?

Heinz malagana15 at yahoo.es
Sun Feb 8 13:25:41 PST 2009


Hi,

I remember i read around the D site that dinamic arrays can be stored in system memory in a 'non contiguous' way (different locations). I was trying to find again that page but haven't had any lucky. I'm not crazy, i know i saw it.

Anyway, i need this info to ensure that i can/can't cast from void[] to void*. I'm working with D dinamic arrays but i need to work this data then with windows API's, these functions take void* as parameters. I pass params of type cast(void*)void[] and have had no problems at the moment. But, what if data in the array is not stored contiguously? windows functions will crash right?

I hope you get the idea, and i hope someone to answer me. Thanx.


More information about the Digitalmars-d-learn mailing list