DX "Error in the application"

WebKill2k

Member
Joined
May 15, 2008
Messages
14
Programming Experience
1-3
I'm folowing the tutorial at http://geekswithblogs.net/clingermangw/articles/83997.aspx

I didn't download the code but rather went through it myself, andafter finishing it, it seems to work until I close the window, then it gives an error saying "Error in the application", if I copy the exception to the clipboard I get this:
Microsoft.DirectX.Direct3D.GraphicsException was unhandled
ErrorCode=-2147467259
ErrorString="E_FAIL"
IsExceptionIgnored=False
LastError=0
Message="Error in the application."
Source="Microsoft.DirectX.Direct3D"

the line it fails on is:
VB.NET:
    'Description: Presents the rendered scene to the connected render target
    Private Sub Present()
        If DeviceAvailable() = True Then
            Try
                'Show the back buffer on screen
                myD3DDevice.Present()
            Catch ex As DeviceLostException
                mLostDevice = True
            End Try
        End If
    End Sub

All the code is on the website there, not much to it, just makes a blank window. Seems like it's trying to display the buffer after the window is closed and that's why it's failing.
 
Back
Top