Quantcast
Channel: Autodesk India Community aggregator
Viewing all articles
Browse latest Browse all 1680

AutoCAD Customization: Autodesk ObjectARX: COMException(0x8004001F3): Problem in loading application

$
0
0

Hi,

I'm recompiling for AutoCAD 2013/2014 a solution that works fine with AutoCAD 2012, composed of some ARX projects, one DBX project and one c#.NET project.


The c#.NET project implements an UI and contains a COM wrapper client that requires to "connect" to a ObjectARX project that is the COM wrapper server.


That ARX project contains a rgs file like this:

HKCR
{
   ArxName.AppComWr.2 = s 'AppComWrp Class'
   {
      CLSID = s '{7888DE6F-6301-481c-9C97-1F34F018BE22}'
   }
   ArxName.AppComWrp = s 'AppComWrp Class'
   {
      CLSID = s '{7888DE6F-6301-481c-9C97-1F34F018BE22}'
      CurVer = s 'ArxName.AppComWr.2'
   }
   NoRemove CLSID
   {
      ForceRemove {7888DE6F-6301-481c-9C97-1F34F018BE22} = s 'AppComWrp Class'
      {
         ProgID = s 'ArxName.AppComWr.2'
         VersionIndependentProgID = s 'ArxName.AppComWrp'
         ForceRemove 'Programmable'
         InprocServer32 = s '%MODULE%'
         {
            val ThreadingModel = s 'Apartment'
         }
         val AppID = s '%APPID%'
         'TypeLib' = s '{51526A5B-9E7F-41C6-A7EB-879F72721236}'
     }
   }
}

 

All compiles ok and can be loaded in AutoCAD. To do so I follow this steps:
1. compiled all the ARX projects and the DBX project.
2. I used "tlbimp ArxName.tlb /machine:64 /keyfile:NetName.snk /reference:Autodesk.AutoCAD.Interop.Common.Dll" to create the ArxNameLib.dll
3. I used "tlbimp DbxName.tlb /machine:64 /keyfile:NetName.snk /reference:Autodesk.AutoCAD.Interop.Common.Dll" to create the DbxNameLib.dll
4. used the two generated interop files in the NET project (like references), compiled it and generated the NetName.dll
5. registered the NetName.dll with: RegAsm.exe NetName.dll /codebase

 

The c#.NET project tries to initialize COM wrapper client with:

 

IAcadApplication iAcadApp =disp as IAcadApplication;
object cawrp =iAcadApp.GetInterfaceObject(_appComWrpProgId);

 

where _appComWrpProgId = "ArxName.AppComWr.2", a string that represents the ProgID of the COM wrapper server defined in rsg file described above.


The problem is that GetInterfaceObject generate the exception:

System.Runtme.InteropServices.COMException(0x8004001F3): Problem in loading application

It seems that the COM server isn't registered but I don't know what is the correct procedure to register it (and I didn't find clear information about it on the web).
I tried to use C:\Windows\SysWOW64\regsvr32.exe to register the ArxName.arx, but it returns error "Can't find specified module" (translated from italian).


All suggestions are welcomed.
Thank you.
Regards,
Tiziano


Viewing all articles
Browse latest Browse all 1680

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>