How to – Register a DLL

On Microsoft Window’s operating systems, a DLL stands for Dynamic Link Library. DLL’s are relatively small files that include a library of functions- usually data that can be shared across multiple applications. DLL’s are called upon by various applications and can be loaded and utilized by these applications concurrently.

Registering a DLL

There are two easy ways that a DLL can be registered in your Window’s operating system’s registry, the first is the simplest, known as self registering files, the second way is to manually register a DLL.Self Registering Files
It should be noted that many DLL files are self registering, they include information required to store themselves in the operating system’s registry. As the name states, self registering files require no human intervention.

Self registering files will automatically store themselves on your machine and become accessible when needed. Besides DLL files, other types of files that are sometimes self registering include .EXE and .OCX.Manually Register Files
The second method used to register DLL files on your computer is via manual registration. Manually registering a DLL file is quite simple and can be done in only a few steps.The first step is turn on your computer, launching your Window’s operating system. Once your Window’s operating system has loaded completely, click on Start and then click on Run. In the third step, you will input in the Run field a command that tells your computer to register the DLL file. You will need to input specific information including the path and the file name. The following is a template for the command: regsvr32 “\FileName.dll”

It is important to note that path is the actually location or directory of where the file is located. Filename is obviously the name of the DLL file you will be registering. Below is a sample command: Regsvr32 “C:\Windows\System32\example.dll” Once the command is input into the Run field correctly, press Enter. Once the DLL has been registered, you should receive a confirmation in the form of a pop up box. This message will list your newly registered DLL file and confirm that is was successfully registered into the registry.

Advertisements

Assigning a Strong-Name Key to the Class Library

In attempting to Deploy a Workflow Template for Testing, the assembly DLL containing workflow foundation programs associated with a workflow template be installed in the GAC prior to use. 

That means that you must add a signing key to your assembly project so that its output assembly DLL is built with a strong name.

It this case, I have adopted the policy of signing with a string value of my last name and the present date.
To assign a strong-name key

1.    In Solution Explorer, right-click the bold project name that is in bold type, and then select Properties.
2.    Click the Signing tab.
3.    Select the Sign the assembly checkbox.
4.    From the Choose a strong name key file: combo box, select <New…>
5.    In the Create Strong Name Key dialog box, in the Key file name: text field, enter a string value.
6.    Clear Protect my key file with a password, and then click OK.
7.    Close the Signing window.
8.    From the Build menu, click Build Solution.
9.    From the File menu, click Save All.