Microsoft KB Archive/215353

= FIX: Licensing Problems in Third-Party ActiveX Controls with VJ6 =

Article ID: 215353

Article Last Modified on 6/14/2006

-

APPLIES TO


 * Microsoft Visual J++ 6.0 Standard Edition

-



This article was previously published under Q215353



SYMPTOMS
When you try to dynamically create a third-party ActiveX control built with Visual J++ 6.0, the following error message appears:

The evaluation period will expire in  day(s).



CAUSE
When you implement some third-party ActiveX controls, the control assumes that the control should run in an evaluation mode if no software license exists on the current computer. This conflicts with the current Windows Foundation Classes for Java (WFC) logic.

The current Windows Foundation Classes for Java (WFC) logic retrieves a license for the control through resource information that is included with the control. If the control does not have a license registered on the specific computer, the retrieved license in Windows Foundation Classes for Java (WFC) is used during the execution of the application. However, during the check for a registered machine license some controls go one step further and automatically assume an evaluation mode instead of waiting for the license to be passed.

NOTE: These same controls do not exhibit this problem when you use Visual Basic because the license that is initially retrieved is always used and it does not check for a registered machine license.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



Steps to Reproduce Behavior
 Create a default Visual J++ 6.0 Windows Application Project, Project1. Add a third-party ActiveX control to Form1. On the File menu, click Add Project... and click Visual Studio.Distribution Units to create a default Self-Extracting Setup project, Setup1. Create this new project in the Project1 folder. In the Project Explorer window, right-click Setup1, click Add Project Outputs..., and click Project1. Notice that Outputs of Project1 now appears below Setup1. Right-click Setup1, click Add Item..., and add the necessary third-party .ocx files to the project. Right-click Setup1, click Setup1 Properties..., click the Target tab, select the Create an entry in the Start Menu check box, and do the following: <ol style="list-style-type: lower-alpha;"> Rename the Shortcut name to Project1.</li> Change the command line program to read <AppDir>\Project1.exe .</li> Clear the Argument text box.</li> Click Apply.</li></ol> </li> Click the Microsoft System Libraries tab, click Microsoft virtual machine, click Apply, and click OK.</li> On the Build menu, click Build Solution to compile Project1 and package it in the self-extracting project Setup1. Note that Project1.exe and a setup project, Setup1.exe, are now in your original project directory.</li> Copy Setup1.exe to another computer where the third-party ActiveX control is not licensed. NOTE: Make sure the Microsoft virtual machine build on that computer supports Windows Foundation Classes for Java (WFC).</li> On the Start menu, click Project1.</li></ol>

RESULT: The error occurs.

<div class="references_section">