ImportRegistryData
From Solid Graphics Wiki
| ||||||||||||
The ImportRegistryData function creates registry keys and values from given string. The string parameter has the same format as the file created by the regedit.exe standard Windows tool when using it to export registry data.
bool ImportRegistryData( const char* str );
Parameters
| str | The string specifying the keys and values. The string has the same format as the file created by the regedit.exe Windows tool when using it to export registry data - with one exception - the regedit.exe export produces unicode text file - to use it with the ImportRegistryData function the exported text must be converted to ASCII. |
Return value
The function returns true if the registry keys and values were sucessfully imported, in case of an error it returns false.
Limitations
The ImportRegistryData function does not support all registry value data types (such as binary) which the regedit.exe export provides. Only the string (REG_SZ) and dword (REG_DWORD) registry value types are allowed in the ImportRegistryData input string.
Example of an input string
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevStudio\6.0\Help\Extension] "Enable"=dword:00000001 "Filename"="C:\\Program Files\\Microsoft Visual Studio\\Common\\MSDev98\\Help\\exthelp.hlp" "State"=dword:00000000
See Also
- GetRegistrySubKeyNames
- GetRegistryValueNames
- GetRegistryValue
- SetRegistryValue
- RegistryKeyExist
- RegistryValueExist
- DeleteRegistryValue
- DeleteRegistryKey
