WM 6.1: CreateFileMapping, MapViewOfFile RRS feed

  • Question

  • I have a problem with the file mapping in WM 6.1 - now it is impossible to map something about 128+ MB. I found that there is a change:

    The arcticle explains everything nice about the dll loading problem that we really had and have found own solutions. Now it was solved by MS. The arcticle says that the LMA is less now for 128MB. But looks like only 128MB left.
    I don't want to beleive that the solution is to change the application logic and file formats. Is there any way to solve the problem on the OS level?
    Here is the example that fails for big files or for 6-7 files with size 10MB:


    HANDLE hMap = ::CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);

    LPVOID pMap = ::MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 0);

    I've played with the size parameters - didn't help. Any idea?

    Wednesday, April 8, 2009 5:05 AM


  • If someone is interesting - The problem exists only under Windows Mobile 6.1. The application worsk just fine under Windows CE 5 or Windows Mobile 6.0. More than it, the application works fine with the emulators of Windows Mobile 6.1 and 6.1.4.
    We didn' find a fix on the OS level. We didn't find who takes allmost all space in the LMA.
    Current solution - split the files, reduce the number of simultaniously mapped files.
    • Marked as answer by Pavel Gnatyuk Saturday, June 6, 2009 7:50 AM
    Saturday, June 6, 2009 7:50 AM