Creating an instance of the COM component with CLSID {78834280-1023-11D2-BABE-00C04F93F613} from the IClassFactory failed due to the following error: 80070000 RRS feed

  • Question

  • Hi,

    I'm getting the erorr above when trying to create a class that I have referenced to an an external dll targeted for use in VB6, my application is a console application wrtten in C#, eventually this will be transfered to a web app.

    I've created a test application in VB6 that functions correctly. When I try and reference my own VB6 test application dll and run the function from there I get "There was a fatal error constructing this object."

    My guess is this is a permissions issue but I am unable to nail it down. I've seen some reference to similar issues discussing setting permissions in DCOM but I cannot find a reference to my class in DCOMCNFG.

    Any suggestions greatfully accepted!


    Wednesday, April 20, 2011 10:24 AM

All replies

  • Hi Mark,

    May I know the related C# code? How do you reference to the VB6 dll? By adding COM reference?

    Eric Yang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 21, 2011 3:07 AM
  • Hi Eric,
    I have tried adding the references as a COM reference and by browsing to the file, both options return the same result.
    When I reference the EntrustCore dll directly in C# I get "Creating an instance of the COM component with CLSID {78834280-1023-11D2-BABE-00C04F93F613} from the IClassFactory failed due to the following error: 80070000", here's the code
    static void Main(string[] args)
      //This line works and I can use the Profile object 
      EntrustCore.Profile userProfile = new EntrustCore.Profile();
      //This line causes the error
      EntrustCore.File sourceFile = new EntrustCore.File();
    When I reference a VB6 dll I have created that in turn runs effectively the same code as above I get "There was a fatal error constructing this object."
    static void Main(string[] args)
        TPSEntrustInterface.Encryption x = new TPSEntrustInterface.Encryption();
        //This line works ok.
        //This line causes the error
        x.EncryptFile(@"c:\tmp\test.xml", "password");
    Please note that when I call my own vb6 dll from a VB6 exe the application works correctly.
    Here's the VB code
    Public Function EncryptFile(filePath As String, password As String)
      Call Login(password)
      Dim sourceFile As New File
      Dim p7Encryptor As PKCS7FileEncrypt
      Dim progStatus As Status
      Dim p7File As PKCS7File
      Dim p7Results As EntrustPKCS7.PKCS7Results
      'On Error GoTo handler:
      'This line causes the error when called from c#
      'When called from VB exe works fine
      sourceFile.FileName = filePath
      Set p7Encryptor = sourceFile
      p7Encryptor.OutputFile = sourceFile.FileName + ".p7m"
      p7Encryptor.EncryptionAlgorithm = etTripleDES
      Set progStatus = p7Encryptor.SignAndEncrypt
      Set p7File = progStatus.Envelope
      Set p7Results = progStatus.MessageResults
      'Open "c:\tmp\vb6Error.txt" For Output As #1
      'Write #1, Err.Description
      'Write #1, Err.LastDllError
      'Write #1, Err.Number
      'Write #1, filePath
      'Close #1
    End Function

    Thursday, April 21, 2011 5:36 AM
  • There is no evidence it is a permission issue. 80070000 is actually ERROR_SUCCESS. I am afraid this issue will take quite a bit of time to work on, and as such your question falls into the paid support category which requires a more in-depth level of support.  Please visit this link to see the various paid support options that are available to better meet your needs:  http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone.
    --Trevor H.
    Send files to Hotmail.com: "MS_TREVORH"
    Tuesday, May 3, 2011 7:59 PM
  • Mark did you ever get a resolution on this? I have encountered the exact same issue as you described in C#.
    Wednesday, October 5, 2011 3:40 PM
  • Hi Malcom,

    Unfortunately not. I used up one of my MSDN support tickets to get some help but it came down to needing debug symbols from the dll which I didn't have so we hit a dead end.

    In my case I was trying to interop with the Entrust toolkit and ended up getting someone to write a C# wrapper for the C++ version instead of trying to use the VB version.

    Wednesday, October 5, 2011 3:51 PM