What is the best way to have application settings (user editable, so they can't be compiled with the exe) on the device? Ideally I would like a simple .ini file, but I can't see functions like GetPrivateProfileString as in the Windows API.
I suppose I could just read the .ini file with FileOpen and FileRead etc. but that gets a bit messy.
> discovered the registery for saving usersettings
Yes, I noticed that option, but I was thinking then you still need some kind of file to supply with your application to have the settings and then you might as well forget about the registry.
RBS
ps: interesting to hear some Dutch here, been living in UK since 1987.
Yes, I noticed that option, but I was thinking then you still need some kind of file to supply with your application to have the settings and then you might as well forget about the registry.
RBS
ps: interesting to hear some Dutch here, been living in UK since 1987.
Thought about that too, I have the reg. check if the entry is there,
if it isn't it must be the first time the Application is running so I populate the values with default information.
Another option is to populate the registry when you install your application,
using Erel's Setupbuilder you will be able to modify the registry (you will have to tweak it a bit though)
Generally speaking I don't recommend storing settings in the registry.
Different devices enforce different security policies and your program may fail when it tries to write in the registry.
Looks I can't use Maxim's .ini dll as I get the following error on the device:
An error occured on Sub ....
File or assembly name Microsoft.VisualBasic version 7.0.5000.0
culture = neutral
Publickey Token = B03F5F7F 11D50A3A or one of it's depencies was not found.
I have copied the file: db2000 INI file manager (device).dll (version 1.0.1.0)
to the device and I can run it all fine on the desktop.
Any suggestion what I might be doing wrong here?
This is on the latest Windows Mobile on a Samsung Omnia.
No, I thought it needed the full path.
I have in fact solved this by using instead the larger file: db2000 functions library.dll. This is with the same B4PPC code, so with the full .ini path in the New1. As the larger dll has some useful date functions I think I will stick with that one.
Did anybody solve the problem in those last two posts? Does that now work on devices?
Ignore that, didn't see page 2, got distracted by a horse race.
BTW, when you have your ini files, if they get big, then the freebie I found at http://vdobiasch.bplaced.net/VD/softe.html works perfectly well for managing ini files outside of your app, it works in English or German.