[TSF-IME] Access violation when using / Heap Corruption ITfUIElementSink

Oliver Sradnick 21 Reputation points
2020-09-20T17:55:28.3+00:00

Hi,
Im currently working with the Text Service Framework.
And if I use advise sink on an ITfUIElement, i'll get an exception (see picture) after using my simple test application and spamming some keys and spaces in chinese.

25860-unbenannt.png

If i dont advise sink ITfUIElement and use the OS Candidate window everything works fine^^ even deleting all my code in

HRESULT CandidateList::BeginUIElement(DWORD dwUIElementId, BOOL* pbShow)  
HRESULT CandidateList::UpdateUIElement(DWORD dwUIElementId)  
HRESULT CandidateList::EndUIElement(DWORD dwUIElementId)  

the behaviour does not change.

I remember using the same project on a different pc and it works without any crash.

Im using Microsoft Windows [Version 10.0.18363.1082] and Visual Studio 2017
Windows SDK 10.0.14393.0
Platform Toolset VS 2017 v141

Any Ideas ?

EDIT:
Here u can download my project to test it urself
https://drive.google.com/file/d/1hAZZhtP5kHOT28jEVoRGVbqO1EJgp-mz/view?usp=sharing

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,651 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,758 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.