Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
writing to registrycauses runtime errors & excepitions
Downloads
Daily Snapshots
FAQ
Wiki
Bugtracker
IRC channel
Developer Blog
Follow us on Twitter
Mailing List
Free pascal
Other languages
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Lazarus, the complete guide
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
Author
Topic: writing to registrycauses runtime errors & excepitions (Read 1485 times)
sunpascal
Newbie
Posts: 2
writing to registrycauses runtime errors & excepitions
«
on:
September 13, 2005, 03:56:01 am »
hey,
I'm having trouble writing to the registry in lazarus on win xp. I
keep getting execeptions.
procedure TForm1.Button1Click(Sender: TObject);
var reg: TRegistry;
begin
reg := TRegistry.Create;
reg.RootKey := HKEY_CURRENT_USER;
reg.OpenKey('test', true);
ShowMessage(reg.ReadString('name')); // this gives me an registry ex
ception. Why?
reg.Free;
end;
can anyone help me?
what am I doing wrong?
sunpascal
Logged
Vincent Snijders
Administrator
Hero Member
Posts: 2626
RE: writing to registrycauses runtime errors & excepitio
«
Reply #1 on:
September 13, 2005, 09:27:26 am »
First: As far as I can see, you are not writing, but reading.
Second: If you try to read a non-existing valuename, then a exception occurs. This has been fixed in fpc in revision 1051, Sun Sep 4 17:44:33 2005 UTC.
Logged
sunpascal
Newbie
Posts: 2
RE: writing to registrycauses runtime errors & excepitio
«
Reply #2 on:
September 15, 2005, 05:16:27 am »
thanks for your reply.
sorry, I wasn't very specific. I get the errors when reading and writing.
I also made sure that the value existed before trying this.
However I will update.
-sunpascal
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
writing to registrycauses runtime errors & excepitions
Recent
Q about capabilities of t...
by
mdlueck
[
Today
at 06:30:59 pm]
Cross Compile
by
Leledumbo
[
Today
at 05:23:05 pm]
TaChart ternary plot func...
by
wp
[
Today
at 05:08:44 pm]
Stable database?
by
BigChimp
[
Today
at 03:27:28 pm]
Lazarus 0.9.30.4 released
by
felipemdc
[
Today
at 03:08:45 pm]
Colored cells of a string...
by
paskal
[
Today
at 02:34:31 pm]
writeln fails to output t...
by
jack616
[
Today
at 02:18:10 pm]
[SOLVED] How to install l...
by
HexNihilo
[
Today
at 01:24:54 pm]
libUSB under win32
by
helloa
[
Today
at 01:20:01 pm]
[SOLVED] How to make a pu...
by
paskal
[
Today
at 01:14:38 pm]