Re: riched20: Implement ITextDocument_fnOpen. (try 2)
On 11/18/2013 16:02, Jactry Zeng wrote:
update: 1. Use 0 in HeapAlloc instead of HEAP_ZERO_MEMORY; 2. Return an E_OUTOFMEMORY instead of HRESULT_FROM_WIN32(GetLastError()) when HeapAlloc fail.
+ FIXME("Don't support UTF-16.\n"); How is supposed to be handled? + FIXME("Partial stub! Don't support flag: 0x%x\n", Flags); At least some flags are easy to support mapping them to sharing and creation disposition modes.
+ chBuffer = HeapAlloc(GetProcessHeap(), 0, size+1); + if(!chBuffer) + { + CloseHandle(hFile); + return E_OUTOFMEMORY; + } + + if(!ReadFile(hFile, chBuffer, size, &dwReadSize, NULL)) + { + CloseHandle(hFile); + HeapFree(GetProcessHeap(), 0, chBuffer); + return HRESULT_FROM_WIN32(GetLastError()); + } + chBuffer[size] = 0; How will it work for UTF-16 input? + SendMessageW(This->editor->hWnd, EM_SETTEXTEX, (int)&settextex, (LPARAM)chBuffer); + CloseHandle(hFile); + + return S_OK; Looks like you leak a buffer.
Hi, 2013/11/18 Nikolay Sivov <bunglehead(a)gmail.com>
+ FIXME("Don't support UTF-16.\n");
How is supposed to be handled?
+ FIXME("Partial stub! Don't support flag: 0x%x\n", Flags);
At least some flags are easy to support mapping them to sharing and creation disposition modes.
This is the first patch of a series of patches to implement it. And these flags will be supported in the second and the third patch. Can I sent them after the first was committed or I should sent them at one time? -- Regards, Jactry Zeng
participants (2)
-
Jactry Zeng -
Nikolay Sivov