Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Communication between Interfaceses

Status
Not open for further replies.

raochetan

Programmer
Aug 20, 2001
62
IN
I have created a ActiveX DLL using ATL wizards. It has 2 dual interfaces IBestServing and IGraph and implemented by CBestServing and CGraph co-class. The IBestServing interface has methods that generate files in a specific format for displaying purpose. The IGraph interface creates windows to displays the specified file. At any point of time any number of windows can be opened.

These objects are created by different forms in client developed using VB. I have situation where in I have to check if an object of CGraph is created or not from the one of the methods in the IBestServing interfaces. The main reason for this check is that, if a file, which is being regenerated, is currently being displayed in a graph, then that file and the concerned window should be closed.

Can anyone suggest with a small piece of code.

Thanks in advance.
 
Just set up a global list of CGraph objects or IGraph interfaces I'd use STL) which you can access from all your objects. If it's appartment threading being called from VB you don't have to worry about synchronisation. :) Hope that this helped! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top