C
christian
Hi
When I call a virtual member function on an object which is exported
from an evc4 dll from a .NET managed c++ dll I get an
InvalidProgramException.
It does work when I compile and run on WinXP.
Calling a global function works.
// MyTest.h
#define MYCALL __cdecl
class MyTest
{
public:
MyTest(){}
~MyTest(){}
virtual void MYCALL Test() = 0;
};
// MyTest.cpp
class MyTestImpl : public MyTest
{
virtual void MYCALL Test()
{
::MessageBox:GetDesktopWindow(),
_T("MyTest"), _T("Pinvoke Test"), MB_OK|MB_ICONASTERISK);
}
};
extern "C"
{
MyTest* MYCALL CreateMyTest()
{
return new MyTestImpl();
}
}
// mytest.def
EXPORTS
CreateMyTest @1
Any ideas?
When I call a virtual member function on an object which is exported
from an evc4 dll from a .NET managed c++ dll I get an
InvalidProgramException.
It does work when I compile and run on WinXP.
Calling a global function works.
// MyTest.h
#define MYCALL __cdecl
class MyTest
{
public:
MyTest(){}
~MyTest(){}
virtual void MYCALL Test() = 0;
};
// MyTest.cpp
class MyTestImpl : public MyTest
{
virtual void MYCALL Test()
{
::MessageBox:GetDesktopWindow(),
_T("MyTest"), _T("Pinvoke Test"), MB_OK|MB_ICONASTERISK);
}
};
extern "C"
{
MyTest* MYCALL CreateMyTest()
{
return new MyTestImpl();
}
}
// mytest.def
EXPORTS
CreateMyTest @1
Any ideas?