Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-3745

PostMessage with WM_QUIT as parameter doesn't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Win32SS
    • None
    • Operating System: ReactOS
      Platform: x86 Hardware

    Description

      If a program calls PostMessage with WM_QUIT as parameter, the target window doesn't exit the message loop.

      Although this isn't the right way to destroy a window, it works in windows.
      This is what msdn says: "Do not post the WM_QUIT message using the PostMessage function; use PostQuitMessage."

      However "user32_winetest.exe msg" tests this behaviour and proves that it works in windows and not in reactos. When I run user32_winetest.exe msg, it creates a new thread that creates a new window. The first thread does some other tests with the window in the new thread and in the end in order to kill the new thread it calls PostMessage:

      ret = PostMessageA(wnd_event.hwnd, WM_QUIT, 0, 0);

      and then wait it to terminate:

      ok(WaitForSingleObject(hThread, INFINITE) == WAIT_OBJECT_0, "WaitForSingleObject failed\n");

      this creates a deadlock in the winetest and it hangs there.

      Attachments

        Activity

          People

            jimtabor jimtabor
            Smiley Giannis Adamopoulos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: