Search
Active

0
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 452567
Opened: 5/17/2009 11:28:05 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I found a different behavior on WaitForInputIdle between Vista x64 SP1 and Windows 7 x64 RC.

- Launch an application (not console) by CreateProcess.
- Then, wait for input idle on the process by WaitForInputIdle with INFINITE.
- WaitForInputIde returns zero. (succeeded)
- After this, try FindWindow to get HWND of this application.
- FindWindow returns a valid HWND on Vista, but NULL is returned on Win7 RC.

Is this a design on Win7? It looks like an application is launching faster than Vista, but if the API's behavior has been changed, we cannot compare with by this way.

Anyway, I would like to know how to get a HWND created just after CreateProcess on Win7.

P.S.

Additional comment for my feedback almost a month ago.
This code will excute a MFC dialog-base application, which is a private application for test created by VC Wizard.
(rough code for explanation.)


PROCESS_INFORMATION pi;
STARTUPINFO si;
ZeroMemory(&pi, sizeof(pi));
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWNORMAL;

BOOL bRet = CreateProcess(NULL, szCmd, NULL, NULL, FALSE, 0, NULL, szDir, &si, &pi);
ASSERT(bRet);
ASSERT(pi.hProcess != INVALID_HANDLE_VALUE);

DWORD dwRet = WaitForInputIdle(pi.hProcess, INFINITE);
ASSERT(dwRet == 0);
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);

HWND hWnd = FindWindow(NULL, szName);
ASSERT(hWnd != NULL); // NULL on Win7. Not NULL on Vista.

In this case, there are two applications, the caller (this code itself) and callee,
and the caller launches the callee while the caller is launching.
Details (expand)
製品言語
日本語
バージョン
Visual Studio 2008 Service Pack 1
オペレーティング システム
Vista
オペレーティング システム言語
日本語
再現の手順
Described above.
実際の結果
Described above.
期待した結果
Described above.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 5/17/2009 at 6:10 PM

この度は、フィードバックをお送りいただき、誠にありがとうございます。 現在、お送りいただきました報告内容に基づき問題を調査中ですので、しばらくお待ちください。 よろしくお願いいたします。

Visual Studio 製品チーム

Posted by Microsoft on 6/10/2009 at 1:08 PM
Do we have more details on this issue? For example; which kind of window and source code or repro application?
Posted by Microsoft on 6/12/2009 at 1:19 AM

(こちらは、[投稿者: Microsoft、投稿日時: 2009/06/10 13:08] の和訳です。)

こちらの問題に関しまして、(ウィンドウ、ソース コード、問題が再現するアプリケーションなどに関する) 詳しい情報をいただくことはできますでしょうか?

Posted by nexus_p on 8/3/2009 at 5:40 PM
Almost 3 months passed but no answser for this.
Please read the above text again, I already replied your comment 2 month ago as P.S.
Posted by Microsoft on 8/3/2009 at 11:23 PM
Thanks for your response. We are routing this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Posted by Microsoft on 8/4/2009 at 12:54 AM

(こちらは、[投稿者: Microsoft、投稿日時: 2009/08/03 23:23] の和訳です。)

ご返答いただき、ありがとうございます。 こちらのバグに関しましては、該当する機能を専門で担当している製品チームに報告させていただきます。 今後は、同チームが問題を再調査し、次期リリース版での修正について判断する予定です。 よろしくお願いいたします。

Visual Studio 製品チーム

Posted by nexus_p on 8/27/2009 at 6:32 PM
Any progress? Rather than bug fix, I would like to know how to get valid HWND just after executing application whatever API is. (CreateProcess, ShellExecute, ShellExecuteEx, etc.)