Please let me know how OCX licenses work.
For an OCX I am getting the below error:
The below control is giving the below error. pvdtb60.ocx
CoCreateInstance of OLE control {FD5CA3F6-52B9-11D2-ABB1-0040054FC6FB} failed. Result code: 0x80040112
The control is already registered with regsvr32.
0x80040112 error code corresponds to CLASS_E_NOTLICENSED.
Please let me know, how the licenses in OCX work and what could be the hack for resolving this. The same program is working on a legacy XP machine and hence I picked all the license entries (from regedit, [HKEY_CLASSES_ROOT\Licenses]) to no avail.
The legacy application was VC6.0 (running on Windows XP properly), the new app is running on Visual Studio 2010.
Thanks.
OCX licensing is a bit of history. I'm going to assume here that you are maintaining a 15-year old internal application, and have a legitimately licensed OCX from a third party supplier which does not exist any more, or you would simply ask them the question instead. (I'm assuming this because the question took me straight back to 1998 and that's what popped straight into my head.)
Any OCX can fail to create with that error code if the license is invalid. It could be using complicated and sophisticated cryptographic validation of machine attributes to validate a licence key stored in the registry.
However, they generally work by looking for a text file, installed in a known location (try Program Files\PRODUCTNAME), and check that it contains the correct text. The text is usually something like "Copyright (C) Contoso Corporation, 1998".
To find out what is actually happening, use SysInternals Process Monitor to monitor the activity of the application as it starts up. If you see a "NOTFOUND" on some file like "license.txt" then you are in luck. All you have to do is put the relevant file from the legacy XP box in the correct location and you are golden.
Worst case scenario, you can probably patch out the license check with NOPs. It is 1998 after all.
User contributions licensed under CC BY-SA 3.0