License error with ActiveX control added at run-time (192693)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q192693 SYMPTOMS
If you create an application that uses an ActiveX control that you add at
run-time with syntax similar to the following:
THISFORM.AddObject("myctrl","olecontrol","mscomctllib.listviewctrl.2")
Then you build this application into an executable file, create a
distribution with the Setup Wizard or InstallShield Express for Visual FoxPro Edition, and install your application on other
computers, when you attempt to run code similar to the preceding code you
receive an error like the following:
Program Error
OLE error code 0x80040112: Appropriate license for this class not found.
CAUSE
A distribution created with the Visual FoxPro Setup Wizard or InstallShield Express only allows a
run-time license, while the AddObject method requires a design time
license.
RESOLUTION
Add the control you want to use into a class that is saved in a Visual
Class library or into a class created with the DEFINE CLASS command. Next,
add an instance of the class at run-time instead of adding the control.
Please see the "More Information" section for details.
In Visual FoxPro 7.0 and later see the "AddObject" Help file topic for a workaround in those products.
Modification Type: | Major | Last Reviewed: | 2/24/2005 |
---|
Keywords: | kbbug kbcode kbpending KB192693 kbAudDeveloper |
---|
|