/////////////////////////////////////////////////////////////////////
//
// UserHive - load a user hive under the HKEY_USERS key
//
// by Radboud Platvoet <RPlatvoet@SAFARIINFOTOOLS.COM>
//
/////////////////////////////////////////////////////////////////////

This is a C++ dll to load a user hive under the HKEY_USERS key on 
Windows NT. (The DLL does NOT require MFC)

It has three entry points:
- LoadHiveForUser 
- LoadHiveForSid
- UnLoadHiveForSid

LoadHiveForUser takes three parameters:
- The user name for which the registry hive is going to be loaded. 
- A string parameter which will receive the user's SID. 
- A LONG which should specify the number of characters that can be
  stored in the second string parameter.

LoadHiveForSid takes one string parameter: 
- The SID for the user of which the hive is going to be loaded.

UnLoadHiveForSid takes one string parameter:
- The SID for the user of which the hive is going to be unloaded.

All three functions return 1 if successful or 0 if not.

If you have used LoadHiveForUser to load a user registry hive, then you
need to use UnLoadHiveForSid with the value returned in the second
parameter by LoadHiveForUser to unload the hive.

Included is an InstallShield .rul script file, which can be used as an 
example how to use the functions. The function LoadAllUserHives( TRUE ) 
demonstrates how you can load all user hives into the registry. The
same function called with FALSE as parameter, will unload any registry
hives that where loaded. It will leave all user hives, which where
loaded before LoadAllUserHives( TRUE ) was called the first time, loaded
in the registry.

There is also a simple test program, which can be used to test the DLL
functions if anyone would decide to further tweak it.

The Visual C++ source code and project files for the DLL and the test 
program can be found in the UserHive folder.

