I tried to follow your advice, but it does not solve the problem.
I think the char** is build correctly.
I store there some user-specific selections, which the user has made during
the use of the tool.


"Chris Apers" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> If you use it in a form, you must lock the handle in the form init
function
> and unlock it only when you close the form.
>
> But perhaps the problem is how you build your char ** ?
> what is the purpose of your myAppPrefs.it ?
>
>
> ----- Original Message ----- 
> From: "Pit" <[EMAIL PROTECTED]>
> Newsgroups: palm-dev-forum
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Tuesday, April 20, 2004 3:50 PM
> Subject: Re: Problem with MemHandleResize - memErrChunkLocked
>
>
> > Hey,
> > special thanks for your detailed explanation.
> > Now its clear for me!
> >
> > But now i have a new problem!
> > I pass the generated char** to a dynamic list.
> >
> >    temp1 = ConvertBestellungenList ();
> >    size = sizeof (temp1);
> >    LstSetListChoices (theListPtr, temp1, size);
> >
> >
> > Sometimes it works fine, sometimes i get an "invalid chunk ptr".
> > I am not sure whats going wrong.
> > I debugged this, and before the call of LstSetListChoices, im looked in
> the
> > temp1-char**
> > It looks like that all is correct, but the error still occur!
> >
> > Best Regards
> > Peter
> >
> >
> > "Chris Apers" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > news:[EMAIL PROTECTED]
> > > You store your char** in the handle using MemHandleLock
> > > Each time you need to read/write access the data you use
> > > MemHandleLock/Unlock.
> > >
> > > Create a new handle :
> > > MemHandle myH = MemHandleNew(...);
> > > myAppPrefs.it = myH;
> > >
> > > Then you want to write your char** :
> > > char **myCharPP = MemHandleLock(myAppPrefs.it);
> > > myCharPP = ...; // or whatever you want
> > > MemHandleUnlock(myAppPrefs.it);
> > >
> > > If you want to read it :
> > > char **myCharPP = MemHandleLock(myAppPrefs.it);
> > > char **readPP = myCharPP; // or whatever you want
> > > MemHandleUnlock(myAppPrefs.it);
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Pit" <[EMAIL PROTECTED]>
> > > Newsgroups: palm-dev-forum
> > > To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, April 20, 2004 1:04 PM
> > > Subject: Re: Problem with MemHandleResize - memErrChunkLocked
> > >
> > >
> > > > OK, but what is really obscour to me is, how can i save my char**
into
> > > this
> > > > handle!
> > > > Is there an example available, how explains this to an palm-newbie?
> > > > Best Regards
> > > > Peter
> > > >
> > > > "Chris Apers" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > > > news:[EMAIL PROTECTED]
> > > > > in your typedef, instead of :
> > > > >
> > > > > MyPtr it;    // where MyPtr is the actual type you are using
> > > > >
> > > > > use
> > > > >
> > > > > MemHandle it;
> > > > >



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to