Hi,
I am trying to display text on to a field object by using the following
function :-
void DisplayTxtToField(FormPtr frm, UInt16 fieldID, Char* tempString)
{
MemHandle userTextH;
FieldPtr fldP;
Err err;
fldP = FrmGetObjectPtr(frm,FrmGetObjectIndex (frm, fieldID));
userTextH = MemHandleNew( StrLen(tempString) + 1);
StrCopy(MemHandleLock(userTextH), tempString );
MemHandleUnlock(userTextH);
FldSetTextHandle(fldP,userTextH);
FldDrawField(fldP);
err = MemHandleFree(userTextH);
}
where tempString stores the text to be displayed....
The first time I call the function it works fine...but the second time around
I get this error
: Browser has just read directly from an unlocked memory chunk.
Is there something wrong in the code?
Thanks in advance
vishy
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/