Method AutomationObject():requestLicenseKey() Foundation
Requests the license key of a COM/ActiveX component.
:requestLicenseKey( <cProgId> | <cCLSID> ) --> cKey
The function returns the license key required for creating the COM/ActiveX component. An empty string ("") is returned if the COM/ActiveX component does not require a license.
Some COM/ActiveX components require a license key for being created. A license key is a character string that must be passed to functions such as CreateObject() or methods such as XbpActiveXControl:Create().
If a licensed COM/ActiveX component is installed on a computer, the control's license key can be queried using the class method :requestLicenseKey(). The character string returned by this method can then be pasted into .PRG code or used at run-time to create instances of the COM/ActiveX component.
The licensing scheme may vary with the vendor of the COM/ActiveX component in question. However, in most cases the license obtained by the application developer also needs to be shipped with the Xbase++ application. Generally, a COM/ActiveX component that needs a license key to be specified for usage on a development machine also needs a license to be supplied on a client machine. In this case, the character string with the license key must be incorporated into either the application's source code, or it must be defined in the application's resource. In both cases, the method :requestLicenseKey() can be used to determine the license key string for the COM/ActiveX component.
Please note that some vendors of COM/ActiveX components distinguish between licenses obtained for development and those valid for installations on client machines. This means that even though the developer obtained a so-called design-time license for usage in a development environment, the object may still have to be registered after installation on a client machine. In this case, a special run-time license may have to be acquired. Please consult the documentation that comes with your specific COM/ActiveX component or control to learn which licensing scheme is applied by the object's vendor.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.