WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Dialog Editor version 6.X
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

COMCONTROL Licenses Explained


For "VB"/"OCX" controls there are often end user licenses and machine licenses. MSFT sometimes refers to the latter as "design time" licenses. The design time license is usually installed when you install some other product. It consists of registry settings under HKEY_CLASSES_ROOT\Licenses\ and HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Licenses\

The license GUIDs under these keys are not the same as the classid for the respective controls. The connection is made between the GUIDs (license GUID and classid GUID) in the class factory interface of the control.

In VB when you early bind to controls the license is embedded for you. When you late bind to a control, you generally have to dynamically add the license using a license object. However, this only applies to some (usually VB/OCX) controls. Other controls may use a license file, license string or the system license manager mechanisms. Some controls support several of these licensing schemes or non at all.

Of course WB has no issues when a design time license is present. Dynamic licensing is supported as long as you have a license string or a license file. Usually all you need to do is put the license string in the "license string" attribute of the control description string. If you use a blank string "", the control will look for a license file, assuming the control was implemented to support license files.

What I cannot advise about is how to handle "VB" controls when a machine does not have a "design time" license. The obvious solution it to add the license to the registry but I am not sure if this is exactly kosher.

This topic is touched on in the WB help file but I will take a closer look at VB controls like the common controls or FlexGrid and report back.


The Licreqst.exe sample demonstrates how to request the License key of an object

On the license front, we discovered a MSFT example application that extracts the run-time license string from ActiveX controls. We have tried it on one or more MSFT ActiveX controls and it seems to work OK.

The files can be found at

http://support.Microsoft.com/default.aspx?scid=kb;en-us;Q151771

The download file is a self extracting zip. It contains the compiled exe, the Visual Studio 6.0 project, and the cpp source. The only thing you need is the exe unless you are curious.

The part of the program's output you need looks something like this

/*
{E5F63BB3-D2A6-11D3-85C2-07A0CC3A58CA}
*/
Place the information between the braces in the license string field of a COMCONTROL's attribute string making sure not to include the braces, forward slashes, nor the asterisks. For a hypothetical control, it would look something like this
; On one line
MyDialog001=`111,028,033,033,COMCONTROL,"E5F63BB3-D2A6-11D3-85C2-07A0CC3A58CA","something.something",DEFAULT,4,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
While I have not confirmed this, I suspect that the tool will only work when you have a "design-time" license so just having a control on your system may not be sufficient to extract the license.

Keep in mind that Licreqst.exe is just a MSFT sample program. Also, WB may get it's own license extraction mechanism but no decision has been made on this.


VBUSC.EXE Provides Licensing for Discontinued Controls

VBUSC.EXE is a file that installs the Design-Time Licenses for ActiveX controls that shipped with earlier versions of Visual Basic, but are no longer supported and have been discontinued with the current version.

http://support.microsoft.com/kb/195353/en-us/


Article ID:   W16914
File Created: 2007:07:03:14:27:04
Last Updated: 2007:07:03:14:27:04