No... I'm not doing anything wrong with ChangeLabel....
And If I did... how could it work the first time
and not the second...

Richard Burmeister wrote:

> From: "Patrick Ouellet" <[EMAIL PROTECTED]>
> Subject: Invalid Handle
>
> >      if(ArmedState == false)
> >      {
> >       Handle AText = MemHandleNew(8);
> >       StrCopy(MemHandleLock(AText), "Armed");
> >       MakeMyBeep(shortBeep, 3);
> >       ArmedState = true;
> >       ChangeTextLab(MainText164Field, AText);
> >       MemHandleUnlock(AText);
> >       MemHandleFree(AText);
> >      }
> >      else
> >      {
> >       Handle DText = MemHandleNew(10);
> >       StrCopy(MemHandleLock(DText), "Disarmed");
> >       MakeMyBeep(shortBeep, 5);
> >       ArmedState = false;
> >       ChangeTextLab(MainText164Field, DText);
> >       MemHandleUnlock(DText);       <--- Invalid Handle
> >       MemHandleFree(DText);
> >      }
> >      MemHandleUnlock(GCode);
>
> Just a guess, but I'd look carefully at what you are doing inside
> ChangeTextLab() since you are passing the Handle DText to it and you could
> be doing something to the handle inside that function.



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to