Object Oriented Programming - DLLs<br />Advanced Visual Basic<br />
Overview<br />A dynamic-link library (DLL) is an executable file that acts as a shared library of functions. Dynamic linki...
Where you see DLLs<br />DLLs (direct link libraries) are used throughout the Windows operating system.  <br />You can find...
Why use DLLs?<br />Research Question: <br />Why is it advantageous to use DLLs in programming?<br />
Why use DLLs?<br />DLLs can be used for many purposes including:<br />Sharing of resources<br />Reduction of hard disk sto...
Creation of a DLL<br />DLLs can be created easily through Visual Basic.  <br />Create a new class library<br />Create a pu...
Use a DLL<br />DLLs can be used in Visual Basic by adding them as a resource to an application.<br />Click Project<br />Ad...
DLLs<br />Research Question: <br />Where might you use a DLL?<br />
Additional Information<br />For additional information about these topics, please the links provided in Blackboard.<br />
Upcoming SlideShare
Loading in …5
×

Advanced VB: Object Oriented Programming - DLLs

1,521 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,521
On SlideShare
0
From Embeds
0
Number of Embeds
64
Actions
Shares
0
Downloads
20
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Advanced VB: Object Oriented Programming - DLLs

  1. 1. Object Oriented Programming - DLLs<br />Advanced Visual Basic<br />
  2. 2. Overview<br />A dynamic-link library (DLL) is an executable file that acts as a shared library of functions. Dynamic linking provides a way for a process to call a function that is not part of its executable code. The executable code for the function is located in a DLL, which contains one or more functions that are compiled, linked, and stored separately from the processes that use them. DLLs also facilitate the sharing of data and resources. Multiple applications can simultaneously access the contents of a single copy of a DLL in memory.<br />
  3. 3. Where you see DLLs<br />DLLs (direct link libraries) are used throughout the Windows operating system. <br />You can find many DLLs in the c:WindowsSystem32 directory on your computer<br />
  4. 4. Why use DLLs?<br />Research Question: <br />Why is it advantageous to use DLLs in programming?<br />
  5. 5. Why use DLLs?<br />DLLs can be used for many purposes including:<br />Sharing of resources<br />Reduction of hard disk storage space requirements<br />Easier updates of applications<br />
  6. 6. Creation of a DLL<br />DLLs can be created easily through Visual Basic. <br />Create a new class library<br />Create a public sub in the class library to be accessed by another application<br />Save<br />Click Build DLL<br />Public Class Class1 Public Sub HelloWorld()MsgBox("Hello world") End SubEnd Class<br />
  7. 7. Use a DLL<br />DLLs can be used in Visual Basic by adding them as a resource to an application.<br />Click Project<br />Add Resource<br />Browse for the DLL file you created<br />Add code to your application to access the DLL code<br />Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim t As New Class1t.HelloWorld()End Sub<br />
  8. 8. DLLs<br />Research Question: <br />Where might you use a DLL?<br />
  9. 9. Additional Information<br />For additional information about these topics, please the links provided in Blackboard.<br />

×