professor_rumsdiegeige
February 27th, 2008, 01:45 PM
Hi forum!
I wrote an managed class, and I want to expose the functionality to a third party program that can only call unmanaged C-style DLL functions.
So, in the DLL's functions, I create an object of a class that again has a member variable declared with gcroot:
class mediatorClass
{
int do_something()
{
tv = gcnew managedClass();
}
private:
gcroot< managedClass > tv;
};
int DLL_function()
{
mediatorClass * d = new mediatorClass();
d->do_something();
}
As soon as d->do_something is called, I get a native error "Windows cannot continue from this exception". This exception is raised even before gcnew(…) in the do_something-function is executed.
Does anybody have some ideas about that?
Thank you for any help!!
I wrote an managed class, and I want to expose the functionality to a third party program that can only call unmanaged C-style DLL functions.
So, in the DLL's functions, I create an object of a class that again has a member variable declared with gcroot:
class mediatorClass
{
int do_something()
{
tv = gcnew managedClass();
}
private:
gcroot< managedClass > tv;
};
int DLL_function()
{
mediatorClass * d = new mediatorClass();
d->do_something();
}
As soon as d->do_something is called, I get a native error "Windows cannot continue from this exception". This exception is raised even before gcnew(…) in the do_something-function is executed.
Does anybody have some ideas about that?
Thank you for any help!!