Click to See Complete Forum and Search --> : How does a VB client handle calls from a COM server?


January 3rd, 2000, 08:33 AM
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.

ufo
January 3rd, 2000, 10:20 AM
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]

January 3rd, 2000, 12:08 PM
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?