Hi Max,
Thank you for your reply and helping me with the INITIALIZATION error in the
ShortCut codes. What I did is, I continued with the same codes but added
a single line of code initializing the data2 variable as per your advise.
Yes I forgot the initialization part for the variable. After that, it
worked and also solved all the problems.
Here is my code snippet:
UInt8
-----------------------> old code
UInt16 length;
namep=(Char *)MemPtrNew(200);
label=(Char *)MemPtrNew(200);
// len= (5 * sizeof(UInt16))+(5 * sizeof(UInt16));
len=(UInt16)MemPtrNew(200);
err = GrfGetMacroName(indx,namep);
data2=(UInt8 *)MemPtrNew(200); -----------------------------> Added
newly after your reply.
if(err == 0){
err2 = GrfGetMacro(namep,data2,&len); } --------------------->Old
code.
Thanks to you a lot. Regards, Yuva
============================================================
Hi Mr. Yuva Kumar,
What you did is totally wrong... data2 is never initialized before you use
it.
Read any C book's chaptor about pointers. Maybe you just forget to
understand
the API before you use it?
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/