On Mo, 2007-06-11 at 11:54 -0700, Evan Stade wrote:
+GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics) +{
- if(hdc == NULL)
return OutOfMemory;
- if(graphics == NULL)
return InvalidParameter;
- *graphics = (GpGraphics*) HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
sizeof(GpGraphics));
- (*graphics)->hdc = hdc;
- (*graphics)->hwnd = NULL;
There is no need to set a member to NULL, when you use HEAP_ZERO_MEMORY.