Re: Windows Mobile config / properties file

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Wed, 18 Jul 2007 07:02:00 -0700, Trafi
<Trafi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I have been writing Java code for the past 9 years and am just starting to
write Windows Mobile code. In Java there is a Properties class that allows
Java apps to read and write application settings / configuration to a file in
a key=value format.

I know that I could write my configration to the registry, but I have a
requirement that states that I cannot use the registry. I must save all of
my application configuration information to a file in the applications
default directory. I could do this in XML, but I am looking for the correct
way of doing this. I have read about ConfigurationManager, but it appears
that is not available in the CF.

I will be reading and writing all of the common data types in the proeprties
(int, bool, string, ...).

Is there something that is comperable to the Properties class in Java?

I'm not familiar with that class, so I can't comment. But you could
use "ini" files. They've been around longer than the registry. For
some possibly useful code, go to CodeProject (www.codeproject.com) and
look up
ini file
The relative merits of registry vs ini files have been discussed
several times, sometimes a bit heatedly. For one reasonable
discussion, see the 14-22 May 2003 thread called "Registry instead of
ini - Why?!?!" in comp.os.ms.windows.programmer.win32 (yes, Windows
CE/Mobile has enough in common with "big" windows to make that
newsgroup in general and that discussion in particular relevant).

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

Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 478
Boston, MA 02116
www.penfact.com
.



Relevant Pages

  • Re: Starp up sequence
    ... >> RunServicesOnce ... >> User Profile Startup Folder ... >> the programs specified in the Computer Configuration setting just before ... >> AppInit_DLLs Registry value. ...
    (microsoft.public.windowsxp.customize)
  • Re: Anything like the Windows Registry or INI files for Linux/Unix?
    ... > Linux doesn't have anything like the registry. ... > Linux is not a monolithic something like Windows. ... configuration is in an entirely separate file, ... config files that may provide long term commentary of what ...
    (comp.os.linux.misc)
  • Re: Enabling Add Ons (IE 7)
    ... drill down through Computer Configuration> Administrative ... Templates> Windows Components> Internet Explorer. ... Should you wish to search the registry for that key... ... Do you have more detailed instructions on locating the DWORD ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Storing persistent configuration on separate partition using RegLoadKey
    ... it would be beneficial to move to use an application profile that can be moved around much easier that registry ... is the only EWF protected partition and is about ... >> store persistent configuration information in a file on the D: ... >> the registry since one can only load hives directly under HKLM or HKU ...
    (microsoft.public.windowsxp.embedded)
  • One Of Our Client is Immediately Looking to Fill Position Of { Java Developer {Only Local to Texas}
    ... Its very urgent position immediate interview for the right candidate, ... Java Developer ... configuration and setting up windows servers. ... Java Web Services ...
    (soc.culture.indian)