Hi all, I would like to be able to create a memory mapped file and write to it, then after a time save it to disk, but I can't work out the correct combination of flags/calls to get it to work.
if I create a file like so: ok=apr_file_open(&fp, filename, APR_FOPEN_WRITE|APR_FOPEN_CREATE, APR_FPROT_UREAD|APR_FPROT_UWRITE, APR_POOL()); I can't get apr_mmap_create to succeed: With ok=apr_mmap_create(&mmap, fp, 0, 0, APR_MMAP_WRITE, APR_POOL()); I get 22 returned which according to apr_strerror is "Invalid Argument". If I change the siize arg to something else, 512 eg, I get "Acess denied" - which I is correct I suppose as the file doesn't have a size as I've just created it. Whats the correct way of doing this? Or is it not possible? I'm on WindowsXP and I have admin privs. Many thanks. bg