Library Version 12.1.6.0

Windows Mobile FAQ
Prev | Chapter 6. Building Berkeley DB for Windows Mobile | Next

## Windows Mobile FAQ

1. What if my Windows Mobile device does not support SetFilePointer and/or SetEndOfFile?

   You can manually disable the truncate functionality from the build.

   Do that by opening the `db-X.X.X/build_wince/db_config.h` file, and change the line that reads

       #define HAVE_FTRUCATE 1

   to read

       #undef HAVE_FTRUNCATE

   Making this change disables DB->compact() for btree databases.

2. Why doesn't automatic log archiving work?

   The Windows Mobile platform does not have a concept of a working directory. This means that the DB_ARCH_REMOVE and DB_ARCH_ABS flags do not work properly within Windows Mobile, because they rely on having a working directory.

   To work around this issue, you can call log_archive with the DB_ARCH_LOG flag, the list of returned file handles will not contain absolute paths. Your application can take this list of files, construct absolute paths, and delete the files.

3. Does Berkeley DB support Windows Mobile?

   Yes.

   Berkeley DB relies on a subset of the Windows API, and some standard C library APIs. These are provided by Windows CE. Windows Mobile is built "on top" of Windows CE.

4. Does Berkeley DB support Windows CE?

   Yes.

   Berkeley DB relies on a subset of the Windows API, and some standard C library APIs. These are provided by Windows CE.

5. What platforms are the supplied sample applications designed for?

   The supplied sample applications were developed for the Pocket PC 2003 emulator. They are known to work on real pocket PC devices and later versions of the emulator as well.

   The supplied applications are not designed to work with Smartphone devices. The screen size and input mechanisms are not compatible.

6. I see a file mapping error when opening a Berkeley DB environment or database. What is wrong?

   The default behavior of Berkeley DB is to use memory mapped files in the environment. Windows Mobile does not allow memory mapped files to be created on flash storage.

   There are two workarounds:

   1. Configure the Berkeley DB environment not to use memory mapped files. The options are discussed in detail in Shared memory region.
   2. Create the Berkeley DB environment on non-flash storage. It is possible to store database and log files in a different location to using the DB_ENV->add_data_dir() and DB_ENV->set_lg_dir() APIs.

Prev | Up | Next
Windows Mobile notes | Home | Chapter 7. Building Berkeley DB for UNIX/POSIX