CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2000
    Location
    mvEmjsunp
    Posts
    39

    COM object within VBScript


    Hi,

    I created a COM object that runs successfully from VB. Now I would like to use it in VBScript. The two line below fail to execute in VBScript.

    dim goo
    set goo = CreateObject("iVGoo.goo")



    What steps am I missing?

    BTW, in VB, iVGooLib.goo object is created without problems.

    Thanks in advance!

    araik


  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: COM object within VBScript

    is this running on the server side? if so, place a Server. in front of the CreateObject - like this:

    dim obj

    set obj = server.createobject("iVoo.Goo")




    make sure it's registered properly on the server machine as well.

    good luck,

    John

    John Pirkey
    MCSD
    http://www.ShallowWaterSystems.com
    http://www.stlvbug.org
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  3. #3
    Join Date
    Sep 2000
    Location
    mvEmjsunp
    Posts
    39

    Re: COM object within VBScript


    John,

    I am not using this COM object in the web page. I am running the script from within VC++ code. The script contains the reference to the COM object. I am not sure what "server" would be in my context.

    araik


  4. #4
    Join Date
    Oct 2001
    Location
    Bangalore.INDIA
    Posts
    25

    Re: COM object within VBScript

    better use server.createobject
    that is all.
    Ok
    the method call ofcourse is missing(kidding...)
    regards


  5. #5
    Join Date
    Nov 2001
    Location
    France, PARIS
    Posts
    2

    Re: COM object within VBScript

    But what happen if the DLL is running on the client PC ?
    I have a pb with my DLL which i call after a user button click :
    set s = createobject("project.class")
    call s.method

    the method does not run !


  6. #6
    Join Date
    Aug 2001
    Location
    North Bend, WA
    Posts
    1,947

    Re: COM object within VBScript

    Server would be part of the object model you exposed (or didn't) to the scripting engine in your C++ program.

    IIS uses Server as the name of one of its public objects. The server object supports the CreateObject method. I'm not sure what you need to do to make your app do the same.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured