Ryan, I think you need to send some more real code (function or module). 
The snippled below is fine and not the reason for the crash.

>Char *p = (Char *)MemPtrNew(32);
>StrPrintF(p, "%d", num);
>MemPtrFree(p);

Kind regards, Harald

-
[EMAIL PROTECTED]
http://www.gps-laptimer.de


-----Ursprüngliche Nachricht-----
Von: %%email.bounce%% [mailto:%%email.bounce%%] Im Auftrag von Geetha Arasu
Gesendet: Dienstag, 8. Januar 2008 04:06
An: Palm Developer Forum
Betreff: RE: unable to use StrPrintF()



 
Thanks!
I tried using this code... still I get the same error.. to say exactly the
error message is Run68K.c, Line:2256, Invalid write to 0000859C .. Any idea
..


-----Original Message-----
From: %%email.bounce%% [mailto:%%email.bounce%%] On Behalf Of Ryan Dorn
Sent: Monday, January 07, 2008 8:15 PM
To: Palm Developer Forum
Subject: RE: unable to use StrPrintF()

If you use this code:

Char *p = (Char *)MemPtrNew(32);
StrPrintF(p, "%d", num);
MemPtrFree(p);

Does it still crash?

Also, if it does crash, are you absolutely sure that
this is where it is happening?

- Ryan

--- Geetha Arasu <[EMAIL PROTECTED]> wrote:

> 
> 
>  Thanks!
> I used both the initializations  with the array and
> the pointer earlier ..
> Char *p or char p[20].. still I am getting the same
> error. Its very strange 
> 
> Is there any alternate function to print the value
> to a string?
> 
> 
> -----Original Message-----
> From: %%email.bounce%% [mailto:%%email.bounce%%] On
> Behalf Of Hynek Sladky
> Sent: Monday, January 07, 2008 5:53 PM
> To: Palm Developer Forum
> Subject: Re: unable to use StrPrintF()
> 
> 1. p is not initialized in Your example!
>     p=MemPtrNew (32);
>   or
>     Char p[32];
> 2. num is UInt16 or Int16? In case of 32-bit value
> use %ld...
> 
> Hynek Sladky
> 
> 
> Geetha Arasu wrote:
> > 
> >  I am not able to use StrPrintF()
> > Char *p;
> > StrPrintF(p,"%d" , num);
> > 
> > Where num is short data type.
> >  
> >   When I use this func, there are no compile
> errors but shows the run time
> > error message " Invalid write to 008F3301"
> > 
> > Could any one suggest is there any error in the
> above function or is there
> > any alternate method to print the value to a
> string.
> 
> -- 
> For information on using the ACCESS Developer
> Forums, or to unsubscribe,
> please see
> http://www.access-company.com/developers/forums/
> 
> 
> 
> -- 
> For information on using the ACCESS Developer
> Forums, or to unsubscribe, please see
> http://www.access-company.com/developers/forums/
> 



 
____________________________________________________________________________
________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


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



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



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

Reply via email to