On 11/18/2013 16:02, Jactry Zeng wrote:
update:
- Use 0 in HeapAlloc instead of HEAP_ZERO_MEMORY;
- 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@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