Académique Documents
Professionnel Documents
Culture Documents
Com Server
PMA
The processing of the
component
will be done here
IN Process COM
When ever a COM type application uses the
definitions of the inprocess COM then a
request will be given to the COM server where
the component will be identified based on its
GUID and processing of the component will
take place at the PMA [ Private Memory Area ]
of the OS and the request will be given back to
the application.
Advantages The performance of the
application will be very fast.
Limitations Always a IN process component
depends on a application the Component cant
be used independently.
As the processing of the component will be
OUT Process COM
Operating System
COM Server
COM Server
.Net Application
COM Component
A dot net application cant send a request directly to the COM Component or it
cant send a request to the COM Server
Solution to use COM in dot net applications
The environment in which .net applications will be processed is
managed environment.
The environment in which COM components will be processed is
UnManaged
unmanaged Env
environment. Managed Env
COMMON LANGUAGE RUNTIME
COM Marshalling
COM Server
Runtime Callable Wrapper
COM Component
Un Managed Code
.Net Application
Managed Code
When ever the dot net application uses
the definitions of the COM Component a
request will be given to the CLR which
uses the COM marshalling resource and
identifies the application uses the
definition of the COM Component and it
defines a Runtime Callable Wrapper
which sends a request to the Com
Server where the Component is
identified based on its GUID and the
definitions of the COM component will
be returned to the RCW and based on
that definitions a relevant .net interop
Microsoft CDO for NTS 1.2 library
[COM Component ]
CDONTS { Collabarative Data objects
for new Tech. Service }
Usage used to send / receive Mails
Properties
From,To,Subject,Cc,Bcc,BodyFormat,Mai
lFormat,Body
See example.
COM using dot net
UnManaged Env
Managed Env
CLASS DEF
.Net assembly
[Class Defn’s]
Com Type App
When ever a COM type application uses
the definitions of the .net assembly then
a request will be given to the CLR from
the COM Server where the CLR uses its
COM collable Wrapper [CCW] resource
to identify the .net assembly and to
define the relevant interrop COM which
will be registered in the COM Server and
then the COM Type application uses the
definitions of the Dot net assembly as if
it is using a Com Component only.
Steps to define a .net assembly to be used
only by the COM type application
Step 1:Select class library template.
The main of the application if used in the .net
environment will be considered as a name
space and if used from the COM type
application it will be considered as a project
name.
Step 2: open the solution explorer and select
class1.cs file right click on it and click on d