John Uhden
Usenet Archive
- Joined
- Jul 3, 2003
- Messages
- 330
- Reaction score
- 0
Snipped from a post by James Buzbee c. 5/29/02...
;; Register ObjectDBX ActiveX services, thanks Tony T! ;; if not already registered use (RegisterObjectDBX) (defun RegisterObjectDBX (/ dbxserver) (cond ((vl-registry-read "HKEY_CLASSES_ROOT\\ObjectDBX.AxDbDocument\\CLSID")) ((not (setq dbxserver (findfile "AxDb15.dll"))) (alert "Error: Can't locate ObjectDBX Library (AxDb15.dll)") ) (T (startapp "regsvr32.exe" (strcat "/s \"" dbxserver "\"")) (or (vl-registry-read "HKEY_CLASSES_ROOT\\ObjectDBX.AxDbDocument\\CLSID") (alert "Error: Failed to register ObjectDBX ActiveX services.") ) ) )
)
Notice how the first condition is satisfied by the presence of the document class. Granted it was written before there was a difference between ObjectDBX.AxDbDocument.1 (2000/2000i/2002) and ObjectDBX.AxDbDocument.16 (2004), but it doesn't do anything to distinguish between 2000, 2000i, and 2002. So whichever release last registered AxDb15.dll, that path would be in the registry. Even if you register without the path, it seems as though the current release's path is registered.
Okay, not a problem if you only have one of those releases installed (or use only one), but would there be a problem if say the 2000i path was registered and then you GetInterfaceObject from 2002, or vice versa? I just tested and it seems to load the object either way, but I don't know what pot holes one might run/fall into when accessing a file using the "wrong" dll. Or do they all work just fine?
;; Register ObjectDBX ActiveX services, thanks Tony T! ;; if not already registered use (RegisterObjectDBX) (defun RegisterObjectDBX (/ dbxserver) (cond ((vl-registry-read "HKEY_CLASSES_ROOT\\ObjectDBX.AxDbDocument\\CLSID")) ((not (setq dbxserver (findfile "AxDb15.dll"))) (alert "Error: Can't locate ObjectDBX Library (AxDb15.dll)") ) (T (startapp "regsvr32.exe" (strcat "/s \"" dbxserver "\"")) (or (vl-registry-read "HKEY_CLASSES_ROOT\\ObjectDBX.AxDbDocument\\CLSID") (alert "Error: Failed to register ObjectDBX ActiveX services.") ) ) )
)
Notice how the first condition is satisfied by the presence of the document class. Granted it was written before there was a difference between ObjectDBX.AxDbDocument.1 (2000/2000i/2002) and ObjectDBX.AxDbDocument.16 (2004), but it doesn't do anything to distinguish between 2000, 2000i, and 2002. So whichever release last registered AxDb15.dll, that path would be in the registry. Even if you register without the path, it seems as though the current release's path is registered.
Okay, not a problem if you only have one of those releases installed (or use only one), but would there be a problem if say the 2000i path was registered and then you GetInterfaceObject from 2002, or vice versa? I just tested and it seems to load the object either way, but I don't know what pot holes one might run/fall into when accessing a file using the "wrong" dll. Or do they all work just fine?