[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2834
  • Last Modified:

Can someone explain the Iunknown and Idispatch interfaces to me?

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
EnolaKotrotsos
Asked:
EnolaKotrotsos
  • 2
  • 2
  • 2
  • +1
1 Solution
 
plqCommented:
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
 
EnolaKotrotsosAuthor Commented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
crazymanCommented:
It means that you objects must implement these interfaces, and by default VB will...
0
 
ArkCommented:
Any OLE based applications support these interfaces. VB is OLE based application...
0
 
ArkCommented:
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
 
EnolaKotrotsosAuthor Commented:
thank you all for your time...crazyman, that was a very informative link you've send.
kind regards,
Marco
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now