Heap Corruption while using CreateWindowExW

后端 未结 2 1726
温柔的废话
温柔的废话 2020-11-29 13:38

I have some problems with heap corruption. The warning can be observed while using CreateWindowExW function. I know that it is usually a memory error, but how could I search

相关标签:
2条回答
  • 2020-11-29 14:25

    As pointed out above, heap corruption is often detected after the real corruption has already occurred by some DLL/module loaded within your process. From your post it looks like this issue is windows platform specific so I would suggest you to use WinDBG/Pageheap and find out where actual memory corruption is happening. One very very good article about heap memory corruption analysis can be found from the book "Advanced Windows Debugging, Author: By: Mario Hewardt; Daniel Pravat" Chapter 06

    http://advancedwindowsdebugging.com/ch06.pdf

    0 讨论(0)
  • 2020-11-29 14:43

    Change

    WNDCLASSEX wcex = { sizeof(WNDCLASSEX) };
    

    to

    WNDCLASSEX wcex = { 0 };
    

    You're initializing pointer members of WNDCLASSEX to non-null (but nonsensical values, namely sizeof(WNDCLASSEX)).

    0 讨论(0)
提交回复
热议问题