Heap Corruption while using CreateWindowExW

后端 未结 2 1732
温柔的废话
温柔的废话 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: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)).

提交回复
热议问题