S
SteveK
**Newbie with managed C++**
I'm trying to wrap an unmanaged C++ class in a managed C++ class library.
When I instantiate the wrapper class it's ctor calls the ctor on the
unmanaged class and at that point I get the exception:
"An unhandled exception of type 'System.StackOverflowException' occurred in
suabwrapper.dll"
I have been able to reproduce this with an unmanaged class that is VERY
simple:
class CTest
{
public:
CTest(){ m_id = 1; }
~CTest(){}
int GetID(){ return m_id; };
private:
int m_id;
};
In my managed class I have a CTest* member that I assign to a new CTest() in
the managed class' ctor:
CSUABWrapper()
{
m_pTest = new CTest();
}
Once the CTest ctor is called (I can't step into the code for some reason) I
get the exception.
Anyone know what could be going on? Any ideas??
Thanks,
Steve
I'm trying to wrap an unmanaged C++ class in a managed C++ class library.
When I instantiate the wrapper class it's ctor calls the ctor on the
unmanaged class and at that point I get the exception:
"An unhandled exception of type 'System.StackOverflowException' occurred in
suabwrapper.dll"
I have been able to reproduce this with an unmanaged class that is VERY
simple:
class CTest
{
public:
CTest(){ m_id = 1; }
~CTest(){}
int GetID(){ return m_id; };
private:
int m_id;
};
In my managed class I have a CTest* member that I assign to a new CTest() in
the managed class' ctor:
CSUABWrapper()
{
m_pTest = new CTest();
}
Once the CTest ctor is called (I can't step into the code for some reason) I
get the exception.
Anyone know what could be going on? Any ideas??
Thanks,
Steve