THanks for response.
>>> Aha, I didnt realize that you were using the C++ scope classes. The scope driver does not >>> get loaded until the very first call to the scope class. So you would not need to setup >>> delay loading nor would you use LoadLibrary or GetProcAddress.
Our application was developed using MFC VC++ 2003 .NET edition. Sorry I missed the details.
>>> You will get an exception when you use the CNiScope constructor and if the system does >>> not have the scope driver installed.
Exactly, I do get an exception when I use the CNiScope constructor. However, what I do is create CNiScope 2 times. The first time a dummy construction is done with function like this...
bool CMainFrame::ScopeExists(void)
{
bool scopeExists = true;
CString errorMsg = "NiScope device absent.\r\nNo Scope controls will be available";
try
{
// Instantiate a scope to test is it exists
CNiScope ProbeScope ("PXI1Slot2", false, false, "");
}
catch (CNiIviException* e)
{
e->Delete();
AfxMessageBox (errorMsg, MB_OK | MB_ICONEXCLAMATION);
scopeExists = false;
}
return scopeExists;
}
I use the returned boolean to identify if scope driver is PRESENT or ABSENT in the system. Using this boolean result I then do the actual scope dialog bar and CNiScope construction (the second time is when the actual CNiScope is created and used).
If boolean is FALSE
no scope dialog bar controls is created
only the analyses dialog bar controls are created
else
application starts up with scope and analyses dialog controls
>>> Are you using the .NET class libraries? Or is this just MFC code?
Just MFC code with Measurement Studio
>>> For a list of components that need to be distributed, refer to the Measurement Studio Help topic Distributing Measurement Studio Visual C++ Applications.
This was helpful to the extent that I got the active X controls loaded and distributed with application. But analyses part of application crashes when it tries to use the CNi such as CNiMatrices, CNiReal64Vector. I found this using the debugged in Microsoft's VC++ .NET 2003.
>>> Are you checking for exceptions when you start the analysis routines?
I do have a few exceptions being checked. However, can you tell the exceptions you have in mind that need to be included.
>>> Is this crash happening on the development machine or the deployment machine?
The crash is happening only on machines NOT having scope drivers. I tried on a 2 machines.
One WITH Measurement Studio and WITHOUT scope controls - it crashes
Second WITHOUT Measurement Studio and WITHOUT scope controls - it crashes
Is there something I am missing??
>>> Could you provide more information about the crash, perhaps a code snippet or a sample app ( with only the analysis section).
Here is code snippet....
m_digIntpolRowLength and m_digIntpolCoeffRows are unsigned int types.
m_farrowFilterCoeff is CNiReal64Matrix type. This is the first moment in application when a CNi is used. When the matrix elements are loaded with values, it crashes at the line
m_farrowFilterCoeff(0,0)=0.00252;.....
I know this may or may not give you whole lot of information. If we can go offline from discussion forum (becuase of proprietary information), I can provide more details about application etc. Thanks.
void CDAQ_DigitalInterpolator::ResetLarge(void)
{
m_digIntpolRowLength = c_digIntpolRowLengthLarge;
m_digIntpolCoeffRows = c_digIntpolCoeffRowsLarge;
m_farrowFilterCoeff.SetSize(m_digIntpolCoeffRows, m_digIntpolRowLength);
m_delayLineBuffer.SetSize(c_delayLineBufferSize);
m_delayLineSize = m_digIntpolRowLength;
m_delayLinePtr = &m_delayLineBuffer[c_delayLineBufferSize - m_delayLineSize];
/////Row 0//////
m_farrowFilterCoeff(0,0)=0.00252;
m_farrowFilterCoeff(0,1)=-0.0087823;
m_farrowFilterCoeff(0,2)=0.0218283;
m_farrowFilterCoeff(0,3)=-0.046127;
m_farrowFilterCoeff(0,4)=0.0909993;
m_farrowFilterCoeff(0,5)=-0.1884611;
m_farrowFilterCoeff(0,6)=0.6283543;
.......