Functionality of CLSID registry key.

Posted on 2007-11-19
Last Modified: 2013-12-04
What internal Windows effect does changing the value, "…path to dll …",  of the following key:

@="…path to dll …"

For example, if one changes this value from

then program containing object coded in *.vbp project file:
Object={EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0; shdocvw.dll

begins to behave differently: it begins to crash with error -1 for example.
In particular, it is unclear why  shdocvw has GUID 8856F961-340A-11D0- in registry and

Thank you.

Question by:beaverton8770
  • 6
  • 2
LVL 86

Accepted Solution

jkr earned 300 total points
ID: 20320256
One DLL can serve more than one CLSID. That in fact is the common case. When a COM object is requested, the system loads the DLL registered in the registry and calls the DLLs 'DllGetClassObject()' ( function passing the CLSID in question (plus the IID). Then that function constructs the requested object in question depending on the CLSID and the IID and returns it.

Author Comment

ID: 20320542
I must correct question's text. When pasted from text editor, some characters got corrupted and appeared as: …path to dll …
Instead they should mean "... path to dll ... ".


Author Comment

ID: 20320674
Thank you jkr

If "One DLL can serve more than one CLSID", then DllGetClassObject must call
which is referenced in VB application and must not call
Hence, change in
8856F961-340A-11D0-A96B-00C04FD705A2 reference to dll should not matter, because this CLASS ID is never called. But it matters. Why?

Thank you.
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.


Author Comment

ID: 20320802
Correction to question (adding clause "in application"):


In particular, it is unclear why  shdocvw has GUID 8856F961-340A-11D0- in registry and

Must be:

In particular, it is unclear why  shdocvw has GUID 8856F961-340A-11D0- in registry and
EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B in application.

LVL 28

Assisted Solution

pepr earned 200 total points
ID: 20320805
CLSID is generated to be unique worldwide. Think about its value as about very unique for a single purpose. If it was created as identification of some COM class then the InProcServer32 says where the dll that implements that COM is located. The registry entry is created by that dll via registering. Unless you have another copy of the same dll in another path, it is very likely that the system will try to create an instance of that COM class using the dll that does not implement it.

In other words, by changing the path to the dll to something else you want system to "grow onions on the apple tree".

Technically, the name of the component (or some of its interface) can be converted to CLSID. The CLSID is used for searching technical information related to the component. The InProcServer32 says what DLL implements the functionality. The system then loads the DLL and tries to create the instance of the wanted something. All of that can be hidden in one high-level command.

Author Comment

ID: 20321245
Thank you pepr.
Apparently you explanation is irrelevant to the question.
From my understanding, the scenario roughly is:

Application -> CLSID EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B -> OS ->
CLSID EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B in registry -> OS -> dll

You explain arrows 4 and 5. But, the question is about arrow 3:

why:  OS -> CLSID 8856F961-340A-11D0-A96B-00C04FD705A2
In other words, what derails OS from the correct CLSID?


Author Closing Comment

ID: 31410051
Question is not-answered
LVL 28

Expert Comment

ID: 20425865
Well beaverton8770. Thanks for the points. But if it does not anwer your question then you should not accept it. If you try regedit and search for the "shdocvw" you will find many entries that point to that DLL. It means that the related functionality is implemented by that DLL. You cannot change the value of the InProcServer32 to say "C:\\WINDOWS\\system32\\ieframe.dll" because it does not implement the functionality. Or I do not understand your question.

P.S. When searching for the shdocvw, the word Dotfuscator blicked to my eye. I am not sure but it can possibly change also the CLSIDs so that every compilation uses different ones (to discourage the reverse engineering).

Author Comment

ID: 20428129
In palin words the question is:
Application calls EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B
But this call is diverted to 8856F961-340A-11D0-A96B-00C04FD705A2

All what you say and jkr said is about processes which happen after CLSID
8856F961-340A-11D0-A96B-00C04FD705A2 is called. In other words, you explain things which happen after problem already happened in the past.

In other words, I already clarified this:
"You explain arrows 4 and 5. But, the question is about arrow 3:", but apparently you still speaking about 4 and 5 and ignore 3.

This is not a question, but relates to the question:
"You cannot change the value of the InProcServer32 to say "C:\\WINDOWS\\system32\\ieframe.dll" because it does not implement the functionality". I don't change it intentionally. I think IE7 installation process makes this change. But as I said above this change must be irrelevant, but it is not. Because when I change it back to shdocvw.dll, application stops crashing. So, the question again is why this change is not irrelevant.

Why I accept the question? I remember heated discussions whey I did not accept the qestion and disputes were always forcibly accepted by moderators against my will. This is a culture of EE. Now on I am trying just to avoid discussions with moderators, but state my own opinion in comment.

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question