COM , OLE concept - PowerPoint PPT Presentation

About This Presentation
Title:

COM , OLE concept

Description:

Client-Server Model OLE ... OLE concept Java OLE COM object Object Activex relationship Active X technology Client-Server Model OLE ... – PowerPoint PPT presentation

Number of Views:237
Avg rating:3.0/5.0
Slides: 37
Provided by: CML69
Category:

less

Transcript and Presenter's Notes

Title: COM , OLE concept


1
COM , OLE concept
  • By topgun
  • src Write Ole Control

2
Java
Java app
Java app
Java virtual machine
Java machine
Java virtual machine
Java machine
x86 instruction set
Sparc instruction set
3
OLE
???
OLE(activex)
COM
binary standard
x86 instruction set
4
COM object
???
OLE(control)
OLE(automation)
script
COM
COM
binary standard
binary standard
x86 instruction set
5
Object ??
6
???
Browser
Active x Container
Activex control
Java applet
7
Activex relationship
(container)
Activex automation
Activex control
(Server)
(Client)
8
Active X technology
  • OLE(Active x) Automation (Server)
  • OLE(Active x) Document
  • OLE(Active x) Control
  • .

9
Client-Server Model
Server ?????COM object
Client ?????Com object
10
OLE architecture
11
Local and In-process Server (1)
Local Server
In-process Server
12
Local and In-process Server (2)
Local Server Local Server live in EXE file.
Client and local sever live in different process
space. The OLE library take care of passing back
and forth between them.
Local Server
In-process Server In-process Server live in DLL
file. The host process loads the DLL that
contains the COM Server . This means that the
in-process server lives in the same process
space as its host .
In-process Server
13
Marshaling
Transport Data across a process boundary
( function parameters and return Value )
Local Server
In-process Server
14
Proxies and stub
Local Server
15
Standard and Custom Marshaling
OLE Library accomplish standard marshaling use
Built-in proxies and stubs
OLE Library accomplish Custom marshaling use
custom proxies and custom stubs
16
GUID
  • CLSID -- a COM servers GUID is called its class
    ID(SERVER)
  • IID -- is a GUID that distinguishes one
    particular interface from all others(COM)
  • DISPID -- Dispath ID are numeric identifers
    that the OLE library use to identify your OLE
    Controls property and methods(Control).

17
Interface (keypad of ATM)
  • ???????
  • ? regular ? predictable ??????--???????????
  • ????--?????????????
  • ??????--??enter button ????????????????,???????.

18
Interface concept
19
Interface are Specifications Only
COM Interface define a protocol but ----- in no
way implement that protocol
Class Icalculate public virtual double sum
(double, double)0 virtual double product
(double, double)0
20
Containment
Delegation (??)
Aggregation (???)
?
COM SERVER ??? REUSE???
21
OLE Dcument
ActiveX Document is COM software components that
present data and information to the
user. ActiveX Document allow user to view data
in a variety of ways,perhaps as a graph, a
spreadsheet, or text
22
Structured Storage
23
Store
Save
stream
Stream
COM Server
24
Compound Document
Support fellow feature Nested object
support object conversion optimized object
storage object linking and embedding
25
Naming ,Binding and Monikers
Com object store the name and location of other
object
26
Binding
Container
27
OLE Automation
Automation Server Expose its method
(functionality) and properties ( characteristics
)to other objects and application
28
IDispath
29
OLE control
Container
  • OLE control s have three sets of attributes that
    are expose to the outside world
  • Property
  • Methods
  • Event

Request
30
Property(member variable in c)
  • properties are named attributes or
    characteristics of an OLE control ------------
    Some example of properties are
    color ,font,number.

31
Property page
????OLE???????????????, ??????????????property,???
container?????
  • OLE control provide access to their properties
    though property page(sheet)

(Clock object,might have a property called
DisplayType ,which indicate digital or analog)
Property can be changed programmatically or
though a UI mechanism call property page
32
Method (member function in c)
OLE Automation properties,method (argument) and
(return types) -----------------------------------
------------------------------- (argument and
return )data type 1. VARIANT 2.SAFEARRAY 3. BSTR
  • Method are function that client use to direct the
    actions of OLE servers.
  • Method are only accessible via OLE
    automation(IDispath)

Vt VARENUM VARIANT??????
iVal short ???
IVal long ???
???
33
Event
  • OLE object raises an event when something
    interesting happens

container
Mouse event
OLE control
34
Control and Automation
OLE Control implement IDispatch to implement OLE
Automation
35
Registry
Point to the controls Type Library Type Library
contains the descriptions of object
class,interface,dispatch interface ( OLE
automation) and type define
ltvendorgt.ltServer namegt.ltversion
namegt word.Document.6
36
Conclusion
Control ocx automation exe and DLL
control
automation
?
Automation automation
Write a Comment
User Comments (0)
About PowerShow.com