Post on 08-Jan-2016
description
ITE 370
Com TechnologyComponent Object ModelAllows communication between shared
componentsAllows Re-useable software components
Code LibrariesDLL’s Active X controls
COM TechnologyCreate re-usable software componentsLink Components together to build
applicationsTake advantage of Windows ServicesUsed in MicroSoft Office Applications
Allows Word to link to Excel SpreadsheetBuilding Scripts for Repetitive tasksControl one application from another
COM & .Net ComponentsComplementary Technologies.Net Components can call COM ComponentsCOM Components can call .NET Components.Net Components
Better SecurityBetter Memory ManagementWeb Services Support
Thousands of useful COM components
COM Components in Visual StudioAdd a Web Browser to a
Visual Studio ApplicationVBWebBrowsingService is a
COM ComponentProject Menu Add
ReferenceSelect COM TabScroll Down to
VBWebBrowsingServiceOK
COM Components is Visual StudioCOM Component now added to
ToolboxAdd Web Browser to FormAdd a Textbox (for a URL Address)
Named “txtWebAddress”Add a Button to Execute
Named “btnConnect”Text “Browse Web”
Web Browser Example
CodeButton Click Event
Dim strURL As StringstrURL = txtWebAddress.TextWebBrowser1.Navigate(strURL)
Managed CodeCode that operated within the .Net Common
Language Runtime (CLR)Has access to all services of CLR
Cross Language Integration Security Garbage Collection
Unmanaged CodeLegacy COM Components are UnmanagedOperates outside of CLRDoes not have natural access to services of
CLRUses Proxy Software for access to CLR
Accepts commands from one component Modifies them Forwards them to another component
Create Runtime-Callable Wrapper (RCW)
External COM Components – in .NetAdd a Reference to a COM ComponentProject Add ReferenceBrowse TabOKCreates the RCWsCreates a DLL in the
/BIN folderCannot share among
multiple applications
COM ComponentsUses For ???
Found ???