-
Aug 2nd, 2024, 03:28 PM
#1
Thread Starter
Frenzied Member
Does unregistering a TypeLib also unregister its Classes and Interfaces?
If I use the API function UnRegisterTypeLib to unregister a TypeLib, that removes all its TypeLib entries in the registry. But what about the Interfaces and Classes that had also been put into the registry when the TypeLib was registered. Does UnRegisterTypeLib clean up all the other entries that were put into the registry that had been defined within that TypeLib (all the entries for the associated Interfaces and Classes)?
-
Aug 3rd, 2024, 03:43 AM
#2
Re: Does unregistering a TypeLib also unregister its Classes and Interfaces?
You can test it with regmon.
I bet it does not remove anything because registering a typelib does not add interface/coclass registry entries in first place. These are managed by COM server [un]registration i.e. using regsvr32
-
Jan 19th, 2025, 10:56 PM
#3
Thread Starter
Frenzied Member
Re: Does unregistering a TypeLib also unregister its Classes and Interfaces?
 Originally Posted by wqweto
You can test it with regmon.
I bet it does not remove anything because registering a typelib does not add interface/coclass registry entries in first place. These are managed by COM server [un]registration i.e. using regsvr32
Interesting. I thought that regsvr32 called DllRegisterServer and DllUnregisterServer in the DLL, and then the DLL simply called RegisterTypeLib or UnregisterTypeLib (and that then those API functions checked the TypeLib for the presence of Interface and CoClass entries and registered them automatically). Is the process of registering Interfaces and CoClasses actually separate from registering a TypeLib?
-
Jan 20th, 2025, 04:48 AM
#4
Re: Does unregistering a TypeLib also unregister its Classes and Interfaces?
> Is the process of registering Interfaces and CoClasses actually separate from registering a TypeLib?
When you call CreateObject in VB6 it maps ProgID to CLSID and then from CLSID registration loads a DLL where the in-proc server is implemented.
When you register a TLB which has some coclasses defined how is the CLSID registry supposed to get a DLL where the in-proc server is implemented when there is no DLL (only a TLB) as a parameter?
cheers,
</wqw>
-
Jan 24th, 2025, 11:16 PM
#5
Thread Starter
Frenzied Member
Re: Does unregistering a TypeLib also unregister its Classes and Interfaces?
 Originally Posted by wqweto
> Is the process of registering Interfaces and CoClasses actually separate from registering a TypeLib?
When you call CreateObject in VB6 it maps ProgID to CLSID and then from CLSID registration loads a DLL where the in-proc server is implemented.
How about when you use the New keyword like like "set MyObj = New SomeActiveXDLLClass" (after selecting the correct DLL in the References dialog in the Project menu) instead of using CreateObject?
-
Jan 25th, 2025, 06:50 AM
#6
Re: Does unregistering a TypeLib also unregister its Classes and Interfaces?
 Originally Posted by Ben321
How about when you use the New keyword like like "set MyObj = New SomeActiveXDLLClass" (after selecting the correct DLL in the References dialog in the Project menu) instead of using CreateObject?
It's mostly the same CoCreateInstance API behind CreateObject call and New operator (unless calling New on private classes which are not registered in registry) so the same logic applies -- you cannot register coclass's DLL with regtlib.exe as there is no DLL on the command line as parameter.
cheers,
</wqw>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|