BUG REPORT -- BCX 5/23/2009

Kevin Diggins
Sun May 24 05:40:14 PDT 2009


--- In BCX at yahoogroups.com, "mikehg_67" <mikehg_67 at ...> wrote:
> 
> Hi Kevin,
> 
> Thanks for the feedback.
> I have not been able to come up with a scenario that the
> addressof(&)  op would be needed in a free statement. Do you 
> have a short example?
> 
> Thanks,
> Mike



Hi Mike,

Yes ... [Screen Shot Grabber]
http://www.bcxgurus.com/mrbcx_samples/screenshotgrabber.zip


In FUNCTION Blend (), in the Raster_Operations.Bas file, this code:

'*********************************************************
' FREEing img3.buf while the bits are still associated
' with a HBITMAP (bm in our case) results in a GFP!
' These next 2 lines prevent that GPF scenario
'*********************************************************
  DeleteObject(bm)                    'added 12/1/2007
  FREE (&img3.buf)                    'added 12/1/2007
'*********************************************************


Also, img3 is defined as:


TYPE IMAGE
  width AS INTEGER
  height AS INTEGER
  bufLen AS INTEGER
  bmi AS BITMAPINFO
  buf AS LPBYTE
END TYPE


The intent is to free only the .buf portion of img3, in order to prevent resource and memory leaks.

IIRC, Emil Halimg originally wrote BLEND. I later adapted it for SSG.


Hope that helps


P.S. 
 
This is the only issue that I've run across, so far, with the new version of BCX.  


           



More information about the BCX mailing list