Sometimes the applications may miss registering the DLL or OCX files, due to which users will face errors and applications won’t work properly. Because of this, users will require to register the files by themselves. The registering and unregistering of the application extension files (DLL or OCX) are done by RegSvr32 utility. In this article, we will teach you how easily you can register a DLL or OCX file in your operating system.
How to Register DLL or OCX file in Windows
Registering a DLL or OCX File in Windows
By registering a DLL or OCX, users are adding the information to theregistryso that Windows can use those files. The information will be in the form of a name or CLSID. This makes it easier for Windows to find the correct DLL or OCX when a function related to it is used within another program. It will contain the path of these files through which the executable code for the component will be used. The information saved in the registry will always refer to the latest version of the component. This is required only in rare cases because in most cases the applications will register these files during installation. It can also be used for therepairing of the Windowsissues that include these files. Some extra parameters that you can add to the commands:
/u– Unregister the DLL or OCX file
/s– Silent mode, it will show no message boxes.
/I– If used without /u then calls DLLInstall(TRUE) to install and If used with /u then calls DllInstall(FALSE) to uninstall the DLL and DllUnregisterServer.
/n– For not calling the DllRegister Server or DllUnregisterServer. This option must be used with /i.
You can only register the DLL or OCX files that are registerable. Some files will have noDLLRegisterServer() functions through which it can register. Those files are ordinary and have nothing to do with registering. An example can be taken from game DLL files that stay in the folder and do their job without getting registered in the first place.
Note: Make sure you already have the DLL or OCX file available before trying these methods.
Using the Elevated Command Prompt to Register a DLL or OCX File
Hold theWindowskey and pressSto open the search function. Typecmd, right-click on it and chooseRun as administratoroption Note: You can also pressAlt + Shift + Enterafter typing cmd in the search function.
Opening elevated command prompt
Now type the command below to register the DLL or OCX file.regsvr32 jscript.dll
Note: jscript.dll is the file name that you can change to whatever file you want to register.
Successfully registered DLL file
You can also register a DLL or OCX file that is located in a different location by typing the following command.regsvr32 C:\Users\Kevin\Desktop\jscript.dll
Registering DLL on a different path
If the file is not registerable then you may get the error as shown below:
Error for not registering
Sometimes the error can be because you are trying to register a 32-bit DLL or OCX file through 64-bitRegsvr32. You need to use the 32-bitRegsvr32that is located in theSyswow64folder.
You can type the following command to register 32-bit DLL or OCX in a 64-bit operating system.%SystemRoot%\SysWOW64\regsvr32 jscript.dll
Registering 32-bit DLL file on 64-bit Windows
You can also use PowerShell with the same commands to register DLL or OCX files.
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.
I hear that there isn't much difference between the two libraries, but there's enough to cause me problems. Does anyone know what I ought to do to modify SSD1306 so that it works with my displays?
I know it's a long shot, but I'd appreciate any help!
Hi luisilva, thanks for responding. That was a handy video! Unfortunately, I can't get my display to work in the same way that the guy in the video did. The reason being that I'm actually using a Spark Core (www.spark.io) to run the display, which has a much more limited library selection than the Arduino. I don't mean to derail an arduino forum, however, which is why I was specifically asking about the differences between the SSD1306 and SH1106 libraries.
At present, using SSD1306 yields the very same issu as this person's:https://github.com/adafruit/Adafruit_SSD1306/issues/14 That's the only place I've been able to find somebody else with the same issue of the screen being filled with junk, btw. However, that person's issues were solved by simply switching to the u8glib. I'd love to do just that, but u8glib isn't compatible with Spark. Hence me trying to figure out a way to modify the existing SSD1306 library to be compatible with my display.
There is only one small difference between SSD1306 and SH1106: The SH1106 controller has an internal RAM of 132x64 pixel. The SSD1306 only has 128x64 pixel.
First problem for standard 128x64 OLEDs with SH1106 controller is: How is the 128x64 window mapped into the 132x64 RAM? It seems, that the 128x64 OLED is centered in most cases within the 132x64 area, that means pixel (2,0) in ram is pixel (0,0) on the display.
For u8glib, the update for the SH1106 was very small. I just had to shift the display by 2 pixel. This is more complicated with the Adafruit lib. Mainly the procedure "Adafruit_SSD1306::display(void)" depends very much on the hardware architecture and assumes, that the width of the RAM area is 128 (which is wrong for the SH1106). I think the procedure Adafruit_SSD1306::display(void) needs to be rewritten completly (including the commands, which are sent).
This then passes the function without executing it first.
Here is an example:
function addContact(id, refreshCallback) {
refreshCallback();
// You can also pass arguments if you need to
// refreshCallback(id);
}
function refreshContactList() {
alert('Hello World');
}
addContact(1, refreshContactList);