1 / 12

COM Objects

COM Objects. ITE 370. Com Technology. Component Object Model Allows communication between shared components Allows Re-useable software components Code Libraries DLL’s Active X controls. COM Technology. Create re-usable software components Link Components together to build applications

opa
Download Presentation

COM Objects

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COM Objects ITE 370

  2. Com Technology • Component Object Model • Allows communication between shared components • Allows Re-useable software components • Code Libraries • DLL’s • Active X controls

  3. COM Technology • Create re-usable software components • Link Components together to build applications • Take advantage of Windows Services • Used in MicroSoft Office Applications • Allows Word to link to Excel Spreadsheet • Building Scripts for Repetitive tasks • Control one application from another

  4. COM & .Net Components • Complementary Technologies • .Net Components can call COM Components • COM Components can call .NET Components • .Net Components • Better Security • Better Memory Management • Web Services Support • Thousands of useful COM components

  5. COM Components in Visual Studio • Add a Web Browser to a Visual Studio Application • VBWebBrowsingService is a COM Component • Project Menu  Add Reference • Select COM Tab • Scroll Down to VBWebBrowsingService • OK

  6. COM Components is Visual Studio • COM Component now added to Toolbox • Add Web Browser to Form • Add a Textbox (for a URL Address) • Named “txtWebAddress” • Add a Button to Execute • Named “btnConnect” • Text “Browse Web”

  7. Web Browser Example

  8. Code • Button Click Event Dim strURL As String strURL = txtWebAddress.Text WebBrowser1.Navigate(strURL)

  9. Managed Code • Code that operated within the .Net Common Language Runtime (CLR) • Has access to all services of CLR • Cross Language Integration • Security • Garbage Collection

  10. Unmanaged Code • Legacy COM Components are Unmanaged • Operates outside of CLR • Does not have natural access to services of CLR • Uses Proxy Software for access to CLR • Accepts commands from one component • Modifies them • Forwards them to another component • Create Runtime-Callable Wrapper (RCW)

  11. External COM Components – in .Net • Add a Reference to a COM Component • Project  Add Reference • Browse Tab • OK • Creates the RCWs • Creates a DLL in the /BIN folder • Cannot share among multiple applications

  12. COM Components • Uses For ??? • Found ???

More Related