Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using the CWIviDmm control

I am attempting to use the CWIviDmm control in a Visual Studio C++ application. I placed the control onto my resource, then get a smart pointer to the CWIviDmmLib::_CWIviDmmPtr and try to make it connect to a simulator I've created in MAX. The simulator is named "SampleDmm" and uses the ag34401 driver. My first attempt was to set the control LogicalName property to "SampleDmm".

spDMM->LogicalName = L"SampleDmm";

Now when you try to use the control you get an error message saying: "The session handle is not valid. [IVI Error Code: BFFA1190]". So I figured, maybe you have to call Init()

spDMM->LogicalName = L"SampleDmm";
spDMM->Init( TRUE, FALSE, CComBSTR( "Simulate=1,UseSpecificSimulation=1" ).m_str, CWIviDmmLib::cwiviNoOp );


This causes a checkesp assert and gives me the same "invalid session handle" error. I then tried the Config method.

spDMM->LogicalName = L"SampleDmm"
spDMM->Config();

Same result as the Init() call. In despair, I tried running the Dmm example code that ships with measurement studio (C:\Program Files\National Instruments\MeasurementStudio\VC\Examples\IVI\SimpleIviDmm). The example runs into an error in the following line of code

m_pDmm = new CNiIviDmm(m_driver, true, true, "Simulate=1,UseSpecificSimulation=1");

The exception says "Primary Error (0xBFFA600D) The config server module is not present on the system". As far as I know, I've installed all the necessary IVI software.

If anyone has any ideas, or a link to a working example program, I'd love to hear them.

Thanks,

Aaron
0 Kudos
Message 1 of 2
(3,787 Views)
Aaron,

Though we already spoke, I'm posting this for the benefit of other customers.

So, the first step is to make sure you have the latest version of the IVI Compliance Package (version 2.1.1).

http://digital.ni.com/softlib.nsf/webcategories/85256410006C055586256BE6007065DD?opendocument&node=132060_US

Then everything should be pretty straightforward from there as long as you have your logical name configured correctly in MAX.

Best Regards,

Matt P.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,787 Views)