[ACXFAQ004]
I'm Having ActiveX Licensing Problems or Errors About Missing Licenses!


This is a common issue, and is due to the fact that licensing information is not getting to the ActiveX control. Most likely, one of the following is the cause...

  1. You are dynamically creating components at runtime.
  2. Your end user is attempting to develop with the controls in an ActiveX development environment.
  3. You installed your finished product on your development system. [Version 2.0.6 SP3 or Lower]
  4. Other possibilities

Cause #1: You are dynamically creating components at runtime.

If you are creating a component at runtime, you will need to embed the license key for each Iocomp ActiveX into your program. If you were to drop the control onto a form at design-time, the license key is embedded into the executable automatically by your development environment. If you wish to dynamically create the control at run-time, you will need to specify the control's license key. This is required as you are not allowed to distribute our development licenses to your end users per our software license agreement.

Visual C++ 6 Example (Disp Interface)
//Add to the top of your form
#include "iplotx.h"
int IDiPlotX1 = 100; //make sure this is a unique value in your application

//Add somewhere in your initialization code
//usually in your OnInitDialog Event Handler

CRect ComponentRect;
CString LicenseString = "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}";

BSTR LicenseKey = LicenseString.AllocSysString();
ComponentRect.SetRect(10,10, 640, 380);

m_iPlotX1.Create("Plot", WS_VISIBLE, ComponentRect, this, IDiPlotX1, NULL, FALSE, LicenseKey);
 
Visual C++ 6 Example (iDispatch Interface)
//Add the following to the top of each file that will use the iDispatch pointer variable
#import "iPlotLibrary.tlb" named_guids
#include "atlbase.h"
extern CComModule _Module;
//************************************************************
//Define a unique ID for the component, usually located in resource.h
//or you can use integer variables or other ways of storing these values
#define IDC_IPLOTX1 1001
//************************************************************
//Declare the component variable pointer,
//usually somewhere globally, such as in your form header file.
CComPtr<iPlotLibrary::IiPlotX> m_iPlotX1iDispatch;
//************************************************************
//Place the following code where you want to create the component
CWnd *m_Wnd=new CWnd;
IUnknown* m_iUnknown;
CRect ComponentRect;

ComponentRect.SetRect(10,10, 650, 490);
CString LicenseString = "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}";
BSTR LicenseKey = LicenseString.AllocSysString();

//The GUID below is the control guid of the iPlotX control.
//You can find a listing of these values in our Internet Explorer Examples
//at
http://www.iocomp.com/examples/controlguids.htm
m_Wnd->CreateControl("{1791C036-8981-492A-BD28-F2331BC9B7C7}", NULL, WS_VISIBLE, ComponentRect, this, IDC_IPLOTX1, NULL, FALSE, LicenseKey);

m_iUnknown = m_Wnd->GetControlUnknown();
m_iUnknown->QueryInterface(__uuidof(iPlotLibrary::IiPlotX),(LPVOID*)&m_iPlotX1iDispatch);

//Setup Chart Properties
m_iPlotX1iDispatch->AddChannel();
m_iPlotX1iDispatch->TitleText = "iDispatch Component";
 
Visual Basic 6 Example
Private WithEvents extCtl As VBControlExtender

Private Sub Form_Load()

Licenses.Add "isAnalogLibrary.iKnobX", "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
Set extCtl = Form1.Controls.Add("isAnalogLibrary.iKnobX", "iKnobX1")

extCtl.Visible = True 'The control is invisible by default.
extCtl.Object.Position = 100 'This is how you access properties and methods

End Sub

Private Sub Form_Unload(Cancel As Integer)

Form1.Controls.Remove "iKnobX1"
Set extCtl = Nothing

End Sub
 

VB.NET Example
Dim WithEvents axiAngularGaugeX1 As AxisAnalogLibrary.AxiAngularGaugeX

'This example shows creating the component when a button is clicked
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  axiAngularGaugeX1 = New AxisAnalogLibrary.AxiAngularGaugeX
  Dim f As System.Reflection.FieldInfo
  f = GetType(AxHost).GetField("licenseKey", _
  Reflection.BindingFlags.NonPublic _
  Or Reflection.BindingFlags.Instance)
  f.SetValue(axiAngularGaugeX1, "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")

  Controls.Add(axiAngularGaugeX1)

  axiAngularGaugeX1.Left = 100
  axiAngularGaugeX1.Top = 10
  axiAngularGaugeX1.Width = 275
  axiAngularGaugeX1.Height = 275
  axiAngularGaugeX1.Show()
End Sub
 
C#.NET Example
private AxisAnalogLibrary.AxiAngularGaugeX axiAngularGaugeX1;

//This example shows creating the component when a button is clicked
private void button1_Click(object sender, System.EventArgs e)
{
  axiAngularGaugeX1 = new AxisAnalogLibrary.AxiAngularGaugeX();
  System.Reflection.FieldInfo f = typeof(AxHost).GetField("licenseKey", System.Reflection.BindingFlags.NonPublic |   System.Reflection.BindingFlags.Instance);

  f.SetValue(axiAngularGaugeX1, "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}");
  Controls.Add(axiAngularGaugeX1);

  axiAngularGaugeX1.Left = 100;
  axiAngularGaugeX1.Top = 10;
  axiAngularGaugeX1.Width = 275;
  axiAngularGaugeX1.Height = 275;
  axiAngularGaugeX1.Show();

  //To attach an event handler, set the event property as follows.  For example,
  //For the OnPosition Change event...
 
axiAngularGaugeX1.OnPositionChange += new EventHandler(axiAngularGaugeX1_OnPositionChange);
}

private void axiAngularGaugeX1_OnPositionChange(object sender, EventArgs e)
{
  //Add OnPositionChange event handler code here
}
 

Note: you will need to substitute {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} above with the actual license key. See below for information on obtaining these keys from your system.


VB Special Note: In VB 6, if you add a control to the control pallet or reference the ocx file in the project, then you won't need to pass along the license key.  Be sure that your VB 6 project isn't referencing the OCX either in your project options or in your component pallet, or VB 6 will not be able to add the license since it has already been added. If you need to dynamically create components at runtime and your project references the OCX, then skip the "Licenses.Add" method.


Obtaining License Keys for ActiveX Components Version 3.x, 2.0.8 SP4 or Higher

If you are using Iocomp Components Version 2.0.8 SP4 or higher, you can find the license keys for each Iocomp Component that you have purchased inside the Windows Registry at the following key...

HKEY_LOCAL_MACHINE\Software\Iocomp\Keys

Each license key is associated with its class name. For example, to get the license key for the iAngularGaugeX component, look for the value named "TiAngularGauge". (Notice the "T" in front on the class name and the absence of the trailing "X")


Obtaining License Keys for ActiveX Components Version 2.0.6 SP3 or Lower Versions

You can get the license key for the knob control used in this example by opening the LIC file (located in c:\program files\iocomp\components\activex, or wherever you installed your components) for the Analog Pack and using the key on the third line (e.g. {12345678-9012-3456-7890-123456789012}).

NOTE: You can use the Microsoft-supplied Licreqst.exe Tool to obtain the license key for any ActiveX component licensed on your development system: http://support.microsoft.com/default.aspx?scid=kb;EN-US;151771

The following tables detail the order in which license keys can be found in each library's corresponding LIC file...

isAnalogLibrary isDigitalLibrary
  1. iAnalogDisplayX,
  2. iAnalogOutputX
  3. iKnobX
  4. iAngularGaugeX
  5. iLinearGaugeX
  6. iThermometerX
  7. iSliderX
  8. iLedBarX
  9. iLedSpiralX
  10. iOdometerX
  11. iSevenSegmentAnalogX
  12. iGradientX
  13. iLabelX
  1. iLedRectangleX
  2. iLedRoundX
  3. iSevenSegmentBinaryX
  4. iSevenSegmentCharacterX
  5. iSevenSegmentClockX
  6. iSevenSegmentHexadecimalX
  7. iSevenSegmentIntegerX
  8. iSwitchLedX
  9. iSwitchToggleX
  10. {Not Currently Used}
  11. iSwitchRotaryX
  12. iSwitchSliderX
iProfessionalLibrary iStripChartXControl
  1. iLedMatrixX
  2. iLedArrowX
  3. iSevenSegmentClockSMPTEX
  4. iObjectCanvasX
  5. iPanelX
  6. iLedDiamondX
  7. iSwitchQuadX
  8. iSwitchLeverX
  9. iSwitchRockerX
  10. iSwitchRocker3WayX
  11. iLogGaugeX
  12. iAngularLogGaugeX
  13. iTimersX
  14. iPieChartX
  15. iPercentBarX
  16. iRotationDisplayX
  17. iCompassX
  18. iSpectrumDisplayX
  19. iPhonePadX
  20. iThreadTimersX
  21. iDualCompassX
  22. iSlidingScaleX
  23. iSlidingCompassX
  24. {Not Currently Used}
  25. iKeyboardX
  1. iStripChartX
iPlotLibrary  
  1. iPlotX
  2. iXYPlotX

Refer to the following Microsoft MSDN documents for additional assistance with licensing issues with ActiveX controls...

For information on licensing ActiveX controls in Internet Explorer, review our Internet Explorer Example in our Examples Section.


WARNING!: under our  license agreement, you are not allowed to distribute the LIC (license) files or the LIC registry keys to your end user's computers. License keys must be embedded in the program either automatically by the development environment or inside of your own source code.

WARNING!: if you are generating composite components with our controls (Components based off of our components), you may be running into a situation with our license agreement that may require a royalty agreement with Iocomp Software. Please contact Iocomp Support to discuss licensing issues regarding composite components and if royalties apply in you situation.  Also See General FAQ #1.


Cause #2: Your end user is attempting to develop with the controls in an ActiveX development environment.

This generally happens if you allow your end user to make modifications to source code files, and they open up your development project or workspace. Please contact Iocomp Technical Support to discuss this issue.


Cause #3: You installed your finished product on your development system (Version 2.0.6 SP3 or Lower)

You installed your finished product on your development system, and can no longer develop with our ActiveX controls. When this happens, our ActiveX OCX files have usually been copied to and registered in the Windows System or System32 directory. To fix the problem, either copy your license files to the location where your installer registered our ActiveX controls (Note: if you do this and upgrade to a newer version of our components, the update components will be placed in our "C:\Program Files\Iocomp\Components\ActiveX" folder and re-registered. Please only keep one copy of our OCXs on your computer at any-one-time to prevent possible conflicts), or open our Setup Program from the Add/Remove control panel and select the REPAIR option to re-register the controls that are located with your license files.


Cause #4: Other possibilities

View other FAQs for other issues that may be causing this problem.

If you are using a beta version of our components, then you may be receiving a "Beta Expired" message after a certain date. To fix this, simply download the latest update or contact Iocomp Support for an update.


Copyright ©1998-2007 Iocomp Software Incorporated. Iocomp and the Iocomp Logo are registered trademarks of Iocomp Software Inc. All other trademarks are registered by their respective owners.