UK XL User Conference 2006 Converting XLA add-ins to COM Add-ins with VB6.0 Simon Murphy Developer – Codematic Ltd.

Slides:



Advertisements
Similar presentations
Microsoft Office System UK Developers Conference Radisson Edwardian, Heathrow 29 th & 30 th June 2005.
Advertisements

IEs Protected Mode in Windows Vista TM January 20, 2006 Marc Silbey Program Manager.
Sep-05 Slide:1 VBA in Excel Walter Milner. Sep-05 Slide:2 VBA in Excel Introduction VBA = Visual Basic for Applications Enables end-user programming In.
Hardcore Office Development Don Kiely Software Technologist Third Sector Technologies Fairbanks, Alaska
Andrew Dolan Markets and Banking Technology May-07 Enterprise Grid at Citi Grids Mean Business.
DIGIDOC A web based tool to Manage Documents. System Overview DigiDoc is a web-based customizable, integrated solution for Business Process Management.
UK XL User Conference 2006 Excel VBA Best Practice Simon Murphy Developer – Codematic Ltd.
1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS.
DDD Using and Extending Excel with Visual Studio A high level discussion of the main options Simon Murphy Developer – Codematic.
ACT! “Web” Plugins ACC Webinar (Part 1of 2) Brian Mowka and Jamie Aurand December 2010.
PowerBuilder 11: .NET Web Forms
Chapter 1 Introduction to Visual Basic Programming and Applications 1 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta.
Business Planning using Spreasheets-2 1 BP-2: Good Spreadsheet Practice  There is always the temptation to rush in and start entering data.  However.
1. 2 Captaris Workflow Microsoft SharePoint User Group 16 May 2006.
Using VB with MS Applications R. Juhl, Delta College.
Student, Faculty, and Staff Data Availability and Protection What’s the Back-Up Plan? (for academic computing) Sponsored by.
Presentation 10 SOAP on the Microsoft Platform (.NET)
UK XL User Conference 2006 Spreadsheet Design Concepts Simon Murphy Developer – Codematic Ltd.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
Tutorial 8: Developing an Excel Application
Microsoft Office Excel 2013 Core Microsoft Office Excel 2013 Core Courseware # 3253 Lesson 8: Macros, Importing and Exporting Data.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Management Paper - Comparison of Spreadsheets with other development tools (limitations, solutions, workarounds and alternatives) Simon Murphy
The Microsoft View: Module 1: Getting Started. Copyright Course 2559B, Introduction to Visual Basic®.NET Programming with Microsoft®.NET. Lecture 1 Microsoft.
Using the Visual Basic Editor Visual Basic for Applications 1.
Management Paper – Commercial Spreadsheet Review Simon Murphy Developer – Codematic Ltd.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Integrate. Automate. eXLerateTM
1 Modular Software/ Component Software 2 Modular Software Code developed in modules. Modules can then be linked together to produce finished product/program.
Visual Basic: An Object Oriented Approach 12 – Creating and using ActiveX objects.
SQL Server Integration Services (SSIS) Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server (MVP) Microsoft Certified Technology Specialist.
Architecting secure software systems
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Obsydian OLE Automation Ranjit Sahota Chief Architect Obsydian Development Ranjit Sahota Chief Architect Obsydian Development.
Microsoft Confidential Office as a Development Platform Tim Heuer
Using Visual Basic 6.0 to Create Web-Based Database Applications
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Nilotpal Bhattacharya Partner Technical Consultant| Microsoft.
Building COM Add-Ins Don Kiely Software Technologist Third Sector Technologies Fairbanks, Alaska
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
June 6 th – 8 th 2005 Deployment Tool Set Synergy 2005.
ADD-IN EXPRESS True RAD tools for Microsoft Office developers.
‘Tirgul’ # 7 Enterprise Development Using Visual Basic 6.0 Autumn 2002 Tirgul #7.
Eusprig 2007 Management Paper Spreadsheet Hell Simon Murphy Developer – Codematic Ltd With contributions from
VBScript Microsoft Visual Basic: Scaleable Solutions Visual Basic  Best tool for distributed client/server solutions  Powerful, robust,
Compatibility and Interoperability Requirements
Slide 1.NET Development for Project 2003 Samples from the Project 2003 SDK Jim Corbin Programmer Writer Office Developer Documentation Microsoft Corporation.
APPLICATION PENETRATION TESTING Author: Herbert H. Thompson Presentation by: Nancy Cohen.
Microsoft Office Excel 2007: Programming Business Intelligence Features John Hooper Service Line Architect Microsoft Corporation Jed Farr Senior Consultant.
Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc.
Chapter 11: Introduction to VBA Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Presented by Vishy Grandhi.  Architecture (Week 1) ◦ Development Environments ◦ Model driven architecture ◦ Licensing and configuration  AOT (Week 2)
The Digital Crime Scene: A Software Perspective Written By: David Aucsmith Presented By: Maria Baron.
Extending the 2007 Microsoft Office System User Interface Mike Taulty Developer & Platform Group, Microsoft Ltd
Active X and Signed Applets Chad Bollard. Overview ActiveX  Security Features  Hidden Problems Signed Applets  Security Features  Security Problems.
Automation Engr. Faisal ur Rehman CE-105T Spring 2007.
ClickOnce Deployment (One-click Deployment)
Packaging and Deploying Windows Applications
Evaluating Existing Systems
Evaluating Existing Systems
Off-line Risk Assessment of Cloud Service Provider
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
Mike Goodwin OWASP Newcastle September 2017
Lecture Set 11 Creating and Using Classes
Module 10: Implementing Managed Code in the Database
Severity and Exploitability Index
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

UK XL User Conference 2006 Converting XLA add-ins to COM Add-ins with VB6.0 Simon Murphy Developer – Codematic Ltd

UK XL User Conference 2006 Spreadsheet background Up to 200 Mb size Up to 1 Million formulas 1-10,000 unique formulas 5-10,000 lines of VBA £Billions in values Often linked to other technologies such as OLAP, ADO, COM or.net etc. Finance, Banking and Sales and Marketing areas Development cost up to $1M Active member of Eusprig – European Spreadsheet Risk group – dedicated to raising awareness of dangers and error rates in commercial spreadsheets

UK XL User Conference 2006 Agenda Solution design patterns What is COM? Reasons for using COM Reasons for avoiding COM Automation Add-ins Intro to toolbar XLA Intro to VB6 Add-in projects Discussion of IDTExtensibility2 Structure of an Excel Add-in Code and test Package and deployment.net

UK XL User Conference 2006 Security Is everybodys concern Spreadsheets can be used as a staging board for privilege escalation (with your login details!) Consider SD 3 +C –Secure by Design Default Deployment Communication Threat Modelling – Assets, Threats Threat Types – STRIDE –(Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege) Threats – rate with DREAD –(Damage potential, Reproducibility, Exploitability, Affected Users, Discoverability) Spreadsheets (all flavours) are fairly insecure –Compiled UDFs (.net, COM, XLL) and Database servers can help Set macro security to high and use code signing certificates. See Microsoft MOC 2840A – Implementing security for more info.

UK XL User Conference 2006 Solution design patterns

UK XL User Conference 2006 What is COM? COM – Component Object Model, also known as ActiveX and automation. Allows interoperability between heterogeneous systems Revolves around registering (and then searching) interfaces in the Windows registry Excel looks in the registry at certain times and can load and use what it finds. VB is the language of COM, but COM components can be written in many languages, including.net Can be expensive performance-wise

UK XL User Conference 2006 Possible reasons for using COM add-ins 1.Improved security (from meddlers and malicious users) 2.Improved intellectual property protection 3.Better forms engine, and richer UI features 4.Better development tool support 5.Installed so may avoid macro security warnings (depends on settings) 6.Code is out of the VBAIDE (Project Explorer) 7.If functionality is used by multiple workbooks 8.If functionality is used by multiple office apps 9.If embedded workbook not required 10.If determined to use a none VB language (eg: C#/C++) 11.Possible application stability? 12.Possible execution speed improvements???

UK XL User Conference 2006 Possible reasons for avoiding COM add-ins 1.VB6 is out of mainstream support 2.Targets Office 2000 or newer not net may supercede COM 4.More complex development than XLAs 5.More complex testing than XLAs 6.More complex deployment than XLAs 7.Solution design uses an internal workbook 8.VB runtime library required on client 9.Access to development tools may be difficult 10.Security concerns of potential users

UK XL User Conference 2006 One performance test

UK XL User Conference 2006 Automation v COM Add-in Automation Add-ins are COM add-ins that can be called directly from a worksheet cell. COM Add-ins –Must Implement IDTExtensibility2 –Generally load on Excel start up (can be changed) Automation Add-ins –May Implement IDTExtensibility2 (discouraged) –Loaded on demand only

UK XL User Conference 2006 Agenda (again) Solution design patterns What is COM? Reasons for using COM Reasons for avoiding COM Automation Add-ins Intro to toolbar XLA Intro to VB6 Add-in projects Discussion of IDTExtensibility2 Structure of a COM Excel Add-in Code and test Package and deployment.net

UK XL User Conference 2006 Toolbar The issue: –Opening files from other people causes the reviewing toolbar to appear, there is no obvious way to turn this off. (possible registry setting?) Solution –Capture the workbook open event and close the toolbar, that seemed too early so capture the activate event and close it there. Requires no use of worksheet, may be useful in other office apps. Just for me so no deployment problems, active all the time so better out of the VBA IDE – Ideal candidate for a COM add-in.

UK XL User Conference 2006 Migration 1.Code sensibly in VBA, with a view to migration 2.Provide a user interface 3.create a class to wrap the application to trap events 4.Add a global variable to represent the application as an instance of this class 5.Create folder for VB project 6.Export Excel VBA code files to VB project folder 7.In VB6 create a new add-in project in that folder 8.Set designer to Excel 9.Import code files 10.Set application to be correct type 11.Manage application object lifecycle 12.manage user interface actions and lifecycle 13.Add start up code 14.Debug and deploy.

UK XL User Conference 2006 IDTExtensibility2 Private Sub IDTExtensibility2_OnConnection( Private Sub IDTExtensibility2_OnDisconnection( Private Sub IDTExtensibility2_OnStartupComplete( Private Sub IDTExtensibility2_OnAddInsUpdate( Private Sub IDTExtensibility2_OnBeginShutdown( (Populated by a wizard, just need tidying up)

UK XL User Conference 2006 Basic COM Add-in Structure

UK XL User Conference 2006 COM Shims What are they? –COM dll that loads Mscoree.dll which then loads our managed component –Excel>>COMSHIM>>Mscoree>>MyAddin.dll Why use them? –Security (code signing) –AppDomain Isolation Protect other apps from failures in our component Protect our component from other failures

UK XL User Conference 2006 Questions? –Spreadsheet consulting, reviewing, maintaining, rescuing, migrating, add-in development etc. –Staff coaching, mentoring and training Websites – –