R
ROLST5
I have a native win32 C++ DLL that has exported functions (I can't modify the
win32 DLL). One of these exported functions needs a pointer to a structure.
The structure contains virtual functions. I want to call the win32 function
from C# and pass it a ref to a struct of virtual functions - just as I would
from win32 C.
For example, I'm trying to call this exported win32 DLL function from C#.
I can call it from C#, but I can't get the C# mangling correct and it throws
exceptions at in the DLL at the location below.
bool initialize(ExportFuncs *f)
{
ExportFuncs *temp = f;
f->busWrite(... -> exception
}
The C struct look something like this
struct ExportFuncs{
public:
virtual int busWrite(long regNo, long data);
....
}
Possible?
win32 DLL). One of these exported functions needs a pointer to a structure.
The structure contains virtual functions. I want to call the win32 function
from C# and pass it a ref to a struct of virtual functions - just as I would
from win32 C.
For example, I'm trying to call this exported win32 DLL function from C#.
I can call it from C#, but I can't get the C# mangling correct and it throws
exceptions at in the DLL at the location below.
bool initialize(ExportFuncs *f)
{
ExportFuncs *temp = f;
f->busWrite(... -> exception
}
The C struct look something like this
struct ExportFuncs{
public:
virtual int busWrite(long regNo, long data);
....
}
Possible?