@@ -7,6 +7,8 @@ namespace UniGetUI;
77public static class CrashHandler
88{
99 private const uint MB_ICONSTOP = 0x00000010 ;
10+ private const uint MB_OKCANCEL = 0x00000001 ;
11+ private const int IDCANCEL = 2 ;
1012
1113 [ System . Runtime . InteropServices . DllImport ( "user32.dll" , CharSet = System . Runtime . InteropServices . CharSet . Unicode ) ]
1214 private static extern int MessageBox ( IntPtr hWnd , string lpText , string lpCaption , uint uType ) ;
@@ -17,12 +19,11 @@ private static bool _reportMissingFiles()
1719 {
1820 var errorMessage = "UniGetUI has detected that some required files are missing."
1921 + "\n \n This might be caused by an incomplete installation or corrupted files. Please reinstall UniGetUI."
20- + "\n \n Run UniGetUI with the parameter '--no-corrupt-dialog' to get more details about the crash." ;
22+ + "\n \n Press CANCEL to get more details about the crash." ;
2123
2224 var title = "UniGetUI - Missing Files" ;
2325
24- MessageBox ( IntPtr . Zero , errorMessage , title , MB_ICONSTOP ) ;
25- return true ;
26+ return MessageBox ( IntPtr . Zero , errorMessage , title , MB_ICONSTOP | MB_OKCANCEL ) is not IDCANCEL ;
2627 }
2728 catch
2829 {
@@ -41,7 +42,7 @@ public static void ReportFatalException(Exception e)
4142 while ( fileEx is not null )
4243 {
4344 if ( fileEx . ToString ( ) . Contains ( "Could not load file or assembly" )
44- || ( uint ) fileEx . HResult is 0x80070002 )
45+ || ( uint ) fileEx . HResult is 0x80070002 or 0x80004005 )
4546 {
4647 if ( _reportMissingFiles ( ) )
4748 {
0 commit comments