Am Dienstag, 19. Juni 2007 12:18 schrieb H. Verbeet:
On 19/06/07, Stefan Dösinger stefandoesinger@gmx.at wrote:
- if (hr != S_OK) return NULL;
Any reason for not simply using FAILED(hr) there?
Actually no, except that it was copypasted from existing code. I'll fix that and resend.
- object->decls = HeapAlloc(GetProcessHeap(), 0, 0);
Is that useful?
Yeah, HeapReAlloc works on object->decls with 0 bytes allocated, but not on a NULL pointer. It keeps the array growing simpler. I can just use HeapReAlloc unconditionally instead of something like this
if(object->decls) HeapRealloc(...); else HeapAlloc(...);