Re: [gdal-dev] VSIGetMemFileBuffer Returns NULL When Copying Vector Dataset to Vsimem

2023-10-05 Thread Even Rouault via gdal-dev
Le 06/10/2023 à 01:11, Soren Saville Scott a écrit : Hi Even, Suggests something wrong with my build. Is there possibly something strange happening across DLL boundaries? Do you know of any build flags that could change the VSIMEM behaviour? I'm not seeing anything suspicious here,

Re: [gdal-dev] VSIGetMemFileBuffer Returns NULL When Copying Vector Dataset to Vsimem

2023-10-04 Thread Even Rouault via gdal-dev
Hi, size_t is an incorrect size for DataLength (if you run on 32 bit architecture). You should use vsi_l_offset. Besides that the following standalone inspired from your code works fine for me: #include #include "gdal_priv.h" int main() {     GDALAllRegister();     GDALDataset* Dataset

[gdal-dev] VSIGetMemFileBuffer Returns NULL When Copying Vector Dataset to Vsimem

2023-10-03 Thread Soren Saville Scott via gdal-dev
Hi, I'm integrating GDAL in C++ with a system that defines its own asset types stored on disk, and am writing a wrapper for datasets using this asset system. To 'import' a dataset I call GDALOpenEx on it, CreateCopy() it to some "/vsimem/foo.shp" path, GDALClose() the datasets to flush it, and