Hi Anton,
Note that we'll need to store states in WMP object at some point, at least so that we can implement get_openState() and get_playState(), but I'm fine with the patch for now. Please just address one comment bellow.
On 04/03/2018 07:36 AM, Anton Romanov wrote:
ok(hres == S_OK, "IWMPControls_play failed: %08x\n", hres);
- {
MSG msg;DWORD start_time = GetTickCount();DWORD dwTimeout = 5000;HANDLE handles[1];handles[0] = playing_event;do {DWORD now = GetTickCount();res = MsgWaitForMultipleObjectsEx(1, handles, start_time + dwTimeout - now,QS_ALLINPUT ,MWMO_ALERTABLE | MWMO_INPUTAVAILABLE);if (res == WAIT_OBJECT_0 + 1) {GetMessageW(&msg, 0, 0, 0);if (winetest_debug > 1)trace("Dispatching %d\n", msg.message);TranslateMessage(&msg);DispatchMessageW(&msg);}}
In general, adding a new block purely for variable declarations is not encouraged. In this case, I'd suggest a helper pump_messages() function here.
Thanks,
Jacek