regsvr32 and Inventor AddIns and DLLs

Top  Previous  Next

This information is only useful if you are making old style AddIns. New Registry Free AddIns don't require the use of regsvr32.

 

Required for when you make AddIns. Two examples:

 

regsvr32 shmedia.dll (for registering a file)

 

regsvr32 /u shmedia.dll (for unregistering a file)

 

Note that the full path of the .dll may be used to ensure that you are registering the correct dll.

 

The def file is required because it is used to export the functions DllRegisterServer and DllUnregisterServer. Here's an example:

 

 

; SimpleAddIn.def : Declares the module parameters.

 

LIBRARY      "SimpleAddIn.DLL"

 

EXPORTS

       DllCanUnloadNow        PRIVATE

       DllGetClassObject        PRIVATE

       DllRegisterServer        PRIVATE

       DllUnregisterServer        PRIVATE

 

DllCanUnloadNow is a function inside your code which Inventor calls to see if it can unload the DLL to free up memory.

 

 

 

 

Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)