Q: how to read/write a binary entry in the registry?

Q: how to read/write a binary entry in the registry?

Post by Karsten Spriestersbac » Fri, 02 Apr 1999 04:00:00



Hi,

I'm able to read / write intergers and strings to the registry using
GetProfileInt, SetProfileInt, GetProfileString, SetProfileString.
But how do I read / write a binary set of bytes?
Karsten

 
 
 

Q: how to read/write a binary entry in the registry?

Post by Chris Marriot » Fri, 02 Apr 1999 04:00:00



Quote:>Hi,

>I'm able to read / write intergers and strings to the registry using
>GetProfileInt, SetProfileInt, GetProfileString, SetProfileString.
>But how do I read / write a binary set of bytes?

Use the registry APIs directly - "RegSetValueEx", etc.

Chris
-----------------------------------------------------------------------

Visit our web site at http://www.skymap.com
Astronomy software written by astronomers, for astronomers

 
 
 

Q: how to read/write a binary entry in the registry?

Post by Uwe Kotyczk » Wed, 07 Apr 1999 04:00:00


You might want to have a look at the (undocumented)
CWinApp::WriteProfileBinary / CWinApp::GetProfileBinary .

Karsten Spriestersbach schrieb:

Quote:> Hi,

> I'm able to read / write intergers and strings to the registry using
> GetProfileInt, SetProfileInt, GetProfileString, SetProfileString.
> But how do I read / write a binary set of bytes?
> Karsten

 
 
 

1. How to read/write registry entry more than one level deep

I use the registry for persistant data storage.  Under my app's
InitInstance, for example, I use

     SetRegistryKey("My App");
     LoadStdProfileSettings();
     m_bFlag1 = (BOOL) pApp->GetProfileInt("Level1", "Flag1", 0);

to read Flag1 (as 0 or 1) from HKEY_CURRENT_USER\Software\My
App\Level1\Flag1.

This works great.  However, how do I read or write to a key one or
more additional levels deep?  Ex:  HKEY_CURRENT_USER\Software\My
App\Level1\Level2\Flag2.

Specifically, how does parameter 1 from GetProfileInt know where to
find the secion  (from the documentation: lpszSection--Points to a
null-terminated string that specifies the section containing the
entry).

Any help appreciated, esp. pointers to Microsoft Knowledge Base
articles.

Jeff Arnholt
Mayo Clinic

2. error on start-up (mswinsk.ocx)

3. Reading and writing binary files with VB6???

4. Help - error message when starting windows95

5. How can I read/write binary data from/to the file?

6. Cursor jumps all over the place

7. Problem: Reading and writing binary files with VB6!

8. Servic Pack 3

9. Read Binary Strings from Registry using RAPI and VB5?

10. Reading binary values from registry

11. Harddisks: Seek, Read, Write, Read, Write, Slow ?

12. Cant read registry entry in MFC using studio.net

13. Registry entry for CDROM read ahead speed?