How to fix Win7 application compatibility compatibility with DISABLEUSERCALLBACKEXCEPTION

I have a very large C # .NET.NET WinForms application that has been running for over 18 months. We are finally testing it on Windows 7 (this large case has not yet been ported). The application starts normally and starts until we start a very large process (multiple selections from the database and many forms and controls are connected).

The first time we run this process on Win7, something will work, and Win7 creates compatibility with application compatibility around our *.vshost.exe . When I look at the registry

 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers 

it shows vshost.exe with a value of DISABLEUSERCALLBACKEXCEPTION .

I did a search and very few.

Does anyone know what type of code can cause this? I would like to fix the code to prevent the laying.

+6
source share
1 answer

Read this blog post, I explained it all:

http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/

Short version

Exceptions crossing the user kernel boundary were lost on 64-bit Windows.

Starting with Windows 7, when a 64-bit application (that is, not 32-bit in a 64-bit OS) crashes, a notification about compatibility with the program appears. If the application does not have a Windows 7 manifest, a dialog box appears informing you that the PCA has applied the application compatibility pad.

The next time you run the application, Windows will emulate Server 2003 behavior and throw an exception.

To save these exceptions (as you want ), add the manifest entry "I am for Windows 7":

 <assembly> <!-- We were designed and tested on Windows 7 --> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <!--The ID below indicates application support for Windows 7 --> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!--The ID below indicates application support for Windows Vista --> <!--It important to keep this too, since Vista has no idea about Win7 supportedOS GUID --> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/ </application> </compatibility> </assembly> 
+12
source

Source: https://habr.com/ru/post/885535/


All Articles