2

I am building an application to read .mdd file using given code

class Program
{
static void Main(string[] args)
{
    MDMLib.Document document = new Document();
    document.Open(@"D:\Sample.mdd", "", MDMLib.openConstants.oREAD);
    foreach (IMDMField field in document.Fields)
    {
        Console.WriteLine(field.Name);
    }
    Console.ReadLine();
}
}

but I am getting given error. In error source file is coming mscorlib

Message :Retrieving the COM class factory for component with CLSID {432E4F73-87A8-4732-A98D-85CE5B500AD7} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Source :mscorlib
    StackTrace :   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, 
    Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at MDDTesting.Program.Main(String[] args) in D:\RebusCode\MDDTesting\MDDTesting\MDDTesting\Program.cs:line 14
  • related: https://stackoverflow.com/questions/44543778/unable-to-register-dll-class-not-regitered - did registering ever succeed? – Cee McSharpface Jun 15 '17 at 10:07
  • @dlatikay : yes .. registration is done using regasm command but still getting this error. – Jain Neeluu Jun 15 '17 at 10:09
  • @dlatikay :- can you help me to resolve this? .. do you have any idea? – Jain Neeluu Jun 15 '17 at 10:19
  • let us see... first of all, which DLL is it (name, version, bitness)? is this dll a .NET component which exposes a COM interface, or an unmanaged COM component? – Cee McSharpface Jun 15 '17 at 10:33
  • @dlatikay :- I am using MDMLib.dll ,version 2.123.2.0 & x64 . Basically this DLL is use to read .mdd files. It is a DLL of IBM product called Base Data Collection (Base Professional Data Collection) – Jain Neeluu Jun 15 '17 at 10:48
  • related: https://stackoverflow.com/questions/44550818/unable-to-read-mdd-file-in-console-application-using-mdmlib-dll-ibm, https://www.codeproject.com/Questions/1192024/Mscorlib-source-error-class-not-registered-excepti – Cee McSharpface Jun 15 '17 at 11:45
  • try the solution proposed in [this answer](https://stackoverflow.com/a/11077524/1132334). I think this component is an unmanaged COM server, and needs to be registered not with regasm, but with regsvr32. Also have a [look at this](https://stackoverflow.com/a/16570881/1132334) – Cee McSharpface Jun 15 '17 at 11:49
  • @dlatikay :- I am trying to register with regsvr32.exe but I am unable to do it because of this error " DLLRegistryServer entry point is not found." :( – Jain Neeluu Jun 15 '17 at 12:08
  • did you try also the build platform settings? Is there a setup program or SDK from IBM that would install and configure this properly? I would really try and reach out to their support in this case. – Cee McSharpface Jun 15 '17 at 12:41
  • @dlatikay :- Yes, I tried build platform settings too but did not work for me. – Jain Neeluu Jun 15 '17 at 13:14
  • I used `Any CPU` settings in Configuration Settings as processor architecture is MSIL and not x86 nor x64, registered with RegAsm.exe and example is working for me – Marek Maszay Jun 19 '17 at 11:26
  • have you installed Base Professional tool in your system? @MarekMaszay – Jain Neeluu Jun 20 '17 at 09:55
  • No don't have it I have only acees to Author but MDMLib.dll is still installed as it's needed. @JainNeeluu – Marek Maszay Jun 20 '17 at 12:26
  • can you please uninstall Author and after that check it?... because after installing Author it is also working for me but when I have uninstalled Author after that it is not working. @MarekMaszay – Jain Neeluu Jun 21 '17 at 09:16

0 Answers0