Hi
I've got aplication, which one is written in unmanaged c++ with stl,
i've made for it gui in managed c++.
Problem becomes when I'm starting to filling up for example datagrids,
when I'm adding row to datagrid , some varibles (vectors etc) in
unmanaged class are cleared or filled with null.
I want mention also when i compile only unmanaged class for console
project (without .net gui) problem never happends, everything works fine.
I've done all like in msdn example
ms-help://MS.MSDNQTR.v80. en/MS.MSDN.v80/MS.VisualStudio .v80.en/dv_vclang/html/f072ddcc-e1ec-408a-8ce1-326ddb60e4a4.ht m
my program structure looks like that
main.cpp
// gui.cpp : main project file.
#pragma managed(push, off)
#include "source\mai n.h"
....
#include "source\nfile.h "
#include "source\fun08.h "
....
static SCA Sca; //< --- thats my unmanaged class
#pragma managed(pop)
#include "source\guiTabP ageFUN.h"
#include "source\guiTabP ageN.h"
....
#include "Form1.h"
using namespace GuiNameSpace;
[STAThreadAttrib ute]
int main(array<Syst em::String ^^args)
{
Application::En ableVisualStyle s();
Application::Se tCompatibleText RenderingDefaul t(false);
Application::Ru n(gcnew Form1(&Sca));
return 0;
}
//nfile.h:some unmanaged file
#pragma managed(push, off)
class N
{
.....int z;
}
#pragma managed(pop)
//nfile.cpp:some unmanaged file
#pragma managed(push, off)
...some functions body..
N::N()
{
int z=0;
}
#pragma managed(pop)
Is there any way to fix the problem ?
Regards
frank