Advanced COM Programming with Visual Basic 6'0 - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Advanced COM Programming with Visual Basic 6'0

Description:

Interface-based programming is a concept created by the computer science ... An interface is a data type that contains definitions of public methods without ... – PowerPoint PPT presentation

Number of Views:84
Avg rating:3.0/5.0
Slides: 7
Provided by: abc105
Category:

less

Transcript and Presenter's Notes

Title: Advanced COM Programming with Visual Basic 6'0


1
Chapter 4
  • Advanced COM Programming with Visual Basic 6.0
  • Lesson 1 Creating Custom Interfaces

2
Learning Objectives
  • Explain how interface-based programming
    relates to component-based software development.
  • Describe the role of interfaces in COM.
  • Define default interfaces and their purpose.
  • Describe the benefits of creating custom
    interfaces.

3
Interface-based programming
  • Interface-based programming is a concept
    created by the computer science academia and
    companies that needed to develop enterprise
    software and information systems.
  • It defines two separate but related elements an
    interface and a coclass.
  • An interface is a data type that contains
    definitions of public methods without containing
    any code.
  • The coclass contains the code for the methods
    defined by the interface.

4
Interface pointers
  • COM provides the ability for objects to
    communicate with each other both in-process and
    out-of-process. Interface pointers achieve this
    communication. When a client application calls a
    method of a COM object, the client points to a
    location in memory where the COM objects
    interface resides.

5
Interfaces and VB
  • In VB, you can simply create class modules
    within an ActiveDLL project, and VB creates the
    interfaces and coclasses for you.
  • When you develop COM components such as ActiveX
    DLL projects with VB, public creatable class
    modules are translated into coclasses in the type
    library (.tlb file) of the components. In
    addition, a default interface is created
    automatically and is assigned the same name as
    the class module with an undersoce(_) prefix.

6
View a Type Library with the OLE View Tool
  • To create a COM DLL.
Write a Comment
User Comments (0)
About PowerShow.com