I hope someone can help me with this, I am mainly a C # developer, so my C and C ++ Skills are bad. I have a native C dll, which is a wider application plugin. I cross compile this dll for windows on linux using gcc.
In my native dll, when I create a D3DSurface, I want to call a function in a C ++ mixed mode Dll and pass a pointer to the surface along with the Hwnd / handle. This C ++ mixed mode should then call my C # managed code.
As an example, in C, I want to do the following:
Hwnd handle; LPDIRECT3DSURFACE d3dtarg; SurfaceCreated(handle, d3dtarg);
In C #, I want this to be called from a mixed mode assembly
public static class D3DInterop { public static void SurfaceCreated(IntPtr handle, IntPtr surface) {
Since I suck in C ++, I just want to know if anyone can give me an example of what I need to encode mixed mode dll. I would also like to not need to compile a mixed mode dll with directx headers, so is there a way I can overlay 'C' LPDIRECT3DSURFACE in a shared pointer? In C #, I use IntPtr anyway.
c ++ c # interop mixed-mode
Mike
source share