|
-
Nov 27th, 2003, 08:21 AM
#1
Thread Starter
Junior Member
Interfaces??
Hi I am new to COM programming...
I want to know what is Interface in COM and why do they use them? what is main purpose of that interface????
If I have to write COM component do I need to create interfaces?
if you have any good reference for sites pls. let me know
Thanking you in advance
Pardha
-
Nov 28th, 2003, 07:10 AM
#2
In simple terms, an interface is a contract. If you implement an interface, you must provide access to all the public functions, subs and properties that are part of that interface.
Example :
VB Code:
'IDog interface
Public Sub Bark()
End Sub
VB Code:
'Collie class
Implements IDog
Private Sub IDog_Bark()
MsgBox "Woof"
End Sub
So now, any class that implements IDog is guarunteed to have a method called Bark, because its part of the interface.
You don't need to use them. Like everything else, they have they're time and place.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 1st, 2003, 11:48 PM
#3
Banned
Interface are the contract between com client and com server.
interface give the facility to do the com instances in com.
interfcae can be implemnt by the key word
implement
Biswajit das
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|