Testing with an Application Verifier

Testing with an Application Verifier

Application Verifier is a tool for testing user-mode applications for compatibility with MS Windows XP. It comes in handy when you’re troubleshooting issues like common programming mistakes related to memory allocation, lock usage, and handle usage. The tool exposes instrumentation that already exists in the Windows OS.

The Application Verifier’s graphical front end, appverif.exe v.2.50, adds the application to be tested, selects tests, specifies a debugger, and displays the result log. Once the information is entered, it is stored in the Windows Registry at the following locations:

HKLMSoftwareMicrosoftWindows NT    CurrentVersionAppCompatFlagsAppVerifier                |-                |   |-General                |                |-Custom                |-                |-Layers                |-LAYER_

The General subkey may have the Debugger name, with the full path to the associated debugger, as its value. The Custom1 subkey may have the <{GUID}.sdb> shim data base name that is located at %SystemRoot%AppPatchCustom folder. The selected “shim” tests are represented by corresponded values.

HKLMSoftwareMicrosoftWindows NT       CurrentVersionImage File Execution Options            |-

The subkey may have the Debugger name, as above. If the full path has spaces, double quotes should be used. The subkey also has the VerifierPath name with a value of the full path to the application to be tested. The selected “base” tests are represented by the GlobalFlag and VerifierFlags names’ corresponded values.

The stored information is applied to the running application whenever it runs. At runtime, the “base” tests are performed by built-in OS facilities in the system verifier provider, verifier.dll, that operate with the verifier engine in ntdll.dll. The “shim” tests are performed by appvcore.dll, which operates with the shim engine in shimeng.dll. Starting the application under the user mode debugger is optional, but some of the tests, like for handle errors, make sense only if application does run under debugger.

When you finish with testing and remove the application from the application list, the mentioned registry subkeys will be removed as well.

The discovered problems are saved in the%ALLUSERSPROFILE%DocumentsAppVerifierLogs folder. Access them by clicking on the tool’s “View Logs” button.

Remember: The Application Verifier versions available for download were not designed for managed code. This means that if you use them with managed applications, it makes a lot of “noise” in the log. When working with devenv.exe, select the Mixed Debugger Type option on the project property page. Otherwise, the default, Auto Type, sets the debugger type based on the contents of the flags in the IMAGE_COR20_HEADER of the .EXE file. So, if you have a managed .EXE, the automatically selected debugger will not break in the unmanaged code.

In addition, the debugger must be set to catch exceptions on the second chance in order for the Application Verifier to handle them first. You can set it by selecting the right radio buttons in the “Action” group box on the Exceptions dialog box in VS6 or the “When the exception is thrown” and “If the exception handled” group boxes in VS.NET 2003.

Share the Post:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as