1 / 14

OLE / COM

OLE / COM. Helia / Martti Laiho. Sources: MSDN Kraig Brockschmidt: Inside OLE Orfali-Harkey-Erwards: Client/Server Survival Guide. OLE History. OLE 1.0 1990 Compound documents Object Linking and Embedding (OLE) OLE 2.0 1993 Component Object Model (COM) OLE Automation

Télécharger la présentation

OLE / COM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OLE / COM Helia / Martti Laiho Sources: MSDN Kraig Brockschmidt: Inside OLE Orfali-Harkey-Erwards: Client/Server Survival Guide

  2. OLE History • OLE 1.0 1990 • Compound documents • Object Linking and Embedding (OLE) • OLE 2.0 1993 • Component Object Model (COM) • OLE Automation • OLE Controls, OCX 1994 • ActiveX 1996 • DCOM 1996 • COM+ 1997 • Distributed interNet Application Architecture (DNA) 1997

  3. Object type ClassName ========= properties ... ------------ events … ------------ methods … Property Get <property> - read property Property Let <property> - write property Property Set <property> - assigns child objref to property Initialize Interfaces Declared using Interface Definition Language (IDL)

  4. DCOM Server IUnknown - QueryInterface - AddRef - Release DCOM Server Interface - Get/Let/Set methods - set of methods Class - properties - events - methods (functions) IClassFactory(2) - CreateInstance - LockServer - GetLicInfo - RequestLicKey - CreateInstanceLic ClassFactory .EXE or .DLL

  5. Creating an Object IUnknown - QueryInterface - AddRef - Release Client Instance - properties - vtable of methods DCOM Server Class - properties - events - methods (functions) IClassFactory(2) - CreateInstance - LockServer - GetLicInfo - RequestLicKey - CreateInstanceLic ClassFactory

  6. collection =========== ------------ ------------ methods: Add Count Item Remove Collection(0) or Collection.item(1) Object instance Collection.item(2) . . . Collection.item(count) Collection and Member indexing

  7. Collection Methods colObj colObj.Remove colObj.item(..) colObj.Count colObj.Add colObj.Clear

  8. Type Library & Instance Object Type (class factory) Dim objRef As New <ObjectType> or Set objRef = CreateObject("< ObjectType >" ) COM Object Reference is an interface pointer to an object caller Object Object instance objRef

  9. Kraig Brockschmidt: Inside OLE, 1995 OLE Technologies OLE Controls OLE Documents In-Place Activation (Visual editing) Linking Property Pages Events Property Change Notification Embedding OLE Automation Drag and Drop Uniform Data Transfer Naming and Binding Connectable Objects Persistent Objects Type Information Structured Storage Component Object Model: Objects and Interfaces

  10. Object Linking and Embedding Linked object Source object Embedding a copy Linking the object Document1 Document2 Document1 Document2 emb. obj emb. obj

  11. Kraig Brockschmidt: Inside OLE, 1995 Automation Object Hierarchy (container) Application - Open - Save - Close Documents collection Enumerator Document Hierarchy of ... Objects collection Enumerator Object Rich properties collection Enumerator Rich property i.e. Font

  12. Object Path Parent Type ------------------- Child Type ------------------- properties methods Parent Object Child Object Parent.Child.Method [arguments]

  13. DCOM Server Client Object proxy Stub Actual object RPC

  14. Evolution of Component Services Inside COM+ COM+ Load balancing In-memory databases Object pooling Queued components Event model Administration extensions Microsoft Transaction Server Transaction services Resource pooling Just-in-time activation Role-based security Administration Distributed COM Remoting architecture Distributed component services COM Interface-based programming Basic component facilities

More Related