Opengl causing c# application to close

i have a c++ dll in which i call
SDL_SetVideoMode with the flag:
SDL_OPENGL to init opengl for me.

Now i’m using this c++ dll in a c# project i create my open gl window/device
then at the end of the c# method it closes the c# application (calls Dispose
method, where normally it would call my paint method)

any ideas?_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/