Dll Import to prevent crash/memory overrun

Uses gdi32 to delete the pointer.