> I was looking over some code in my program and all of a sudden I got > nervous. The following bit of code works, but should I be locking resHand& > before copying data from it? > > resHand&=FN GETRESOURCE(_"GeoJ",id) > err% = SYSERROR > siz& = FN GETHANDLESIZE(resHand&) > LONG IF resHand& <>0 and err%=_false 'NOT err% > CALL SETRESLOAD(_True) > CALL LOADRESOURCE(resHand&) > adr&=PEEK LONG (resHand&) > recAdr&=@gGrad > BLOCKMOVE adr&, recAdr&, _bSz > END IF > CALL RELEASERESOURCE(resHand&) Yes, it is a very wise move. If the resource should move, you won't crash but will instead blockmove a bunch of garbage into adr&. Lock that sucker. -Derek ---------------- www2.hawaii.edu/~dereksmi ----------------