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