Importing outside DLLs into.Net platform and using them By Anupama Atmakur.

Slides:



Advertisements
Similar presentations
What is.Net Gary Devendorf. .Net Framework.Net framework works like the Domino Objects only much lower level and very complete It is part of the OS (or.
Advertisements

Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
Building Localized Applications with Microsoft.NET Framework and Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corp.
CS 31003: Compilers ANIRUDDHA GUPTA 11CS10004 G2 CLASS DATE : 24/07/2013.
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
Programming with Objects: Class Libraries and Reusable Code.
Overview of the.NET Framework. What is the.NET Framework A new computing platform designed to simplify application development A consistent object-oriented.
Deployment Your Salvation from DLL Hell. Objectives Overview Assemblies „XCopy“ Deployment Configuration Administration.
Kashif Jalal CA-240 (072) Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 2 of…
Introduction to the C# Programming Language for the VB Programmer.
Advanced Object-Oriented Programming Features
.NET deployment and configuration (but mostly about security) Jørgen Thyme Microsoft Denmark.
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
Assembly Where it all gets physical. Objectives Introduce concepts of assemblies Discuss elements of assemblies Show how to build assemblies Runtime aspects.
ASP.Net Security: Fundamentals Chapters 1-4 Freeman and Jones Book.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
Object Oriented Databases by Adam Stevenson. Object Databases Became commercially popular in mid 1990’s Became commercially popular in mid 1990’s You.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
Introduction to .Net Framework
How To Fix Common Computer Errors m.
1 Namespaces and Assemblies © University of Linz, Institute for System Software, 2004 published under the Microsoft Curriculum License.
The Metadata System1. 2 Introduction Metadata is data that describes data. Traditionally, metadata has been found in language- specific files (e.g. C/C++
Architecture of.NET Framework .NET Framework ٭ Microsoft.NET (pronounced “dot net”) is a software component that runs on the Windows operating.
Module 1: Introduction to C# Module 2: Variables and Data Types
Session 1 - Introduction and Data Access Layer
.NET Framework & C#.
Microsoft.NET Vs Sun JAVA
Understanding Code Compilation and Deployment Lesson 4.
Webinar presented by Erick Polsky 10/2/2012. What is.Net? Combines… Language Independence Memory Management Database Access Class Libraries Operating.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Presenter: PhuongNQK. Goals Provide you insights into core concepts of.NET framework  Assembly  Application domain  MSIL.
ASSEMBLY. A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces.
ASSEMBLIES AND THE GAC CHAPTER 1, LESSONS 4-7 & LAB.
Improving Program Performance Function Visibility in z/TPF C++ Load Modules October 2, /2/20151American Express Public.
Agenda Assemblies 101 Anatomy of an Assembly What is Metadata? Assembly Variations Signing Assemblies Global Assembly Cache.
.NET Framework Danish Sami UG Lead.NetFoundry
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
Namespaces Tonga Institute of Higher Education. Introduction to Namespaces The.Net Framework provides many classes for doing different things  File Input/Output.
Linking and Loading Linker collects procedures and links them together object modules into one executable program. Why isn't everything written as just.
Java2C# Antonio Cisternino Part V. Outline Assembly & co. Visual Studio environment Example: using DirectX from C#
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
.NetDeploymentNOEA / PQC 2005 Application Deployment and Versioning Source: Joe Hummel, kursus i.Net, jan
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company.NET Assemblies Presented By : Muhammad Atif Hussain Deputy Manager IT.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
Lecture 4: J# Execution Model. 2 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET 4-2 Objectives “J# programs execute like any other.NET program.
.NET Ying Chen Junwei Chen. What is Microsoft.NET. NET is a development platform Incorporated into.NET COM+ component services ASP web development framework.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
DEV395 No Touch Deployment for Windows Forms Jamie Cool Program Manager.NET Client Microsoft Corporation.
What is GAC Repository containing all the assemblies of CLR Machine wide Assemblies shared by several applications Where CLR is installed C:\Windows\Microsoft.NET\assembly\GAC_MSIL.
Module 4: Deployment and Versioning. Overview Introduction to Application Deployment Application Deployment Scenarios Related Topics and Tools.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Assemblies. 2 Objectives Introduce assemblies –concept –creation –naming Discuss deployment –main.exe –dependent assemblies.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Sung-Dong Kim Dept. of Computer Engineering, Hansung University Chapter 3 Programming Tools.
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
OE-NIK HP Advanced Programming Using and creating DLL files.
Binding & Dynamic Linking Presented by: Raunak Sulekh(1013) Pooja Kapoor(1008)
ClickOnce Deployment (One-click Deployment)
INF230 Basics in C# Programming
Chapter 9 S. NandaGopalan, BIT
2.1. Compilers and Interpreters
COEN 252 Computer Forensics
Social Media And Global Computing Using DLLs with MVC
Social Media And Global Computing Creating DLLs with Visual Studio
The Role of Command Line Compiler (csc.exe)
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

Importing outside DLLs into.Net platform and using them By Anupama Atmakur

Overview  What is a DLL ?  Issues in using DLL :DLL hell.  Subtle difference between a DLL and a dot net assembly  What is an assembly?  How to create a DLL?  How is a DLL imported into.net?  Demo showing how to import a DLL into.net?

What is a DLL?  “DLL” stands for dynamic-link library.  It is an executable file that acts as a shared library of functions.  The executable code for the functions are located in a DLL, which are compiled, linked, and stored separately from the processes that use them.

What makes it dynamic?  DLL is a file that is loaded, and its functions linked dynamically at run time.  It allows an executable module to include only the information needed to locate the executable code for a DLL.  Where as in static linking, the linker gets all of the referenced functions from the static link library and places it with in your code into your executable.

Advantages…  Save memory and disk space.  Upgrade easier.  Provide after-market support.  Provide a mechanism to extend the MFC library classes.  Support Multilanguage programs

DLL Hell problem using DLLs… When a DLL is updated on a computer, the older version is removed and replaced with the newer version. If the new version is not compatible with the previous version, this usually crashes applications that use the component.

Solution… The.NET Framework provides support for side- by-side execution, which allows multiple versions of an assembly to be installed on the same computer, at the same time. As a result managed applications can select which version to use without affecting other applications that use a different version.

Shift from DLL to Dot Net Assemblies in Microsoft. NET  DLL contains library code to be used by any program running on Windows.  Dot net assemblies are understandable to only Microsoft. NET and can be used only in.NET managed applications.  Assemblies can maintain versioning with the help of the manifest.  Giving a Strong name to an assembly is a key to avoid DLL Hell.

What is an assembly?  Assemblies are the building blocks of.NET Framework applications.  They contain the definition of types, versioning information for the type, meta-data, and manifest.  They form the fundamental unit of deployment, version control, reuse and security permissions.

How to create a DLL?  A DLL can be created using the following command line statements:  Single-File: csc /out:add.dll /target:library add.cs  Multi-File: csc /out:samlemodule.netmodule /target:module add.cs al /out:MultiFileAssembly.dll /target:library samlemodule.netmodule

Using a DLL…  Using command line statement csc /target:library /reference:add.dll program.cs  Using GUI

Strong Name  Shared assemblies must have a strong name as it is a unique identifier of an assembly.  A strong name consists of the assembly's name, version and culture metadata, plus a cryptographic public key and a digital signature.  Public key is used for validation. sn -k Keyfile.snk This command creates a new pair of keys and stores it in a filenamed Keyfile.snk.

Creating an Assembly Strong Name The following attribute are added to the AssemblyInfo.cs using System.Reflection; using System.Runtime.CompilerServices; [assembly: AssemblyCulture(“en-us")] [assembly: AssemblyVersion(“ ")] [assembly: AssemblyKeyFile(" Keyfile.snk")]

Sharing an Assembly: The Global Assembly Cache  Install an assembly in the GAC gacutil /i mult.dll  Remove the assembly from the GAC gacutil /u math

Demo to secure a dll using a keyfile.

References  US/library/3707x96z(VS.80).aspx US/library/3707x96z(VS.80).aspx   L_Hell.asp L_Hell.asp

Questions??