① The file is completely defined according to the Registry structure, as shown below:
Hkcr
{
Testatlactivex. testactivexcontrol.1 = s 'testactivexcontrol class'
{
CLSID = S' {56804753-3efb-47b9-bdf4-0c3f5d7a99c5 }'
}
Testatlactivex. testactivexcontrol = s 'testactivexcontrol class'
{
CLSID = S' {56804753-3efb-47b9-bdf4-0c3f5d7a99c5 }'
Curver = s 'testatlactivex. testactivexcontrol.1'
}
Noremove CLSID
{
Forceremove {56804753-3efb-47b9-bdf4-0c3f5d7a99c5} = s 'testactivexcontrol class'
{
Progid = s 'testatlactivex. testactivexcontrol.1'
Versionindependentprogid = s 'testatlactivex. testactivexcontrol'
Forceremove 'programmable'
Inprocserver32 = S' % module %'
{
Val threadingmodel = s 'apartment'
}
Val appid = S' % appid %'
Forceremove 'control'
Forceremove 'toolboxbitmap32' = S' % module %, 100'
'Miscstatus' = S' 0'
{
'1' = S' % olemisc %'
}
'Typelib '= S' {79a84f00-93f5-4ab9-a2d5-7f75ae0ec758 }'
'Version' = S' 1. 0'
}
}
}
② Hkcr indicates hkey_class_root
③ For each node, if there is no Val prefix, it indicates a registry node. If it is defined as Val, it is a registry value entry.
④ The noremove and forceremove options are used for uninstallation, indicating that they are not deleted or forcibly deleted.
⑤ RGS is included in the resource file in ATL, and then the installed and uninstalled functions are declared using macros such as declare_registry_resourceid and declare_registry_appid_resourceid,
These functions use the resouceid to read the RGS file and install and uninstall it.
⑥ The fileregister and fileunregister methods of the cregobject class can directly register and uninstall the RGS file.