Results 1 to 3 of 3

Thread: Interfaces??

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2003
    Posts
    31

    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

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    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:
    1. 'IDog interface
    2.  
    3. Public Sub Bark()
    4. End Sub

    VB Code:
    1. 'Collie class
    2.  
    3. Implements IDog
    4.  
    5. Private Sub IDog_Bark()
    6.     MsgBox "Woof"
    7. 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

  3. #3
    Banned
    Join Date
    Jul 2003
    Location
    New delhi
    Posts
    143
    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
  •  



Click Here to Expand Forum to Full Width