Solved

Can someone explain the Iunknown and Idispatch interfaces to me?

Posted on 2004-04-01
7
2,740 Views
Last Modified: 2013-11-25
In regards to visual basic, I would appreciate it if someone can explain these two interfaces to me...
I must communicate with a program and in the dev. manual it say's my program needs to implement these interfaces..But I don't really understand they're role

Thank you
0
Comment
Question by:EnolaKotrotsos
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 13

Accepted Solution

by:
crazyman earned 250 total points
ID: 10732197
0
 
LVL 8

Expert Comment

by:plq
ID: 10732225
They are base classes for ActiveX or OLE. IDispatch is the interface used for all COM objects, IUnknown is the base class for all OLE/Com/ActiveX components

You won't usually need to worry about these if youre communicating with a program that supports them, just create the class using createobject (or add it to your references and create using dim x as new class.class1)

What is the program you're looking at ?
0
 
LVL 1

Author Comment

by:EnolaKotrotsos
ID: 10732334
a messagebroker of somesorts...I need to connect with it (and it needs to connect with my program)...

It states in the manual that my program needs to be able to implement these...I take it that
dimx as new gim.app means the same?

So, when it say's 'your program needs to be able to be able to implement IDispatch and IUnknown'  It means I need to be able to call an interface?

0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 13

Expert Comment

by:crazyman
ID: 10732358
It means that you objects must implement these interfaces, and by default VB will...
0
 
LVL 27

Expert Comment

by:Ark
ID: 10737453
Any OLE based applications support these interfaces. VB is OLE based application...
0
 
LVL 27

Expert Comment

by:Ark
ID: 10737463
PS. You don't even need worry about this. Just go to VB menu->Project->References->browse for external dll and choose this dll.
After this open ObjectBrowser (F2) and see all methods/properties of this dll.
0
 
LVL 1

Author Comment

by:EnolaKotrotsos
ID: 10740105
thank you all for your time...crazyman, that was a very informative link you've send.
kind regards,
Marco
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question