![]() ![]() When checking the debug output after launching the app and pressing Button2 I consistently get:Īfter pressing Button1 and then pressing Button2 again I get:Įxception thrown at 0x00007FFA38A96F6C in MFCApplication3.exe: 0xC0000005: Access violation executing location 0x00007FFA38A96F6C.Īfter uninstalling KB5002226 I consistently get the first set of window titles. It can be read almost all the texts, e.g. When you use a function that can fail, you always need to check for such failure. GetWindowText for all Windows OS written in C Very small and portable program. As you aren't testing that the functions used have completed properly, you aren't handling errors. ::EnumWindows(EnumWindowsCallback, dwMyAppProId) GetWindowText() is likely to fail (returns 0). StrWinProId.Format(_T("Process ID: %d \n"), dwMyAppProId) GetWindowThreadProcessId(hwnd,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |