ole / com
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
OLE / COMHelia / Martti Laiho
Sources:MSDNKraig Brockschmidt: Inside OLEOrfali-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
• OLE Controls, OCX 1994
• ActiveX 1996
• DCOM 1996
• COM+ 1997
• Distributed interNet Application Architecture (DNA) 1997
Object type
ClassName=========properties...------------events…------------methods…
Interfaces
Property Get <property> - read propertyProperty Let <property> - write propertyProperty Set <property> - assigns child objref to property
Initialize
Declared using Interface Definition Language (IDL)
DCOM Server
DCOM Server
Class- properties- events- methods (functions)
Class- properties- events- methods (functions)
ClassFactoryClassFactoryIClassFactory(2)- CreateInstance- LockServer- GetLicInfo- RequestLicKey- CreateInstanceLic
IUnknown- QueryInterface- AddRef- Release
Interface- Get/Let/Set methods- set of methods
.EXE or .DLL
Creating an Object
IClassFactory(2)- CreateInstance- LockServer- GetLicInfo- RequestLicKey- CreateInstanceLic
DCOM Server
Class- properties- events- methods (functions)
Class- properties- events- methods (functions)
ClassFactoryClassFactory
IUnknown- QueryInterface- AddRef- Release
Client Instance- properties
- vtable of methods
Instance- properties
- vtable of methods
Collection and Member indexing
collection===========
------------
------------methods:AddCountItemRemove
Object instanceObject instance
. . .
Collection.item(1)
Collection.item(2)
Collection.item(count)
Collection(0) or
Collection Methods
colObj
colObj.Add
colObj.Clear
colObj.Remove
colObj.Count
colObj.item(..)
Type Library & Instance
Object Type
(class factory)
ObjectinstanceObject
instance
callerObjectcallerObject
Dim objRef As New <ObjectType>or Set objRef = CreateObject("< ObjectType >" )
objRef
COM Object Reference is an interface pointer to an object
OLE TechnologiesOLE ControlsOLE Controls
In-Place Activation(Visual editing)
In-Place Activation(Visual editing)
LinkingLinking PropertyPages
PropertyPages EventsEvents Property Change
NotificationProperty Change
NotificationEmbeddingEmbedding
Drag and DropDrag and Drop
UniformData Transfer
UniformData Transfer
Persistent ObjectsPersistent Objects
Structured StorageStructured Storage
ConnectableObjects
ConnectableObjects
Type InformationType Information
Component Object Model: Objects and InterfacesComponent Object Model: Objects and Interfaces
OLE AutomationOLE Automation
Naming and Binding
Naming and Binding
OLEDocuments
Kraig Brockschmidt:Inside OLE, 1995
Object Linking and Embedding
Document1 Document2
Linkedobject
Document1 Document2
emb. obj
Sourceobject
emb. obj
Embedding a copyLinking the object
Automation Object Hierarchy
Application
Documentscollection
Document
Object
Rich propertiescollection
Objectscollection
Rich property
Enumerator
Enumerator
Enumerator- Open- Save- Close
Kraig Brockschmidt:Inside OLE, 1995
(container)
i.e. Font
Hierarchy of ...
Object Path
Child Type-------------------propertiesmethods
ChildObjectChildObject
Parent Type-------------------
ParentObjectParentObject
Parent.Child.Method [arguments]
DCOM
ClientClient ObjectproxyObjectproxy
ServerServer
StubStub ActualobjectActualobject
RPC
COM+Load balancing
In-memory databasesObject pooling
Queued componentsEvent model
Administration extensions
Evolution of Component Services
Microsoft Transaction ServerTransaction servicesResource poolingJust-in-time activationRole-based securityAdministration
Distributed COMRemoting architectureDistributed component services
COMInterface-based programmingBasic component facilities
Inside COM+