none
classfactory cannot supply requested class

    Question

  • Operating System Version: Windows XP Home
    Problem Application Name & Version: Visual Basic .Net 2003
    Error Messages: "ClassFactory cannot supply requested class"

    i have installed everything with no error and when i went to start a new project, i get the above error...i uninstalled and reinstalled multiple times and even used different setup discs and still get the same error...please help!
    Friday, September 30, 2005 5:18 AM

Answers

All replies

  • It is possible that you have an old version of Windows Script. Can you try downloading the latest version of Windows Script at http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp?

    Regards,

    Friday, September 30, 2005 7:13 PM
    Moderator
  • I received the same error message when I tried to uninstall my old printer drivers "ClassFactory cannot supply requested class".

    I downloaded and installed the latest Windows Script for XP but the error message persists, It makes no difference if I use the printer's uninstall drivers program or try removing them using the listing in  Add & Remove Programs. I also tried uninstalling the drivers in Safe Mode as well but got same results. Any other suggestions?

    What exactly does this reference to "ClassFactory mean?

     

    Tuesday, June 06, 2006 7:09 AM
  • You've tried the recommended things to solve this problem.  Sounds like you are a victim of DLL hell.  A ClassFactory is something that lives inside an ActiveX module.  A program that uses that module asks the ClassFactory to create an object it wants to use.  That might fail if the program expects a version 2 of the ActiveX module but the installed module is version 1.

    Seeing the same error when messing with printers might make sense if it is a HP printer.  I think their recent drivers and utilities are written with .NET

    An (awkward) way to troubleshoot this problem is to use the Regmon utility from SysInternals.  Start capturing, then start the program that generates this error.  As soon as the error appears, switch back to Regmon and turn capturing off.  Now work from the (large) trace list backwards, looking for references to HKCR\CLSID.  With some luck and elbow grease, you'll find the Inprocserver32 value of the ActiveX DLL that is causing the problem.

    Good luck!

    Tuesday, June 06, 2006 11:57 AM
    Moderator
  • Thank you for some enlightement. BTW, the printer driver is for a Canon MP730, not an HP product.

    What is a version 2 of the Active X module. Is that something I can download and install?

    Can you give me a possible example of the trace list line that would illustrate what you mean by the "Inprocserver32 value of the Active X DLL that would be causing my problem and what to do at that point to correct it?

    I tried to overwrite the driver with the latest version from Canon but It also produces the same error message. Frustrating, to say the least!

    Thank you again for assisting me,

    coinman1

     

    Tuesday, June 06, 2006 8:05 PM
  • I have the same problem with Visual Basic .NET 2003. A year ago it worked perfectly, but since then I haven't used it for a year and now it doesn't work properly anymore. So from what I've understood the problem is caused by installing a newer version of some ActiveX thing.

    Can't I then just solve the problem by installing the older version again?
    Saturday, August 26, 2006 8:57 PM
  • Thanks for the tip. I was having the exact same problem. For anyone else who uses this method you can search for the culprit by searching for "hkcr\clsid" or ".dll" or in my case the easy way would have been to search for "media" which pulled up the string "%SystemRoot%\media\Windows XP Critical Stop.wav" which is the sound that my computer made when the error occured. That sound was directly after the error and I was able to find the bad .dll which was ctor.dll in my case. I searched for the file in Windows Explorer and replaced it with the right one and everything went to working again! Thanks again!
    Thursday, October 12, 2006 12:44 AM
  • A certain code in vba run in access2003 gives this errormessage in one computer, but not in the other. The code is:

    Set fs = CreateObject("Scripting.FileSystemObject")

    Where to seek the cause?

    Friday, February 09, 2007 2:00 AM
  •  

    I got similar error message when calling vb6 dll from vb6 application. Cause seamed to be registry. I cleared all references to problem dll from registry and then registered it once. Problem solved.

     

    DLL had compability setting off, so it got new id on every compile. Then the component was just copied over old one registered again. Maybe that caused some cunfusion when trying to call it using late bind?

    Friday, February 15, 2008 9:10 AM
  •  nobugz wrote:
    You've tried the recommended things to solve this problem.  Sounds like you are a victim of DLL hell.  A ClassFactory is something that lives inside an ActiveX module.  A program that uses that module asks the ClassFactory to create an object it wants to use.  That might fail if the program expects a version 2 of the ActiveX module but the installed module is version 1.

    Seeing the same error when messing with printers might make sense if it is a HP printer.  I think their recent drivers and utilities are written with .NET

    An (awkward) way to troubleshoot this problem is to use the Regmon utility from SysInternals.  Start capturing, then start the program that generates this error.  As soon as the error appears, switch back to Regmon and turn capturing off.  Now work from the (large) trace list backwards, looking for references to HKCR\CLSID.  With some luck and elbow grease, you'll find the Inprocserver32 value of the ActiveX DLL that is causing the problem.

    Good luck!

     

    I have solved similar error. Actually my error nothing got HP Printer but a software that used InstallShield application. Same error "classfactory cannot supply requested class" I followed nobugz steps of using Regmon Utility and looked for references HKCR\CLSID. I found this reference in the registry C:\Program Files\Common Files\InstallShield\engine\6\Intel 32\ctor.dll. Went to the particular folder where the ctor.dll resides. Then Google for ctor.dll file to download. Then I stumbled on two sites

    1) http://www.dlldump.com/download-dll-files.php/dllfiles/C/ctor.dll/download.html

    2) http://www.dll-files.com/dllindex/dll-files.shtml?ctor

     

    The second link gave me an old ctor.dll file. So I used the first link and downloaded the ctor.dll. I copied and pasted where the original ctor.dll was and then I tried to generate the error again its no more. A couple of months of frustration gone.

     

    Good Luck!

    Monday, May 05, 2008 3:17 AM
  • You pwned that one!
    Monday, May 05, 2008 10:39 AM
    Moderator