ROBSON_SP
06-26-2002, 02:36 AM
Hi
What is meant by a 'self-registering' file e.g. MSchart.ocx (apparently)?
:)
What is meant by a 'self-registering' file e.g. MSchart.ocx (apparently)?
:)
A Self-Registering FileROBSON_SP 06-26-2002, 02:36 AM Hi What is meant by a 'self-registering' file e.g. MSchart.ocx (apparently)? :) Banjo 06-26-2002, 06:04 AM A self registering file is a COM DLL or control that exposes the DLLRegister and DLLUnRegister entry points. These two functions allow the component to add the registry keys that are necessary for a client application to find the file and load it into memory. This is what happens when you use regsvr32. While self-registration sounds like a good thing (keeping all the components code and data internal), it can cause problems. The self registration functions do not know the difference between and user install and a system install. Hence they generally go with using HKLM. However, because they could write anywhere the installer can't verify that all the required information is installed properly. When removing a component there is no way to check determine whether it is safe to call DLLUnRegisterServer and so the installer just has to prompt the user to allow/deny a file to be removed. This is highly flawed as the user does not necessarily know. There are others, but they apply specifically to the more advanced features of the Windows Installer service, such as advertisment. So the moral of the story is that (if your installer allows it) you should avoid self-registration in favour of a database solution. Thinker 06-26-2002, 07:48 AM So the moral of the story is that (if your installer allows it) you should avoid self-registration in favour of a database solution. What does that mean? If it is a COM component, it must be registered to be used. What does a database have to do with that? The only alternative to calling DLLRegister would be to write the registry entries from code outside the DLL. This requires exact knowledge of component including all GUIDs, and where in the registry to put them. ROBSON_SP 06-26-2002, 08:08 AM I was kind of wondering about that myself but since I'm pretty dense when it comes to these things I didn't want to show my ignorance. Why do I find these things so difficult...? Banjo 06-26-2002, 08:17 AM I was refering to the way the Windows Installer service does things. An MSI install package is basically a small DB. When you build an MSI the install builder sets up registry monitoring, calls the self registration functions and records the changes. It then writes these details in to a table. The installer is then has complete control over what is installed and removed from a target system. Sorry for not being clearer about that bit. Thinker 06-26-2002, 08:33 AM Thanks, that makes much more sense. I didn't realize it had that kind of awareness, but considering it is supposed to help avoid DLLHell, I guess it would have to. |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum