How to test a COM DLL using .vbs file?

Discussion in 'Visual Basic ( VB )' started by Jaya, Oct 17, 2007.

  1. Jaya

    Jaya New Member

    Joined:
    Dec 13, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I am new to COM Programming. I have created a COM Object in vc++(ATL Wizard) with two simple functions add and subtract 2 nos. I need to test it using a vbs file. How do I proceed? How to include the DLL in this file. Can anyone help me?

    thanks,
    Jaya
     
  2. urstop

    urstop New Member

    Joined:
    Oct 17, 2007
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    0
    1. Register the COM DLL on your machine.
    2. In the VBS file you can use the CreateObject method to create an instance of the COM object and call its methods.

    Regards,
    UrStop
     
  3. urstop

    urstop New Member

    Joined:
    Oct 17, 2007
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    0
    Also, if you are asking about VB Script in a ASP page then it would be server.CreateObject instead of just CreateObject
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice