11.1. License considerations

Generally there are two different approaches to use a Barcode ActiveX control in your application. You can create the control by inserting it into a dialog/form; or you can create the object at background. Those two scenarios have different license implications. Most programming environments understand the license protocols well. When you insert the control to a dialog or a form, the programming environment retrieves the run-time license from the control and embed it into the dialog/form resource. When the application runs on another computer, the barcode object is then created with the embedded license key. This whole process is transparent to the developer and end user.

Your application can also create the barcode object at background. Unfortunately you have to pass the license key manually in this scenario if you need your application to run on a computer without design time license installed. If you are programming in C++, your application should call IClassFactory2::CreateInstance and pass your LicenseToas the license key. Note that it is much difficult to use this approach when you work in some environments, such as classic Visual Basic. When this is the case, you can get around it by inserting the control into a dialog/form and making it hidden. When you need to use the control, just retrieve the interface pointer from the hidden control. In this way you let the programming environment handles the licensing issue for you and you concentrate on the feature development.

In scripting environment, such as ASP and PHP, the computer must have the design-time license available in order to create the contorl. In those scenarios, the computers running your script must get their single user/network server licenses separately.