Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement Studio 8.5 + WiX + ActiveX Graph Control + License issues

Hello,

 

I am using WiX to build an install kit for my project. I have it including all these merge modules that are needed to correctly run the CWGraph ActiveX control from Measurement Studio. However, the licensing does not get included in the install kit. So, when I run my applicaiton on the target machine it runs in Evaluation Mode. Surely, someone has encoutered this issue before, what is them magic I need to perform to get the licenses sorted out in the install so it runs fine on the target machine?

 

Thanks,
Matthew

0 Kudos
Message 1 of 8
(8,227 Views)

Hello Matthew,

 

It is important that the version of Measurement Studio controls distributed to the deployment computer match the version used to create the executable in the design computers IDE. This type of inconsistency can occur when taking a previously created deployment kit and just updating the executable without rebuilding the whole project.

When a project with older versions of the ActiveX controls gets opened on a computer with a more recent version of the controls they get silently updated. Therefore an inconsistency will exist between the prebuilt setup project and the updated exe. This makes it imperative to rebuild the whole project.
Also, it sounds like you are including all the merge modules necesssary but just to be sure, here is a KnowledgeBase that might be useful:
With warm regards,

David D.
0 Kudos
Message 2 of 8
(8,193 Views)

David,

 

This is a good point. However, I am referencing the ActiveX control via VBA and not via traditional C++ code.Thus there is no recompiling needed. Is there something special I need to do in this instance? Also, on the machine I have the full blown Measurement Studio installed I do not see the "Evaluation Mode".

 

Any ideas?

 

Regards,

Matthew

0 Kudos
Message 3 of 8
(8,189 Views)

Hi Matthew,

 

I wanted to first be clear on the fact that Measurement Studio controls are not officially support with VBA. By supported I mean that we don't perform any testing of this scenario and thus we can't guarantee that all features will work. However, with that being said, VBA can use ActiveX controls and as such, I do expect our controls to work properly.  

 

WiX shouldn't have any affect at all on the ActiveX components being installed so I don't think that is causing the behavior you are seeing.  The way that licensing works with ActiveX controls is that whenever you drag-and-drop an ActiveX control onto a form, the license information becomes embedded in the form. So when you distribute, all you needs is the ActiveX control along with your application. So if you were in evaluation mode when you built your application, the evaluation license contents would have been embedded in your application. Thus producing evaluation messages on your target system. However, I don't think that is your scenario.

 

What I think is going on is that maybe you are programmatically creating the ActiveX controls in your VBA script. In this scenario, there is no license information being assocated with your application and thus we think you are running in evaluation mode. To fix this issue, you need to include a run-time license string in your source code. Refer to the How Do I Create Controls Dynamically in Microsoft Visual C++ When Using MFC without the Demo Mode Me... KB which explains this concept.

 

Now, if the above "guess" of your scenario is incorrect, then something else is going on.  

 

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 4 of 8
(8,174 Views)

Hello Jonathan,

 

The controls work great via VBA for our needs. The only issue I seem to be having is licenses issues.

 

So, I made a new document and embeded the CWGraph control into the document from the machine with a MStudio 8.5 installed. Then I took that saved document over to another machine without MStudio installed and the component runs in Evaluation Mode as I have been seeing before. (This was just a fresh from scratch test to verify what I was saying).

 

I read over the KB article and seems like it would be applicable, but the problem is I only have access to the CWGraph object via its COM/ActiveX interface. Furthermore, I am not sure how the object is getting created/stored within this document I am using (I assume it pretty standard here, as it saves all the properties correctly). I looked at the COM interface and there does not seem to be a method to apply a license to an object after it has been created. Also, I do not even see a method to apply the license if I attempt to manually create the object as well. I'm not terribly familiar with VBA as it is, but I know we were able to embed the control into the document and set all the properties easily enough and everything worked.

 

Does the license string paramters only exist in the C++ ::Create and ::CreateControl methods?  Is there another interface I can access via VBA to add this license to the target machine? Are there any other files/registry keys I can include in the install kit to fix the licenses? Any other ideas/comments?

 

Thanks,
Matthew

0 Kudos
Message 5 of 8
(8,171 Views)

Hi Matthew,

 

We are both assuming that you do have valid licenses on that system which I hope is correct. If you had time to validate that assumption, just simply drop the control on a VB or C++ form, build the EXE, then copy the EXE along with the associated ActiveX control to a target system and run it. 

 

Well, the question regarding if VBA has the equivalent is one that I'm not positive on. I do know that VB 6 provided the Licenses.Add method that you are supposed to used for dynamically adding controls with license information. This may or may not be available in VBA so this is something you need to check into. Refer to the Microsoft How To Dynamically Add Controls to a Form with Visual Basic 6.0 article along with the How to dynamically add ActiveX controls that require run-time licenses in Visual Basic .NET or in Vi... article. The second one briefly mentions the License.Add method. 

 

For distribution requirements, you can visit the Distributing Measurement Studio ActiveX Applications KB which outlines dependencies that you will need to include in your WiX script. If you installed C++ support for Measurement Studio, you can visit the Measurement Studio Visual C++ Merge Modules page which contains the latest information on needed files for deployment.

 

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 6 of 8
(8,158 Views)

Jonathan,

 

I can not seem to find a way to dynamically add a licenses to the ActiveX control from within the VBA code. VB.Net seems to have the Licenses.Add that you mentioned, but alas there is nothing similiar within VBA. There is one possible solution to using the ActiveX control but it is not ideal, to say the least.

 

It involves making a new "wrapper" ActiveX control and embedding your ActiveX control in it. Then configuring your ActiveX control how I want it to appear in my VBA enabled application. When I create the new ActiveX control it will properly store the licenses information in it and consequently when I embed it in my VBA application it will work properly. The down side here is if I want to configure the ActiveX control I need to go back and modify my "wrapper" ActiveX control and recompile it as I will not be able to edit it from within my VBA enabled application.

 

Does that make sense? That is sort of a last ditch attempt though as it complications the development quite a bit.

 

Regards,

Matthew

0 Kudos
Message 7 of 8
(8,112 Views)

Hi Matthew,

 

That solutions sounds fine and looks to be your only option. These types of limitations (and non-tested scenarios) are reasons why we don't support VBA.  I'm actually suprised that VBA doesn't offer these methods but I guess Microsoft chose to go this route and thus hoping to move people toward .NET.

 

Anyway, that should work.


Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 8 of 8
(8,105 Views)