ReadSoft Invoices could not create instance of class name

111 Views Asked by At

I am currently trying to develop a custom ReadSoft Invoices plugin, nothing special.

I have gotten the plugin to work on two different machines, but the third machine I have, simply refuses to load the plugin.

The "funny" part about this, is that the third machine is a complete replica of the other two (they are all virtual machines).

The error shown when launching manager is: Plug-ins could not be loaded. (TESTPLUGIN(ClassName=TestPlugin.Test.Connect)).

I have run Regasm.exe on the dll so all the types are registered. I have updated eilocal.ini with this:

;***********************

;* Manager *

;***********************

[Plugins::eimngr]

Plugin1=Common

Plugin2=DBMaintenance

Plugin3=ERPImport

Plugin4=InvoiceSelection

Plugin5=AutoValue

Plugin6=COLLECTOR

Plugin7=ReadSoft.InvoiceRules

Plugin8=TestPlugin

[eimngr::TestPlugin]

Name=TestPlugin

Type=COM

SupportIDispatch=TRUE

Classname=TestPlugin.Test.Connect

I have stripped all code from the plugin, just to make sure. This is the code I am trying to run:

namespace TestPlugin
{
    [ClassInterface(ClassInterfaceType.AutoDispatch)]
    [ProgId("TestPlugin.Test.Connect")]
    public class TestConnect
    {
        public TestConnect()
        {

        }

        public int Connect(object objEHIApp, string sIniFile, string sIniSection)
        {
            File.AppendAllText(@"C:\ProgramData\ScanSolutions\TestPlugin.txt", "Plugin Connected!");
            return 0;
        }

        public int Disconnect(object objEHIApp)
        {
            return 0;
        }

        public int IsVistaConverted()
        {
            return 0;
        }
    }
}

Since the error message from manager really does not help me track down the problem, I have been looking for a log, but have not yet found one.

To debug my issue I have then attached a debugger to the manager module, which just tells me this, when trying to load my plugin:

Could not create instance of class name TestPlugin.Test.Connect with clsid {B21CE504-ADDA-3174-BEB8-D359F85D9A63}.

Does anyone what is happening here?

Thanks in advance.

0

There are 0 best solutions below