[GDI+: 3/10] graphics implementation
Detlef Riekenberg
wine.dev at web.de
Tue Jun 12 13:04:28 CDT 2007
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.
--
By by ... Detlef
More information about the wine-devel
mailing list