Author Topic: Autoloader does not load my dll  (Read 133 times)

0 Members and 1 Guest are viewing this topic.

AngelKostadinov

  • Newt
  • Posts: 29
Autoloader does not load my dll
« on: January 10, 2017, 11:05:31 am »
Hello,

I use Autodesk Autoloader http://adndevblog.typepad.com/autocad/2013/01/autodesk-autoloader-white-paper.html in order to deploy my extention application.
I put myApp.dll and PackageContents.xml files into ProgramFiles/Autodesk/ApplicationPlugins/MyApp.bundle folder. The structure of the xml file is carefully taken from Autoloader White Paper and ModuleName attribute points directly to my dll file:
Code: [Select]
ModuleName="myApp.dll"When AutoCAD starts, it loads my dll automatically, cool!

Now I have to introduce "autoupdater" functionality and that what I'm doing is on AutoCAD startup, to check, if new version of dll is available and download it to a subfolder:
ApplicationPlugins/MyApp.bundle/NewVersion/myApp.dll. I inform the user, that a newer version is available and it has to restart Autocad. Meanwhile, I change ModuleName attribute value to point to the newer dll version
Code: [Select]
ModuleName="./NewVersion/myApp.dll"The problem is that, when Autocad is restarted, neither one of two (old and new) files are loaded.
If somebody has already faced the same issue, please suggest something :)

« Last Edit: January 12, 2017, 07:28:46 am by AngelKostadinov »

Bryco

  • Water Moccasin
  • Posts: 1770
Re: Autoloader does not load my dll
« Reply #1 on: January 14, 2017, 08:38:28 pm »
This function sounds very cool. What I do is first autoload a dll that checks for a newer version and if true copies the new one to the appropriate spot then the next autoload loads the dll. I put it in acad support (probably  a non kosher move) but it is available to all users on that box using acad

BlackBox

  • King Gator
  • Posts: 3723
"Potential has a shelf life." - Margaret Atwood

AngelKostadinov

  • Newt
  • Posts: 29
Re: Autoloader does not load my dll
« Reply #3 on: January 20, 2017, 05:25:37 am »
Thank you for the replays!

Very tricky problem, indeed. Sometimes works, sometimes does not. I found some related threads on Autodesk's forum, like this one: http://forums.autodesk.com/t5/net/autocad-2015-autoloader-changes/td-p/4910140. It seems that people have a problem with XML structure of the PackageContents file, so I will compare everything again with the white paper and if spot something will update the post.
With regard to AutoCAD version, I could say that my extension will be used on Acad 2012 <-> 2016 and I don't think it wil be used with 2017 soon.

As a side note, BricsCAD doesn't support Autoloader mechanism in a such way as AutoCAD. I have to edit registry keys in that case.