RegisterObjectDBX

Discussion in 'AutoCAD' started by John Uhden, Jan 25, 2004.

  1. John Uhden

    John Uhden Guest

    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?
     
    John Uhden, Jan 25, 2004
    #1
  2. John Uhden

    viliam Guest

    There was no way to have installed more than one release of
    2000/2000i/2002 on one system. Unless of course you have used the
    registry hack provided by Owen.
    Therefore if you are looking for potholes, the best place in the whole
    world is Montreal. come and see for yourself!

    Viliam
     
    viliam, Jan 25, 2004
    #2
  3. Viliam - That's correct, but you can have more
    than one AutoCAD 2000/2000i/2002 based vertical
    product installed. However, I really don't know
    what John is getting at, because AxDb15.dll is
    identical in all R15 based products, so it should
    not matter which specific copy is registered.
     
    Tony Tanzillo, Jan 25, 2004
    #3
  4. John Uhden

    John Uhden Guest

    Thanks for the response, Tony.
    Actually, I have LDT2i(2000i), LDT3(2002), and LDT4(2004) installed on this
    laptop, plus LDT2(2000) on another PC.
    But from the outside I wouldn't call the AxDb15.dll files identical...

    Directory of J:\Program Files\LDD2
    07/13/1999 04:01a 286,720 axdb15.dll

    Directory of C:\Program Files\LDD2i
    06/12/2000 04:35a 290,868 axdb15.dll

    Directory of C:\Program Files\LDD3
    04/23/2001 01:06a 294,964 axdb15.dll

    If you're saying they can still be used interchangeably, then fine, but I wonder
    what the differences are.
     
    John Uhden, Jan 25, 2004
    #4
  5. No, I don't mean that the files are identical (of course they're
    not because if for no other reason, their version information is
    different), but their COM interfaces, CoClasses, and type libraries
    are identical and can be used interchangably.
     
    Tony Tanzillo, Jan 25, 2004
    #5
  6. John Uhden

    John Uhden Guest

    Thanks, Tony.
     
    John Uhden, Jan 25, 2004
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.
Loading...