Getting VB6 to reveal which component doesn't have a design time license installed
Asked Answered
E

4

8

I've inherited a VB6 project that I'm trying to "Make".

The build fails on the "Making EXE" step with a licensing error:

License information for this component not found. 
You do not have an appropriate license to use this functionality 
in the design environment.

How can I figure out which component is missing the license?

The project has about 15 references; a mixture between commercial and Microsoft. I've installed development versions / licenses for all the obvious references - and checked that I can compile their sample apps successfully.

Of the remaining 13 odd references; how I can get more information as to which component is throwing the licensing error?

Any tips / techniques on how to get a more verbose error message would be greatly appreciated!

Erythroblast answered 27/1, 2010 at 4:34 Comment(0)
L
14

It's worth trying both the Microsoft fixes - one and two - for this error, in case you've run into one of the known issues.

If that doesn't work, open the form designer for every single form in the VB6 IDE. Look out for an error message box on displaying a form. When this error is displayed, the IDE writes a log file formname.log that gives more information on which control caused the problem.

Lacustrine answered 27/1, 2010 at 9:54 Comment(6)
Neither link comes up on web.archive.org. But the second part about the form was a very useful tip.Galloot
Thanks @UuDdLrLrSs for pointing out the broken links! Drat you Microsoft and your obsessive decluttering of older KnowledgeBase articles! But kudos to Jeff Parsons for putting them on GitHub!... I edited the links into the answer... Hint: "KB<number>" is useful for finding KB articles on Google if you know the number, and the number was part of those old links.Lacustrine
Good fix! I wish Jeff's copies came up more often when searching for the KB #s.Galloot
Hint: Microsoft and "KB<number>" is useful for finding KB articles on Google if you know the number, and the number was part of those old linksLacustrine
I thought I had tried that... I will make sure to next time I need a missing MSFT article (sadly, often). ThanksGalloot
download.microsoft.com/download/VB60Pro/Install/2/Win98/En-US/…Puffy
K
3
  1. Create a new, empty application with all the same references
  2. Confirm that you still have the same problem
  3. Delete the second half of the references
  4. If you still have the same problem, then the problem is with the references which remain. Go to 3
  5. If not, then the problem is with the references you deleted. Put them back. Delete one half of those you put back. Go to 2.

Basically, just a binary search, except it's really "binary delete".

Koster answered 27/1, 2010 at 4:38 Comment(5)
I have no experience with VB6 or anything related, but this is a rock awesome answer!Nath
@blwy10: thanks, that's an "old dog" trick. We used to have no choice but to debug things this way.Koster
I tried the "create empty solution with same references" technique. Irritatingly it compiles with no errors; leading me to suspect that I have to actually use a component from the reference before the license gets invoked. My problem is that I don't know what components come from which references...Erythroblast
@David Laing: It's also possible that the unlicensed component is on a form. Form controls are referenced by the individual forms that use them, and won't show up under Project References. Therefore, you may also want to open up each form in the project. If there is an unlicensed control on a form, it will error out when you open that form in the IDE for the first time, if I remember right.Foraminifer
Sorry, I meant to mention forms - you'll at least need to create dummy forms with the same controls. Hopefullly, you'll see the error when you open the individual form that has the problem - had you not tried that before?Koster
P
2

All of the links of all of the answers are broken... And, some of us are still trying to either maintain or convert old VB6 applications (or both).

A somewhat useful tool was Process Monitor by Mark Mark Russinovich of Microsoft (it is sourced directly off of Microsoft.com and has been around for years). It allows you to monitor all resources used by the computer system wide, and allows you to filter that down to individual resources, processes, etc.

The useful bit is to start the program, and click the "Filter" button from the toolbar (Ctrl-L). From there, you need to add a rule. Select Path that begins with and that should be to the value "HKCR\Licenses". That is in the HKEY_CLASSES_ROOT section, where the Active-X components licensing information is. These should be set to Include.

Click Ok, and then click Clear on the toolbar (Ctrl-X) to clear all current events to reset the state. Events should already be populating that match that rule.

Then, invoke your build. To cut down on clutter, I used the command:

"C:\Program Files (x86)\Microsoft Visual Studio\VB98\vb6.exe" /make <project file> /outdir <exe dest dir>

Once the compile runs, the build should fail with the same message, but simply open the Process Monitor, and you can see that last key that tried to read and failed. The UUID that says not found is the UUID where the license should reside.

From there, you can:

  1. If your license allows, copy that value from a working PC and install it into the failing PC.
  2. Google that ID, to see if there are instructions on how to obtain the correct license (such as install it from one of the .REG files from the installation media)
  3. Obtain and install the license some other way

While it doesn't tell you exactly what component corresponds to that UUID, it at least lets you get the specific UUID that is failing, which is further than any of the other current answers can do in their current state.

Peruse answered 24/3, 2020 at 23:56 Comment(3)
Thanks mate! I had almost given up due to lack of resources, but this post was spot on.Sisely
Hi @Peruse thanks for your comment. I've tried what you suggested and strangely nothing is failing or not found in process monitor. It appears to be hitting the same two locations in the registry multiple times with a success result on each hit except for the Length (query I guess you could call it? It's under the Detail column) which for each location is 49 and the result is buffer overflow. My app meanwhile has failed to load and is complaining about license not found.. Have you any idea what this means?Upperclassman
@Upperclassman So, the registry Query is resulting in a "Buffer Overflow" error, as reported by Process Monitor? If I understand correctly, that would likely mean that the value in that key is somehow corrupt, too large, etc. I would begin by going to that location in the registry (regedt32 + be careful) and seeing what's there. If possible, compare to a working computer, etc. You could always BACK UP the value it's reading, change it ("be careful"), and then just as careful, replace the orig when done. Try a few things and see..?Peruse
C
1

Try This http://support.microsoft.com/kb/194751/EN-US It will fixed VB6.0 Design Time License

Comber answered 15/3, 2014 at 10:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.