How Can I Debug Windows API Functions?

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at How Can I Debug Windows API Functions?.

If you want to debug a Windows API function that has NT symbols loaded, you must do the following.

To set a breakpoint on a Windows API function with NT symbols loaded

  • Enter the function name together with the name of the DLL where the function resides. In 32-bit code, use the decorated form of the function name. To set a breakpoint on MessageBeep, for example, you must enter the following.

    {,,USER32.DLL}_MessageBeep@4  
    
    

    To obtain the decorated name, see Viewing Decorated Names.

Debugging Native Code FAQs
Debugging Native Code

Show: