SFML community forums

Bindings - other languages => DotNet => Topic started by: Kwang1imsa on July 14, 2011, 04:59:47 am

Title: FatalExecutionEngineError: Releasing a Handle
Post by: Kwang1imsa on July 14, 2011, 04:59:47 am
So I have 2 windows, a window from OGRE3D and another from SFML.  I pass OGRE's window handle to SFML's and then proceed in my main application loop to pump messages through OGRE's window:

Code: [Select]

IntPtr hwnd;
OGREWin.GetCustomAttribute("WINDOW", out hwnd);
pl.Insert("WINDOW", hwnd.ToString());
SFMLWin = new SFML.Graphics.RenderWindow(hwnd); //hwnd is a pointer to OGREWin's handle
while (!OGREWin.IsClosed)
            {
                    WindowEventUtilities.MessagePump();
            }


Here is my problem, when I close OGRE's window, the method in my main application loop yells "FatalExecutionEngineError".  Is there a way to release SFMLWin's grasp on OGREWin's handle before this happens?[/code]
Title: FatalExecutionEngineError: Releasing a Handle
Post by: Laurent on July 14, 2011, 10:11:05 am
Quote
Is there a way to release SFMLWin's grasp on OGREWin's handle before this happens?

window.Close() maybe ?
Title: FatalExecutionEngineError: Releasing a Handle
Post by: Kwang1imsa on July 14, 2011, 07:26:09 pm
yes. did not work.