CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    How does a VB client handle calls from a COM server?

    I've got a COM server that supports two-way communication. A COM client can call the services in the COM server and the COM server can also call interfaces in the COM client.

    Now I want to replace the COM client with a Visual Basic client. I've figured out how to make calls from the VB client to the COM server through automation but how do I write the VB client so that the COM server can make function calls to the VB client? Can someone point me to a code example? Thanks.




  2. #2
    Join Date
    Dec 1999
    Location
    Slovakia
    Posts
    26

    Re: How does a VB client handle calls from a COM server?

    Create class with your function inside and set Instancing Property of class to e.g. MultiUse. Then make call from your COM server but don't forget to set security through DCOM config if you need it.


    [ufo]

  3. #3
    Guest

    Re: How does a VB client handle calls from a COM server?

    With the current architecture, the COM client passes an interface pointer to the COM server. Later on, the COM server makes callbacks to the COM client through this interface pointer(C++ style virtual function table). Both COM objects are written in C++.

    Do I need to make any changes to the COM server? For example, do I need to support COM connection points in order for the COM server to call the VB client?



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