'********************************************************************************************
'Documentation to the Standard DLL "dsdsktop.dll"                (c) 2002 by Delphin Software
'********************************************************************************************
'++++++++++++++++++++++  This DLL is Freeware and provided "As Is"  +++++++++++++++++++++++++
'********************************************************************************************
Purpose of the DLL:

Saving the positions of the desktop items either in the registry or in a (*.ini) file and  
restoring if desired.
'********************************************************************************************
Function declarations:

Declare Sub SetRegKey Lib "dsdsktop" (ByVal HKey$, ByVal SubKey$)
Declare Sub SetFileName Lib "dsdsktop" (ByVal Filename$, ByVal Section$)
Declare Sub SaveDesktop Lib "dsdsktop" ()
Declare Sub RestoreDesktop Lib "dsdsktop" ()
'--------------------------------------------------------------------------------------------
Parameters:

HKey$:
String for the main registry key. The following strings are valid:
"HCR" oder "hcr" for HKEY_CLASSES_ROOT,
"HLM" oder "hlm" for HKEY_LOCAL_MACHINE,
"HCU" oder "hcu" for HKEY_CURRENT_USER,
"HUS" oder "hus" for HKEY_USERS.
In case of an invalid string, an according messagebox appeares.

SubKey$:
String for the subkey, e.g. "software\XYZWare\Desktop".

FileName$:
Full path to an (Ini)file, where the values should be stored.
If the folder where the file should be written doesn't exist, it will be created. 
If you try to restore from an not existing file, an according messagebox appeares.
If you try to save to a not existing drive, an according messagebox appeares.

Section$:
Name of a section in an INI-file, where the values should be written. In this way, you may 
store more than one desktop in one file.

NOTE:
The sequence of the calls must always start with "Set...()", e.g.:

'Store desktop in a file, section "desktop1":
Call SetFileName("c:\desktop.ini", "desktop1")
Call SaveDesktop

'Restore desktop from registry:
Call SetRegKey("HLM", "software\XYZWare\Desktop\DT1")
Call RestoreDesktop
'********************************************************************************************
Delphin Software
Mail:  delphinsoft@gmx.de
Phone: 049 7251 18671
Fax:   049 7251 989773
'********************************************************************************************
