今天安裝了Windows LIve Writer,運行它,出現錯誤資訊如下:
查看事件探查器:
彈出應用程式: WindowsLiveWriter.exe - 無法找到入口: 無法定位程式輸入焦點 IsThreadDesktopComposited 於動態連結程式庫 USER32.dll 上。
沒辦法,只好先看看User32.dll了:
IsCharAlphaA 0x77d3e5ad 0x0002e5ad 407 (0x197) user32.dll C:\WINDOWS\system32\user32.dll
IsCharAlphaNumericA 0x77d4f209 0x0003f209 408 (0x198) user32.dll C:\WINDOWS\system32\user32.dll
IsCharAlphaNumericW 0x77d2c0f9 0x0001c0f9 409 (0x199) user32.dll C:\WINDOWS\system32\user32.dll
IsCharAlphaW 0x77d1f2ae 0x0000f2ae 410 (0x19a) user32.dll C:\WINDOWS\system32\user32.dll
IsCharLowerA 0x77d3b851 0x0002b851 411 (0x19b) user32.dll C:\WINDOWS\system32\user32.dll
IsCharLowerW 0x77d4f152 0x0003f152 412 (0x19c) user32.dll C:\WINDOWS\system32\user32.dll
IsCharUpperA 0x77d37045 0x00027045 413 (0x19d) user32.dll C:\WINDOWS\system32\user32.dll
IsCharUpperW 0x77d69fb7 0x00059fb7 414 (0x19e) user32.dll C:\WINDOWS\system32\user32.dll
IsChild 0x77d1970e 0x0000970e 415 (0x19f) user32.dll C:\WINDOWS\system32\user32.dll
IsClipboardFormatAvailable 0x77d2f127 0x0001f127 416 (0x1a0) user32.dll C:\WINDOWS\system32\user32.dll
IsDialogMessage 0x77d3c651 0x0002c651 417 (0x1a1) user32.dll C:\WINDOWS\system32\user32.dll
IsDialogMessageA 0x77d3c651 0x0002c651 418 (0x1a2) user32.dll C:\WINDOWS\system32\user32.dll
IsDialogMessageW 0x77d2d8c2 0x0001d8c2 419 (0x1a3) user32.dll C:\WINDOWS\system32\user32.dll
IsDlgButtonChecked 0x77d25d75 0x00015d75 420 (0x1a4) user32.dll C:\WINDOWS\system32\user32.dll
IsGUIThread 0x77d69f77 0x00059f77 421 (0x1a5) user32.dll C:\WINDOWS\system32\user32.dll
IsHungAppWindow 0x77d69a39 0x00059a39 422 (0x1a6) user32.dll C:\WINDOWS\system32\user32.dll
IsIconic 0x77d1be27 0x0000be27 423 (0x1a7) user32.dll C:\WINDOWS\system32\user32.dll
IsMenu 0x77d31328 0x00021328 424 (0x1a8) user32.dll C:\WINDOWS\system32\user32.dll
IsRectEmpty 0x77d1bf26 0x0000bf26 425 (0x1a9) user32.dll C:\WINDOWS\system32\user32.dll
IsServerSideWindow 0x77d1da1d 0x0000da1d 426 (0x1aa) user32.dll C:\WINDOWS\system32\user32.dll
IsWindow 0x77d1b933 0x0000b933 428 (0x1ac) user32.dll C:\WINDOWS\system32\user32.dll
IsWindowEnabled 0x77d1bda2 0x0000bda2 429 (0x1ad) user32.dll C:\WINDOWS\system32\user32.dll
IsWindowInDestroy 0x77d1da74 0x0000da74 430 (0x1ae) user32.dll C:\WINDOWS\system32\user32.dll
IsWindowUnicode 0x77d1c59e 0x0000c59e 431 (0x1af) user32.dll C:\WINDOWS\system32\user32.dll
IsWindowVisible 0x77d1c465 0x0000c465 432 (0x1b0) user32.dll C:\WINDOWS\system32\user32.dll
IsWinEventHookInstalled 0x77d1b1a5 0x0000b1a5 427 (0x1ab) user32.dll C:\WINDOWS\system32\user32.dll
IsZoomed 0x77d1c2b2 0x0000c2b2 433 (0x1b1) user32.dll C:\WINDOWS\system32\user32.dll
我的user32.dll版本為5.1.2600.3099,上面是所有的函數入口,顯然,沒有IsThreadDesktopComposited,因此可以想見,出現這個錯誤就不足為怪了。那麼看來Windows Live writer載入的DLL不該使用USER32.dll的這個函數,這樣,就必須看看DLL的載入過程,以便確定原因:
用VC工具一看,發現是c:\windows\system32\MPRAPI.DLL調用了user32.dll中的IsThreadDesktopComposited函數,而剛好我的XP的user32.dll中沒有這個函數,所以發生了錯誤。
解決辦法:
將MPRAPI.DLL改名,如MPRAPI.DLL.bak。
重新運行,解決問題。