On Tue, 20 Jan 2004, R Luna wrote:

> Thank's
>  I developer in CW 7,
>  I'm back with this, in the version 7  I execute only strcopy and it's ok
> but now i need MemHandleNew(),
> MemHandleLock()
> StrCopy
> MemHandleResize()
> MemHandleUnLock()
This hasn't changed since version 7 of Codewarrior - and is a PalmOS 
thing rather than a CW thing.  You may also want to look at
MemPtrNew/MemPtrFree which work more similarly to the standard C
malloc and free - but can only be used for allocating non-movable
chunks i.e. blocks of memory that you will not be trying to resize
later.  I am amazed that your strcpy worked in version 7 without
you allocating memory for your strings as this should not be in any
flavour of C.

> the problem are solve.
> MemHandleNew not present in th tipical C, I working with pointers (Malloc)
Maybe not - but the concepts are exactly the same - you can't work
with a string (or any pointer) unless you allocate memory (malloc
and free or MemPtrNew/MemPtrFree) or declare it static

char myStaticChar[255];

Fergal.

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

Reply via email to