reading / finding files problems with Pocket PC - Handheld

This is a discussion on reading / finding files problems with Pocket PC - Handheld ; Over the years I developed a "moving map" application ( http://www.schaik.com/gps/pocketgem/ ) which runs fine on my Casio E125 PPC (Windows 2k PPC) and many other PPCs (like Dell, Compaq, etc.). One of my users tried to install it on ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: reading / finding files problems with Pocket PC

  1. reading / finding files problems with Pocket PC

    Over the years I developed a "moving map" application
    (http://www.schaik.com/gps/pocketgem/) which runs fine on my Casio
    E125 PPC (Windows 2k PPC) and many other PPCs (like Dell, Compaq,
    etc.). One of my users tried to install it on his new iPac and the
    following problem developed.

    After startup the program reads a config file. It searches for that
    file in the directory where the program is installed (\Program
    Files\Pocket Gem\), but also in the root file system and even a few
    other directories. On my Casio, the file is opened successful, however
    on the iPac the program can't find it.

    When the program opens a new file for write, my Casio creates it in
    the program directory, while the iPac creates it in the root
    directory.

    Interestingly enough, the program can read files successfully through
    the "File -> Open" popup window I created, which allows you to browse
    to the right directory.

    My question is now, are there any differences between the older and
    newer versions of Microsoft's PPC OS, that I'm not aware of.

    Thanks, Willem

  2. Re: reading / finding files problems with Pocket PC

    On 7 Oct 2004 08:05:09 -0700, willem@schaik.com (Willem van Schaik)
    wrote:

    >Over the years I developed a "moving map" application
    >(http://www.schaik.com/gps/pocketgem/) which runs fine on my Casio
    >E125 PPC (Windows 2k PPC) and many other PPCs (like Dell, Compaq,
    >etc.). One of my users tried to install it on his new iPac and the
    >following problem developed.
    >
    >After startup the program reads a config file. It searches for that
    >file in the directory where the program is installed (\Program
    >Files\Pocket Gem\), but also in the root file system and even a few
    >other directories. On my Casio, the file is opened successful, however
    >on the iPac the program can't find it.
    >
    >When the program opens a new file for write, my Casio creates it in
    >the program directory, while the iPac creates it in the root
    >directory.
    >
    >Interestingly enough, the program can read files successfully through
    >the "File -> Open" popup window I created, which allows you to browse
    >to the right directory.
    >
    >My question is now, are there any differences between the older and
    >newer versions of Microsoft's PPC OS, that I'm not aware of.


    I haven't noticed any differences that might be relevant here.

    The rest of this note mostly assumes you are using C/C++.

    First, make sure you call GetLastError whenever CreateFile fail. You
    can then either use Tools->Error lookup in the IDE or use
    FormatMessage in your program. The code and corresponding string _can_
    be cryptic and/or misleading, until you are used to them (sort of like
    legal precedent and legal writing). So if you can't make sense of a
    code, post it here, and someone will probably be able to.

    My best guess is the path you specify when you try to open files is
    wrong. So I would spend some time with a debugger, if possible. If
    not, then try popping up a message box with the path of each file just
    before you are about it.

    If neither of those work, post some code here. Specifically, the code
    you use to open these files.


    >
    >Thanks, Willem


    -----------------------------------------
    To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

    Robert E. Zaret, eMVP
    PenFact, Inc.
    500 Harrison Ave., Suite 3R
    Boston, MA 02118
    www.penfact.com

+ Reply to Thread