How to create VB-aware automation server ??


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: How to create VB-aware automation server ??

  1. #1
    cksiow Guest

    How to create VB-aware automation server ??


    I have create an inproc server using VC++ (implemented in DLL). At first,
    I use COM interface and it's accessible from VC. later I modify it to include
    Dispinterface using IDispatch. I was think when I add a reference to the
    dll, I should be able to call the server method from VB. but VB claim -
    "can't add reference to project", i read the help, and it say it's because
    the object is not automation object.

    Okay, then I create a type library for the server and add reference to the
    type library. I call the method and it work!!

    so, my question is what condition should I satisfy so that the server will
    become an Automation Server ?? so that it will be listed in the Automation
    Object using Ole/Com object viewer.

    second, When we create an activeX DLL in VB. we only need to add reference
    to the DLL file and it will work !! (without type library, probably the type
    library is embedded in the DLL), how can this possible without type library
    ??

  2. #2
    Eduardo A. Morcillo Guest

    Re: How to create VB-aware automation server ??

    > so, my question is what condition should I satisfy so that the server will
    > become an Automation Server ?? so that it will be listed in the Automation
    > Object using Ole/Com object viewer.


    The component has to register itself as Automation Server by adding the
    automation server category ID to the Implemented Categories key in the
    registry, under the component CLSID, or by adding the Programmable key under
    the same key.

    > second, When we create an activeX DLL in VB. we only need to add

    reference
    > to the DLL file and it will work !! (without type library, probably the

    type
    > library is embedded in the DLL), how can this possible without type

    library
    > ??


    VB embeds the type library as a resource in the ActiveX files. The resource
    is named 1 and its type is TYPELIB.

    --
    Eduardo A. Morcillo
    http://www.domaindlx.com/e_morcillo



  3. #3
    Eduardo A. Morcillo Guest

    Re: How to create VB-aware automation server ??

    > so, my question is what condition should I satisfy so that the server will
    > become an Automation Server ?? so that it will be listed in the Automation
    > Object using Ole/Com object viewer.


    The component has to register itself as Automation Server by adding the
    automation server category ID to the Implemented Categories key in the
    registry, under the component CLSID, or by adding the Programmable key under
    the same key.

    > second, When we create an activeX DLL in VB. we only need to add

    reference
    > to the DLL file and it will work !! (without type library, probably the

    type
    > library is embedded in the DLL), how can this possible without type

    library
    > ??


    VB embeds the type library as a resource in the ActiveX files. The resource
    is named 1 and its type is TYPELIB.

    --
    Eduardo A. Morcillo
    http://www.domaindlx.com/e_morcillo



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center