Add REG_MULTI_SZ to Registry

This forum is for general support of Xbase++
Post Reply
Message
Author
bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Add REG_MULTI_SZ to Registry

#1 Post by bwolfsohn »

Tried to lookup on the old barod if this had ever been asked, but the old board didn't respond..

I'd like to add a REG_MULTI_SZ entry to a registry, but dc_regwrite() doesn't seem to handle that type of entry..

btw, this is to add a dependency on ads database server for a service, so when the machine reboots, everything comes up correctly.

I currently do this manually

Brian
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Add REG_MULTI_SZ to Registry

#2 Post by rdonnay »

I rebooted the old server, so you can try again with your search.
I discovered that it will be a monumental project to try to move that data into the new forum. Sorry.

I will see what I can do with DC_RegWrite() to handle this.
I thought that this issue came up once in the past and was resolved.
The eXpress train is coming - and it has more cars.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Add REG_MULTI_SZ to Registry

#3 Post by Cliff Wiernik »

Would it be possible or easier to just export to a type of database and then be able to search it. You could download the data to search as needed.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Add REG_MULTI_SZ to Registry

#4 Post by rdonnay »

Brian -

I modified DC_RegWrite() to support REG_MULTI_SZ, however now you must pass a 5th parameter as the
type. If this parameter is not passed, then the previously supported types will still work as before to prevent any regression. What I read about REG_MULTI_SZ is that all values are separated by a null plus a terminator null.

Download the updated _DCREG.PRG from here:

http://bb.donnay-software.com:8080/support/_dcreg.prg

Copy it to \exp19\source\dclipx directory.

Run build19.bat or build19_sl1.bat to rebuild dclipx.dll

My test program:

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL cString, nStatus

cString := '111' + Chr(0) + '222' + Chr(0) + '333' + Chr(0) 

nStatus := DC_RegWrite(HKEY_CURRENT_USER,'Software\Cus\Test','Brian',cString, REG_MULTI_SZ )

WTF nStatus

cString := DC_RegQuery(HKEY_CURRENT_USER,'Software\Cus\Test','Brian')

WTF cString

RETURN nil

PROC appsys ; return
The eXpress train is coming - and it has more cars.

Post Reply