Title: OLE COM
1OLE / COM
Sources MSDN Kraig Brockschmidt Inside
OLE Orfali-Harkey-Erwards Client/Server Survival
Guide
2OLE 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
3Object type
ClassName properties ... ------------ ev
ents ------------ methods
Property Get ltpropertygt - read
property Property Let ltpropertygt - write
property Property Set ltpropertygt - assigns
child
objref to property Initialize
Interfaces
Declared using Interface Definition Language
(IDL)
4DCOM Server
IUnknown - QueryInterface - AddRef - Release
DCOM Server
Class - properties - events - methods
(functions)
Interface - Get/Let/Set methods - set of methods
IClassFactory(2) - CreateInstance - LockServer -
GetLicInfo - RequestLicKey - CreateInstanceLic
ClassFactory
.EXE or .DLL
5Creating 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
6Collection and Member indexing
7Collection Methods
colObj
colObj.Remove
colObj.item(..)
colObj.Count
colObj.Add
colObj.Clear
8Type Library Instance
Object Type (class factory)
Dim objRef As New ltObjectTypegt or Set objRef
CreateObject("lt ObjectType gt" )
COM Object Reference is an interface pointer to
an object
caller Object
Object instance
objRef
9OLE Technologies
Kraig Brockschmidt Inside OLE, 1995
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
Connectable Objects
Naming and Binding
Persistent Objects
Type Information
Structured Storage
Component Object Model Objects and Interfaces
10Object Linking and Embedding
Linked object
Source object
Embedding a copy
Linking the object
Document1
Document2
Document1
Document2
emb. obj
emb. obj
11Automation Object Hierarchy
Kraig Brockschmidt Inside OLE, 1995
(container)
Application
- Open - Save - Close
Documents collection
Enumerator
Document
Hierarchy of ...
Objects collection
Enumerator
Object
Rich properties collection
Enumerator
Rich property
i.e. Font
12Object Path
Child Type ------------------- properties methods
Parent Type -------------------
Parent Object
Child Object
Parent.Child.Method arguments
13DCOM
Server
Client
Object proxy
Stub
Actual object
RPC
14Evolution 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