COM Interoperabillity
•COM à Reusable
•COM à written in one language (c++) and
consumed by other language (VB)
•COM has Metadata : stores
all info stored inside type library like name, Id of interface, methods and argumetns.
•COM is Not Extensible à drawback
•COM
Issues
–METADATA à
Type Library – TLB
–FREEING
MEMORY à Com relies on Ref. Count, .Net on GC
•IUnknown
interface required to be implemented by every com obj.
–AddRef(),
Release() for destruction of object
–INTERFACE
à IUnknown, IDispatch,ICollectionEvent
–METHOD
BINDING- .Net uses
Reflection, Com uses IDispatch
–DATA
TYPES à
Variant type , .Net class
has Object
–REGISTRATION
à CLSID
– 128 bit, ProgID (Excel.Application)
–THREADING à
STA
and MTA
–ERROR
HANDLING à HResult , .Net uses
Exception
–MARSHALLING
à COMà
SafeArray à
Array in .net Variant in COM à
object in .net BStr à
String , IUnknown,IDispatch à
Object
No comments:
Post a Comment