Hi Aric,
Aric Stewart wrote:
dlls/msctf/threadmgr.c | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-)
+ if (!pdimFocus || FAILED(IUnknown_QueryInterface(pdimFocus,&IID_ITfDocumentMgr,(LPVOID*) &check))) + return E_INVALIDARG; + + This->focus = check;
Shouldn't This->focus be released if it's already set?
Jacek
Humm, I thought so at first also, but then when I was testing with word 2007 (which is the only program I have found so far that uses this) I found that if i released here then the DocumentMgr was prematurely destroyed and caused Word to crash. With not releasing then everything lined up.
There is also a note in msdn about AssociateFocus which states that it does not increment the lock possibly in contrast to SetFocus.
The documentation on these interfaces is very very sparse.
-aric
Jacek Caban wrote:
Hi Aric,
Aric Stewart wrote:
dlls/msctf/threadmgr.c | 28 ++++++++++++++++++++++++---- 1 files changed, 24 insertions(+), 4 deletions(-)
- if (!pdimFocus || FAILED(IUnknown_QueryInterface(pdimFocus,&IID_ITfDocumentMgr,(LPVOID*) &check)))
return E_INVALIDARG;
- This->focus = check;
Shouldn't This->focus be released if it's already set?
Jacek