+ draw_image_record->SrcRect.Width = units_to_pixels(srcwidth, srcUnit, metafile->image.xres);; + draw_image_record->SrcRect.Height = units_to_pixels(srcheight, srcUnit, metafile->image.yres);;
One semicolon is probably enough.
I think we should put a little more effort into object management up front.
I would start it by having the Add*Object functions return an id to the caller, and adding a ReleaseObjects function to indicate that the current objects are no longer needed. For now, we could just implement this as a counter that we reset to 0.