Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TRegistry in Windows XP (whistler)

Status
Not open for further replies.

801119

Programmer
Apr 10, 2000
311
SE
Greetings to all of you!!

I have recently installed Windows XP beta2 on my laptop...
There is one problem, I cant seem to accses the Registry!
When I am trying to write a string to it, an error message pops up, "Failed to set data for 'DICTIONARY'", and when i try to read a string nothing happens..

this is the code I am using...

const String KeyStr = "\\Xaner Software\\TypeIT";
TRegistry *reg = new TRegistry();
reg->RootKey = HKEY_LOCAL_MACHINE;
reg->OpenKey(KeyStr, true);
if(!reg->KeyExists("DICTIONARY"))
reg->WriteString("DICTIONARY", "maindic.dic" );
dic_path = reg->ReadString("DICTIONARY");
reg->CloseKey();
txtWord->Text = dic_path;


Can anyone see any errors here?? Or got a clue what to do?

Thanks,
Martin!

BTW, WinXP is based on Win2000 and WinNT (so I've been told) Martin G Broman
mgb_svea@thevortex.com

DWS - Alpha Whitin Dead Wolf Society
Xaner Software, DB programer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top