Save a file in ram filesystem

How to save a file in ram filesystem in wince6 in VF61

Dear @zecons

That’s really simple. Please see the following example code:

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

int _tmain(int argc, _TCHAR* argv[])
{
    HANDLE target;
    char   buf[9] = "test data";
    DWORD  dwBytesWritten;
    DWORD  dwBytesToWrite = sizeof(buf);

    //create a new file in the object store (RAM), write data and close the file
    target = CreateFile(L"\\test.txt", GENERIC_WRITE, 0, NULL, 
                        CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
    WriteFile(target, buf, dwBytesToWrite, &dwBytesWritten, NULL);
    CloseHandle(target);
}

Regards, Andy