porting VB dll to new computer R2004

Discussion in 'AutoCAD' started by Tom Craft, Nov 5, 2004.

  1. Tom Craft

    Tom Craft Guest

    I just installed R2004 on a different computer and copied my Vlisp
    files, dll file, etc to the new computer. Everything appears to load on
    the new computer ok, but when
    I try to run a Vlisp routine to access the dll, I get an "error: bad
    argument type vla-object nil" .
    The Acad paths are the same on both computers.

    The vlisp code:
    (vl-load-com)
    (defun C:CMUWALL() ;cmd_draw_cmu
    (if (not dmt) (setq dmt (vlax-create-object "dmtdll.dmt_cmd")))
    (vlax-invoke-method dmt 'D113)
    )
    The new computer does not have VB loaded.

    Thanks

    Tom Craft
     
    Tom Craft, Nov 5, 2004
    #1
  2. You can't just copy an ActiveX server to another machine. The library
    must be registered and and all run-time support files properly installed
    and/or registered.

    The easiest way to do this is to use your development tool to generate
    an installer.
     
    Frank Oquendo, Nov 5, 2004
    #2
  3. Tom Craft

    Tom Craft Guest

    Frank,
    I did use Inno Setup and copied over what (I think) files should go. I
    forgot entirely about registering the library. What particular file type has
    to be registered as the library?
    Part of my Inno .iss file is:
    [Files]
    ; begin VB system files
    Source: "C:\dmt_install\vbfiles\msvbvm60.dll"; DestDir: "{sys}"; Flags:
    restartreplace uninsneveruninstall sharedfile regserver
    Source: "C:\dmt_installil\vbfiles\stdole2.tlb"; DestDir: "{sys}"; Flags:
    restartreplace uninsneveruninstall sharedfile regtypelib
    Source: "C:dmt_install\vbfiles\olepro32.dll"; DestDir: "{sys}"; Flags:
    restartreplace uninsneveruninstall sharedfile regserver
    Source: "C:\dmt_install\vbfiles\oleaut32.dll"; DestDir: "{sys}"; Flags:
    restartreplace uninsneveruninstall sharedfile regserver
    ;boy this next one was a problem, all examples called for regserver flag
    Source: "C:\dmt_install\vbfiles\asycfilt.dll"; DestDir: "{sys}"; Flags:
    restartreplace uninsneveruninstall sharedfile
    Source: "C:\dmt_install\vbfiles\comcat.dll"; DestDir: "{sys}"; Flags:
    restartreplace uninsneveruninstall sharedfile regserver
    ; end VB system files
    ;vb files required
    source: "C:\dmt_install\vbfiles\mscomct2.ocx"; destdir: "{sys}"; flags:
    restartreplace uninsneveruninstall sharedfile regserver
    source: "C:\dmt_install\vbfiles\mscomctl.ocx"; destdir: "{sys}"; flags:
    restartreplace uninsneveruninstall sharedfile regserver
    source: "C:\dmt_install\vbfiles\comdlg32.ocx"; destdir: "{sys}"; flags:
    restartreplace uninsneveruninstall sharedfile regserver

    Thanks,

    Tom
     
    Tom Craft, Nov 5, 2004
    #3
  4. I don't see your application dll on the list
    You have to register that dll also.

    --
    Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica


     
    Jorge Jimenez, Nov 6, 2004
    #4
  5. Tom Craft

    Tom Craft Guest

    Thanks Jorge,
    That dawned on me during the night,

    Tom

     
    Tom Craft, Nov 6, 2004
    #5
  6. Tom Craft

    bcoward Guest

    Tom,

    Just as a make sure - if you have VB pro or ent installed you can use the Depenency Walker to view the dependencies of the different dlls. I believe if a dependent dll is missing it will give you that information. This might save you some time.

    Bob
     
    bcoward, Nov 6, 2004
    #6
  7. BTW, one quick way of knowing which files you need to include
    and if they need to be registered or not, is to use the Package and
    Deployment Wizard. It creates an LST file that lists the information
    mentioned above. Use that with Inno Setup and you are on your way.

    --
    Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica


     
    Jorge Jimenez, Nov 6, 2004
    #7
  8. You don't need VB to get depends.exe. It's freely
    available to anyone (google it).

    Also, Depends does not reveal dependence of
    COM components. The package deployment
    Wizard can do that
     
    Tony Tanzillo, Nov 6, 2004
    #8
  9. Tom Craft

    Tom Craft Guest

    Actually, I did use the P&D Wizard, Unfortuneately, when I transfered that
    information to the Inno .iss file I left off the regserv flag. I included the
    ..dll file in with the other support files which did not need registering. Dumb
    move, but all is well now.

    thanks again

    Tom

     
    Tom Craft, Nov 8, 2004
    #9
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.