1

in x32/x64 debugger, how can I break when a new window is opened?

When inside my application, I click the "File" button in the menu bar then select "options" I want to break on that call to open the window. (The window has multiple tabs, with checkboxes and buttons etc I am not sure what type of window this is called)

The application I am debugging will show more options if the serial key is valid than if the serial key is missing/invalid so Im trying to break when it does its checking.

  • 3
    you need to break on window event/message processing. Dig here DispatchMessage function – PhoeniX Jul 7 '17 at 17:42
2

You should place a breakpoint to the window-creating APIs. Here is my list of APIs that might open a window.

        <Api Name="CreateDialogIndirectParamA"/>
        <Api Name="CreateDialogIndirectParamW"/>
        <Api Name="CreateDialogParamA"/>
        <Api Name="CreateDialogParamW"/>
        <Api Name="CreateWindowA"/>
        <Api Name="CreateWindowExA"/>
        <Api Name="CreateWindowExW"/>
        <Api Name="CreateWindowW"/>
        <Api Name="DialogBoxIndirectParamA"/>
        <Api Name="DialogBoxIndirectParamW"/>
        <Api Name="DialogBoxParamA"/>
        <Api Name="DialogBoxParamW"/>
        <Api Name="MessageBoxA"/>
        <Api Name="MessageBoxExA"/>
        <Api Name="MessageBoxExW"/>
        <Api Name="MessageBoxIndirectA"/>
        <Api Name="MessageBoxIndirectW"/>
        <Api Name="MessageBoxTimeoutA"/>
        <Api Name="MessageBoxTimeoutW"/>
        <Api Name="MessageBoxW"/>

Use programs such as API Monitor to find how the application opens the window, and place a BP on it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.