Need Registry functions

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Fangbeast.

Anyone got registry handling libraries that work?? I'm Frustrated trying to get Mr Skunk's registry library working the same way twice in a row. COuld really use something that works.

Fangles
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

What exactly do you need to do??

I'm using API calls to read registry keys and it works fine for me. That's as far as I got cause that's all I needed :)

There is a code snippet of the Procedure to read registry keys on the PB Resources Site.
http://www.reelmediaproductions.com/pb


Edited by - paul on 22 January 2002 04:17:36
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Fangbeast.
What exactly do you need to do??

I'm using API calls to read registry keys and it works fine for me. That's as far as I got cause that's all I needed :)

There is a code snippet of the Procedure to read registry keys on the PB Resources Site.
http://www.reelmediaproductions.com/pb


Edited by - paul on 22 January 2002 04:17:36
I need to READ and WRITE registry items. The problem I am having with Mr Skunk's registry library is that it will not write the contents of variables, only literals and I know it used to work on a previous version of PB (arrrghghg).

This works:
WriteRegString("Program Title", "iFinder Pro")

This doesn't:
MyVar$ = "iFinder Pro"
WriteRegString("Program Title", MyVar$)

But I need the variable passing!!!


Fangles
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

Code: Select all

This works:
WriteRegString("Program Title", "iFinder Pro")

This doesn't:
MyVar$ = "iFinder Pro"
WriteRegString("Program Title", MyVar$)
Hmmm.... thats the same.
The pointer to the variable is pushed on
the stack.... so it should work.

Did you try:

Code: Select all

MyVar.s = "iFinder Pro"
WriteRegString("Program Title", MyVar.s)
??

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Fangbeast.

Code: Select all

This works:
WriteRegString("Program Title", "iFinder Pro")

This doesn't:
MyVar$ = "iFinder Pro"
WriteRegString("Program Title", MyVar$)
Hmmm.... thats the same.
The pointer to the variable is pushed on
the stack.... so it should work.

Did you try:

Code: Select all

MyVar.s = "iFinder Pro"
WriteRegString("Program Title", MyVar.s)
??

cya,
...Danilo

(registered PureBasic user)
Just tried it, no luck whatsoever. Frustrated as hell.

Fangles
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.
Anyone got registry handling libraries that work?? I'm Frustrated trying to get Mr Skunk's registry library working the same way twice in a row. COuld really use something that works.

Fangles
If the problem arises the second time you use the function, the error must be that the function doesn't update the PureBasic string pointer correctly. Sorry if this doesn't help you, I hope Mr. Skunk reads this.

Have a nice day,

El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

Visit the Resources Site, I posted a snippet to do it :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.
If the problem arises the second time you use the function, the error must be that the function doesn't update the PureBasic string pointer correctly.
Updating the PB string pointer is only needed
if you return a string.
I think ´WriteRegString("Program Title", MyVar$)´
doesnt return a string.

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

Anyway it should have a little mistake in the Mr Skunk code... Too bad, its lib is nice...

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

True, Danilo, but maybe other functions of the library called before that one have that mistake, and mess the following created strings (well, I don't know XD).

Bye,

El_Choni
Post Reply