January 27, 2021
Hot Topics:

Accessing the Windows Registry with the API

  • By John Percival
  • Send Email »
  • More Articles »

Last week, we looked at the basic Registry functions provided by VB. I also suggested a simple model by which we could think of the Registry.  I strongly recommend you read the first part of this series before this article, as many of the principles involved in this article are fairly complex.

The Registry originally appeared in Windows 3.x, as a store of OLE types. However, all application and Windows' settings were kept in private initialisation files, spread all over the hard disk. When Windows 95 was introduced, the people at Microsoft had had a good think about this, and decided to put all these settings in one central file, so if the computer crashed, you would lose all of your settings, not just one application's worth.   Well, this wasn't quite what they thought!  They really wanted to have all applications using the Registry to store settings instead of INI files, for reasons of support and adapting to multi-user environments.

Because of this, we recommend that you back up the Registry BEFORE you start playing, rather than after. The files that you need are system.dat and user.dat which are both in the Windows directory. That way, if everything goes wrong, you can replace the damaged ones.

This idea of one central database to store settings has been implemented in all the newest versions of Windows (i.e. Windows 98, Windows NT4, and Windows NT5/2000), and is definitely here to stay.

Page 1 of 6

This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date