Hi.
I want to call a C library function that returns a data buffer as a void*. How do I convert the resulting void* into something I can process in D?

//I have the following function from the GDAL C library.
extern(C) CPLErr GDALReadBlock( GDALRasterBandH, int, int, void* );


So I have (GByte is defined in the GDAL library):

void* buffer = malloc( GByte.sizeof * x_block_size * y_block_size );

I fill the buffer (and ignore any errors :o)

GDALReadBlock( AGDALRasterBandHInstance, xblock, yblock, buffer );


Now, how can I access the data in buffer?

Reply via email to