I want to use a dll (including Dialog Class with Measurement Studio ActiveX) in a Visual C++ project.
I can compile my project without problems but the executable bug when I try to display the Dialog box.
I have performed the following steps:
1st project for dll:
* New MyDllProject project with the Visual C++ wizard
* Use of the Measurements Studio Add/remove wizard in order to use Graph, buttons activeX
* Creation of Dialog box with its DialogClass class
* Declaration of the following function in the MyDllProjectApp.cpp file
extern "C" __declspec(dllexport) void Display()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CDialogClass Dialog_Box;
Dialog_Box.DoModal();
}
2nd project for client software:
* New MyClientProject with Visual C++ wizard (but without including Measurement Studio Package)
* Link with the MyDllProject.lib
* Declaration of the following function in the MyClientProjectApp.cpp file
extern "C" __declspec(dllimport) void Display()
* Declaration of the following "calling" function in the MyClientProjectApp.cpp file
CallingFunction()
{
Display();
}
Everything is OK for the compilation of the project, but the executable send an error message (Debug Insertion Failed! .... File:Wincore.cpp.....) when I activate the CallingFunction()in order to display the dialog box.
Can someone helps me please
thank you in advance