且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

潜在的漏洞?

更新时间:2023-09-11 22:06:16

我应该补充一点,这个处理程序工作得很好,只要我不试图插入一个中断点。 重点是捕捉桌面减去我的窗口;检索我的窗口下的桌面背景,该窗口应该是ws_ex_transparent
,但是其他Windows只能在某些未记录的条件下正常工作。  (在没有这种机制的情况下捕获桌面下的桌面,窗口会扭曲 - 底部比顶部更窄 - 并且在第一次执行时具有全白背景
,无法解释。) 在桌面窗口句柄上发出UpdateWindow调用之前,我将处理程序置于旁路模式,以便每个消息都由DefWindowProc处理,直到UpdateWindow调用返回。 
使用此设置,我能够正确地在透明窗口下获取桌面,并且即使在UpdateWindow返回后,NCPaint消息处理程序中的断点也会将系统发送到lala land。
I should probably add that this handler works fine as long as I don't try to insert a breakpoint in it.  The point is to capture the desktop minus my window; retrieve the desktop background under my window which is supposed to be ws_ex_transparent but like the rest of Windows only works properly in certain undocumented conditions.  (Capturing the desktop under my window without this mechanism in place, the window is distorted - narrower at the bottom than the top - and has an all-white background on the first execution which cannot be explained.)  Just prior to issuing the UpdateWindow call on the desktop window handle, I put my handler into bypass mode so that every message is handled by DefWindowProc until the UpdateWindow call returns.  With this setup I'm able to get the desktop under my transparent window correctly, and a breakpoint in the NCPaint message handler, even after UpdateWindow returns, sends the system into lala land.