Ok so I have a C# user interface which uses a C++ DLL. The DLL is actually an OpenGL/SDL game. Once the game has finished it goes back to the C# UI. This all works nicely and as far as I know, correctly.
The problem comes when I try to exit the actual program. The C# form closes, however an error follows shortly which is pretty undescriptive. I assume it is something to do with the DLL, perhaps it is still open? How does one make sure that the DLL has closed properly? Or how do you close it all together?
I'm opening the DLL as follows:
[DllImport("AsteroidGame.dll")]
public static extern int EntryPoint();
private void rungame()
{
EntryPoint();
}
Thanks in advance.
EDIT
The error simply says:
vshost32.exe has stopped working