🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15734

RegQueryValueEx problem

#15734
From: robertbienert gmx.net robertbien...
Date: Tue, 17 Jun 2003 17:46
22 lines
1663 bytes
Hi,
has anyone a RegQuery-example? I've got problems executing the following 
code: The result shows me, that the program cannot find the specified 
registry key, but it is there, as regedit shows to me. I'm thankful for 
any help!

const char *ShellFoldersKey = "Software\\Microsoft\\Windows\\"
		"CurrentVersion\\Explorer\\Shell Folders";
const char *regkey = "Personal";

if (RegOpenKeyEx(HKEY_CURRENT_USER, ShellFoldersKey, 0,
		KEY_READ, &regh) == ERROR_SUCCESS)
{
	if(RegQueryValueEx(regh, regkey, NULL, NULL, buffer,
			buffsize + 1) == ERROR_SUCCESS) {
		RegCloseKey(regh);
		retval = 1;
	}
}
-- 
Robert Bienert <robertbienert@gmx.net>
Check also my free software at http://www.rbprogs.de.vu/
Technical Details
Message-ID: <3eef5413@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,5800567a1464c960,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-17 10:51:22 PST
Date: Tue, 17 Jun 2003 19:46:24 +0200
From: "robertbienert<AT>gmx.net" <"robertbienert<AT>gmx.net">
User-Agent: Mozilla/5.0 (Windows; U; Win98; de-AT; rv:1.2) Gecko/20021126
X-Accept-Language: de, en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: RegQueryValueEx problem
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 195.127.134.208
Message-ID: <3eef5413@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1055872019 195.127.134.208 (17 Jun 2003 10:46:59 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail