Results 1 to 6 of 6
  1.    #1  
    Hi All.

    I am a new member and i have a question. i find a source code for Treo Flash ID rewieving. But i don't compile this code. it's important for me. Pls anyone compile these code for me ? or any idea about program like code ? i need prc file , than i will try it. Thx.

    char serialNumber[32];
    serialNumber[0] = 0;
    if (handspring)
    {
    UInt16 size;
    size = sizeof(serialNumber);
    HsGetVersionString(hsVerStrSerialNo,serialNumber,&size);
    }
    else
    {
    UInt8 *p;
    UInt16 size;
    if (SysGetROMToken(0,sysROMTokenSnum,&p,&size) == 0 && size
    > 0 && *p != 0xFF)
    {
    if (size > sizeof(serialNumber)-1)
    size = sizeof(serialNumber)-1;
    MemMove(serialNumber,p,size);
    serialNumber[size] = 0;
    }
    }
  2. #2  
    I successfully compiled this code, and it runs in the simulator. What exactly does it do? Is it supposed to output something?

    I attached a PRC that simply runs the code you posted when it starts, then exits. Is this how it is supposed to work? I'm much too lazy to figure out what it's supposed to do.

    If you want to learn to program palms, check out my thread: http://discuss.treocentral.com/showthread.php?t=110762

    Run the attachment at your own risk, I have no idea what it does.

    Pulsar

    Code:
    UInt32 PilotMain (UInt16 cmd, void *cmdPBP, UInt16 launchFlags) 
    { 
    char serialNumber[32];
    serialNumber[0] = 0;
    if (handspring)
    {
    UInt16 size;
    size = sizeof(serialNumber);
    HsGetVersionString(hsVerStrSerialNo,serialNumber,&size);
    }
    else
    {
    UInt8 *p;
    UInt16 size;
    if (SysGetROMToken(0,sysROMTokenSnum,&p,&size) == 0 && size
    > 0 && *p != 0xFF)
    {
    if (size > sizeof(serialNumber)-1)
    size = sizeof(serialNumber)-1;
    MemMove(serialNumber,p,size);
    serialNumber[size] = 0;
    }
    }
    return 0; 
    }
    Attached Files Attached Files
    Last edited by PulsarSL; 04/09/2006 at 06:28 PM.
  3.    #3  
    Thanks PulsarSL. But it's not working on treo and simulator... Have can we do this problem. Pls help. Thanks again.
  4. #4  
    Quote Originally Posted by QNURi
    Thanks PulsarSL. But it's not working on treo and simulator... Have can we do this problem. Pls help. Thanks again.
    What isn't working? Does it give an error? Reset?

    Pulsar
  5.    #5  
    Hi, Pulsar.

    There is error or reset problem. when i was clicking on program icon , it isn't working. Not alert, not error , anything... :=) Heeeeeelp Pls.
  6. #6  
    So it resets on run?

    Sorry, this is out of my league. Maybe a more experienced developer can help you more...

    PulsarSL

Posting Permissions