Path to create the registry entries for load a .dll (vb.net file)

Path to create the registry entries for load a .dll (vb.net file)

Anonymous
Not applicable
1,232 Views
3 Replies
Message 1 of 4

Path to create the registry entries for load a .dll (vb.net file)

Anonymous
Not applicable

Hi:

I want to create a .reg file to load automatically a dll.

 

I would like to generate this file from Autocad (using a subroutine).

The entries are:

[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.1\ACAD-9002:40A\Applications\SIMNET]
"DESCRIPTION"="Carga el archivo SIM.DLL"
"LOADCTRLS"=dword:00000002
"LOADER"="E:\\acaddlls\\SIM.dll"
"MANAGED"=dword:00000001

 

And I need to obtain from autocad next path " \Autodesk\AutoCAD\R18.1\ACAD-9002:40A" (is different for any versión of autocad).

How can I obtain it?

 

thanks

karea

0 Likes
1,233 Views
3 Replies
Replies (3)
Message 2 of 4

StephenPreston
Alumni
Alumni

If you really want your .NET DLL to self register, you can use the technique described here - http://through-the-interface.typepad.com/through_the_interface/2009/05/creating-demand-loading-entri.... However,its better to let your installer add the appropriate entries so your user doesn't have to manually NETLOAD your DLL the first time.

And if you're using AutoCAD 2012, the new autoloader format removes the need for you to add your own demandload settings - http://through-the-interface.typepad.com/through_the_interface/2011/05/adn-devcast-episode-6-autoloa....

 

Cheers,

 

Stephen Preston

Autodesk Developer Network

Cheers,

Stephen Preston
Autodesk Developer Network
0 Likes
Message 3 of 4

Anonymous
Not applicable

Hello,

I would like to create a .reg file and when the client execute it,  the registry is modified and when Autocad  runs, the application .dll is autoloaded. But I don´t know the version of Autocad in which it will be executed and therefore not the path that will be to introduce in the field [HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.1\ACAD-9002:40A\Applications\SIMNET].

 

The example corresponds with autocad 2011 but how it was for autocad 2009? and how it will be for autocad 2013?

It is possible to know it through some variable the application of Autocad?

 

thanks,

0 Likes
Message 4 of 4

StephenPreston
Alumni
Alumni

Doing that in an installer is hard work - you need a custom action. And remember its not just AutoCAD versions, its also languages and verticals that have different registry keys. See the webcast recording "AutoCAD: Creating an Installer" posted to http://www.adskconsulting.com/adn/cs/api_course_webcast_archive.php for a review of this.

 

As for AutoCAD 2012 obwards - you won't need to do that any more because of the autolader feature I mentioned in my previous reply.

 

Cheers,

 

Stephen Preston

Autodesk Developer Network

Cheers,

Stephen Preston
Autodesk Developer Network
0 Likes