C programming question dealing with registry

sandmanwake

Golden Member
Feb 29, 2000
1,494
0
0
What's the easiest way to write to the registry in C? Also, how would I write to a .pif file using C?
 

gittyup

Diamond Member
Nov 7, 2000
5,036
0
0
I have not done any Windows C programming. I usually work in the unix environment. I did come across this. It may or may not be helpful.

11.9. How do I get my MFC app to use the Registry on Win32 platforms?
Just make a call to SetRegistryKey("MyCompany") in your CWinApp class and pass it a string (typically your company name). This string will define where in the registry the data goes: HKEY_CURRENT_USER\Software\MyCompany\\\

After making this call just use the normal WriteProfilexxx() routines and the data will go to the registry instead of to an INI file. It works well and is simple!

Brett Robichaud, brett_robichaud@tallysys.com, 6/23/95, programmer.win32

 

Adrian Tung

Golden Member
Oct 10, 1999
1,370
1
0
You'll need to code in Win32 (e.g. use Visual C++) in order to use those functions. You can read more on writing to the registry by searching through Microsoft's MSDN library.

As for PIF files, you'll need to get the binary file format of the PIF file itself and pick up from there, unless MS has some function or object that creates PIF files for you.


:)atwl