ShowModelessHTMLDialog - crash on close
I've never worked with NSIS (or with Windows API for that matter) before the current project, so bear with me.
I have an NSIS installer which displays an HTML file in a dialog, created via ShowModelessHTMLDialog (http://msdn.microsoft.com/en-us/library/aa741862(VS.85).aspx) in a custom plugin, while another file is downloaded via NSISdl in the main window.
The problem is that if I close this modeless dialog, the application "..has encountered a problem and needs to close". Meanwhile, the background download completes while the error message is up, by the way. So there is no other side-effects other than this crash message in the app.
If I use ShowHTMLDialog (http://msdn.microsoft.com/en-us/library/aa741858(VS.85).aspx) instead, there is no crash on close. However, that's not what I need, since the background download will not start until the window is closed, and that defeats the purpose.
I also tried calling my function, and creating the modeless dialog outside of NSIS as a separate EXE. In that case, no crash occurs.
This leads me to believe that something NSIS-related is going on here. Any idea about what could be happening?
Thanks,
Ivan