WinExec可能会引起消息重入

WinExec不仅会造成延迟,并且还会引起消息的重入。

以下是调用堆栈:

WinvoiceCC.exe!CWinvoiceCCDlg::OnMsgHttpReq(unsigned int wParam=38434384, long lParam=0)  行624 C++

mfc90d.dll!CWnd::OnWndMsg(unsigned int message=2564, unsigned int wParam=38434384, long lParam=0, long * pResult=0x0012e4dc)  行2018 + 0x11 字节 C++
mfc90d.dll!CWnd::WindowProc(unsigned int message=2564, unsigned int wParam=38434384, long lParam=0)  行1755 + 0x20 字节 C++
mfc90d.dll!AfxCallWndProc(CWnd * pWnd=0x0012f9b4, HWND__ * hWnd=0x0034062c, unsigned int nMsg=2564, unsigned int wParam=38434384, long lParam=0)  行240 + 0x1c 字节 C++
mfc90d.dll!AfxWndProc(HWND__ * hWnd=0x0034062c, unsigned int nMsg=2564, unsigned int wParam=38434384, long lParam=0)  行403 C++
mfc90d.dll!AfxWndProcBase(HWND__ * hWnd=0x0034062c, unsigned int nMsg=2564, unsigned int wParam=38434384, long lParam=0)  行441 + 0x15 字节 C++
user32.dll!_InternalCallWinProc@20()  + 0x28 字节
user32.dll!_UserCallWinProcCheckWow@32()  + 0xb7 字节
user32.dll!_DispatchClientMessage@20()  + 0x4d 字节
user32.dll!___fnDWORD@4()  + 0x24 字节
ntdll.dll!_KiUserCallbackDispatcher@12()  + 0x13 字节
user32.dll!_NtUserWaitForInputIdle@12()  + 0xc 字节
kernel32.dll!_WinExec@8()  + 0xaf 字节
WinvoiceCC.exe!CExternExeCmdService::Execute(const char * lpszCmd=0x004eef48, const char * lpszParams=0x024a2fd8)  行21 + 0x1d 字节 C++
原文地址:https://www.cnblogs.com/zhchoutai/p/6884081.html