When a DWG or DXF file containing custom objects is loaded, AutoCAD determines whether or not the associated application is loaded. If the application is not loaded, and the first bit of the system variable DEMANDLOAD is set, AutoCAD searches the Windows system registry for information about the application and its loader module. If AutoCAD finds the appropriate information in the system registry, it loads the application.
As a hypothetical example, let's assume that AutoCAD reads a file created by the ObjectARX application polysamp (a product of PolySamp Inc.).
\\HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\ObjectDBX\<VERSION>\Applications\<Application> DESCRIPTION:REG_SZ:PolyCad LOADCTRLS:REG_DWORD:0xd LOADER:REG_SZ:C:\Program Files\polysampinc\polyui.dbx AutoCAD reads the polysamp\LOADER key to determine the directory, path, and file name of the module to be loaded.
AutoCAD then attempts to load the ObjectARX module. If the module loads successfully, AutoCAD adds the application's handle to the list of application handles to be sent the kLoadDwgMsg message. AutoCAD then verifies that the application has been loaded properly, and verifies that the custom class is registered. If the application was loaded successfully, AutoCAD will continue to load the drawing file. If the ObjectARX module cannot be loaded, or if there still isn't a class implementation available, custom objects are treated as proxies and the load continues.