Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

EOleException Delphi calling a function or method not supported in base package

Hi,
 
I'm calling CWDSP1.BwBPF( InputArray, 1000, 0.5, 1.0, 1 ); in Delphi 5. 
 
I have the Enterprise edition of the software and I can compile and run the VC++ samples or VB examples so the OCX appears to be registered when called from those environments.
 
As suggested in one of the other message boards, I've also included the following constants:
 
const cwanalysisEvaluation = 0; //
const cwanalysisBase = 1; //
const cwanalysisDSP = 2; //
const cwanalysisAdvanced = 3; //
So how do I convince the control that I have more than the base package.  Originally I had the Professional version which did not have the BwBPF so I upgraded.  But before I upgraded I uni-installed the professional verison.
 
Is there a function call I need to make to tell the control that I have the Advanced Version?
 
I'm stuck here.
 
Thanks
 
John Dammeyer
 
0 Kudos
Message 1 of 6
(11,008 Views)
Hi John,
 
The Component Works controls are not supported in Delphi.  You have already uninstalled the Professional Version, so you took the correct steps.  And, you have already established they are working in VB and VC++, so it appears everything is installed correctly. 
 
However, there is one more thing you can try:
  1. Uninstall again.
  2. Delete all the controls (CWUI, CWGraph3D, CWDSP, etc) from the system32 directory.
  3. Export (save) your registry.
  4. Delete the HKEY_LOCAL_MACHINE\SOFTWARE\National Instrumnets\ComponentWorks registry key.
  5. Reinstall.
Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 2 of 6
(10,993 Views)

Hi David,

I tried that late last night and I've been able to make it work now.  The Delphi wrapper automatically created by Borland is quite impressive.  Once I removed every possible NI file both doing the uninistall and removing physical files, I was able to create an installation .dpk for Delphi and now the controls work as expected.  In fact I've ported the FilterDlg.cpp into FilterDialog.pas and have it running.

The Delphi wrapper even goes as far as creating a property and method for embedding the license information into the application .exe file so that can run on our target hardware.  However, that is not yet working and I don't know why.  I've followed the FAQ links but lack of NI support for Delphi makes it hard to figure out what exactly is required.  I've done a regsvr32 cwui.ocx and the application runs but it taunts me with a message that the version is wrong and that the control is unlicensed.  Why NI can't just create a set of run time controls that can't be used in a development environment but work as an end user control is still the real question.

For anyone else interested in using Delphi I've attached the dialog part of the filter application written in Delphi.  The executable is there too but of course the ActiveX controls are required;  cwui.ocx and cwanalysis.ocx.  The reason I purchased the Measurement Studio package was specifically for cwanalysis.ocx. 

John Dammeyer

0 Kudos
Message 3 of 6
(10,985 Views)

Hi David,

Here is a simple example of what I need to distribute to my customer.  In the zip is a batch file they can run to register the two controls.  The idea here is to take this zip and unpack it into a target folder.  Put the .ocx and batch files into windows/system32 and from there run the batch.  That registers the controls with windows.

Then go back to that target directory and run filter.exe.

You'll see the appropriate messages that tell you that this is an unlicensed control.

John Dammeyer

Oh,  and BTW, this copy of Filter.exe was compiled with Visual C++ as supplied in the NI folders.  On my development machine it works correctly.  On any other machine it doesn't.  IMHO, the examples, if they need other code to be portable, should include that.

 

 

0 Kudos
Message 4 of 6
(10,982 Views)
Hi John,
 
The following two KnowledgeBase articles address creating an installer that uses Measurement Studio controls in Visual Studio 6.0 :

How Do I Distribute Measurement Studio Applications/OCX Files? 

Distributing Measurement Studio ActiveX Applications 

According to the instructions in the first KB, you may be missing DLL's and TLB files in your installer.  In fact, when I run your BAT file on a reimaged computer, following your instructions, it mentions that it is missing a DLL file and does not start.  It does not give me a licensing error.
Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 5 of 6
(10,962 Views)
 

Hi David,

I've been to that page and thought I had ensured that the correct DLLs were installed.  Especially since I was using only Analysis and Common User Interface controls.

Had you mentioned that the missing DLL file on your reimaged computer was mesa.dll it would have saved me a day of rebuilding a clean system to find that same message.  I've installed mesa.dll in the same folder as the application on the target hardware and now the app runs and no longer displays invalid license info.

Personally I don't think the process to do this is very clearly spelled out.

John Dammeyer


Distributing Measurement Studio ActiveX Applications 

According to the instructions in the first KB, you may be missing DLL's and TLB files in your installer.  In fact, when I run your BAT file on a reimaged computer, following your instructions, it mentions that it is missing a DLL file and does not start.  It does not give me a licensing error.



 

0 Kudos
Message 6 of 6
(10,953 Views)