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!

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
David Laing
  • 7,605
  • 10
  • 33
  • 44

4 Answers4

13

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.

MarkJ
  • 30,070
  • 5
  • 68
  • 111
  • 1
    Neither link comes up on https://web.archive.org/. But the second part about the form was a very useful tip. – StayOnTarget Aug 11 '20 at 15:01
  • 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" is useful for finding KB articles on Google if you know the number, and the number was part of those old links. – MarkJ Aug 12 '20 at 13:42
  • Good fix! I wish Jeff's copies came up more often when searching for the KB #s. – StayOnTarget Aug 12 '20 at 13:43
  • Hint: Microsoft and "KB" is useful for finding KB articles on Google if you know the number, and the number was part of those old links – MarkJ Aug 12 '20 at 13:44
  • I thought I had tried that... I will make sure to next time I need a missing MSFT article (sadly, often). Thanks – StayOnTarget Aug 12 '20 at 13:45
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".

John Saunders
  • 160,644
  • 26
  • 247
  • 397
  • 2
    I have no experience with VB6 or anything related, but this is a rock awesome answer! – blwy10 Jan 27 '10 at 04:42
  • @blwy10: thanks, that's an "old dog" trick. We used to have no choice but to debug things this way. – John Saunders Jan 27 '10 at 04:50
  • 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... – David Laing Jan 27 '10 at 04:51
  • @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. – Mike Spross Jan 27 '10 at 05:55
  • 1
    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? – John Saunders Jan 27 '10 at 10:14
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.

User51
  • 887
  • 8
  • 17
1

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

Qaim
  • 11
  • 1