this looks like a wwrong datattype convertion, like you put the result from StrLen in a int (which is only 16 bit and signed). 50400 in a int will produce a negative number, then you maybe convert it to an Int32 and peng it will give you nonsense. Something like this, maybe you can post the code lines, if you don't find it.

Henk

averoes wrote:

you're right, i was so sure that my problem was MemHandleNew that i didn't
notice that tb_size was so big !!

in fact, the problem is not MemHandleNew but StrLen !

when StrLen should return 50400, it returns 4294952512 !?!

Any idea ???

Thanks,
Averoes

"Henk Jonas" <[EMAIL PROTECTED]> a �crit dans le message de news:
[EMAIL PROTECTED]

tb_size is around 4 * 10^9 which is 4 GByte, or I'm wrong? What handle
shall the system return? You better check for a NULL handle and go with

it.

Henk

averoes wrote:


Hi All !

I have some troubles with MemHandleNew !

UInt32 tb_size = StrLen(MyStr);
UInt8* tb;
MemHandle tb_h = MemHandleNew(tb_size); // here is the problem !
tb = (UInt8*)MemHandleLock(tb_h);
...

everything is OK if tb_size is not too big,
for example if tb_size = 4294952512, then tb_h = NULL, then FATAL ERROR

!!

[...]

--
-------------------------------------------------------------------------
[EMAIL PROTECTED]                                       www.metaviewsoft.de

<A HREF="http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>
<IMG SRC="http://user.cs.tu-berlin.de/~jonash/werbung.jpg";></A>
-------------------------------------------------------------------------








--
-------------------------------------------------------------------------
[EMAIL PROTECTED]                                       www.metaviewsoft.de

<A HREF="http://www.handango.com/PlatformTopSoftware.jsp?authorId=95946";>
<IMG SRC="http://user.cs.tu-berlin.de/~jonash/werbung.jpg";></A>
-------------------------------------------------------------------------


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

Reply via email to