Group: Registry - Library: advapi32
How to save registry key including its subkeys and values to a file
LONG RegSaveKey(
HKEY hKey, // handle to key
LPCTSTR lpFile, // data file
LPSECURITY_ATTRIBUTES lpSecurityAttributes // SD
);
DECLARE INTEGER RegSaveKey IN advapi32;
INTEGER hKey,;
STRING lpFile,;
INTEGER lpSecurityAttributes
hKey [in] Specifies a handle to the key where the save operation is to begin, or a predefined reserved handle value.
lpFile [in] Pointer to a null-terminated string containing the name of the file in which the specified key and subkeys are saved.
lpSecurityAttributes Windows NT/2000 or later: [in] Pointer to a structure that specifies a security descriptor for the new file.
If the function succeeds, the return value is 0 (ERROR_SUCCESS).