Timothy,

If you don't find that build number, you can always use the creation date of
your .prc file:



static Err DbGetApplicationCreationDate(void)
{
        //Search for "database" of the appl type.
        {
                DmSearchStateType searchState;
                UInt32 dbType, crDate;
                UInt16 cardNum;
                LocalID dbID;
                UInt8 dbWgSelection = 0;
                UInt8 dbSwSelection = 0;
                DateTimeType dateTime;


                if (dmErrCantFind != DmGetNextDatabaseByTypeCreator(//inputs
        
true, &searchState,
        
NULL, appFileCreator,
        
true,
        
//outputs
        
&cardNum, &dbID))
                {
                        do
                        {
                                DmDatabaseInfo(//inputs
                                                           cardNum, dbID,

                                                           //outputs
                                                           NULL, NULL, NULL,
&crDate, NULL, NULL,    
                                                           NULL, NULL, NULL,
&dbType, NULL);

                                if (dbType == 'appl')
                                {
                                        char string[100];
                                        char dateString[100];
                                        char timeString[100];
                                        FormPtr frmP;

                                        frmP = FrmGetFormPtr(AboutForm);

                                        TimSecondsToDateTime(crDate,
&dateTime);
                                        DateToAscii(dateTime.month,
dateTime.day, dateTime.year, dfDMYLongWithComma, &dateString[0]);
                                        TimeToAscii(dateTime.hour,
dateTime.minute, tfColon24h, &timeString[0]);

                                        StrPrintF(string, "Created: %s at
%s", dateString, timeString);
                                        FrmCopyLabel(frmP,
CreationDateLabel, string);                                     

                                        
                                        
                                }
                        }
                        while (dmErrCantFind !=
DmGetNextDatabaseByTypeCreator(//inputs
        
false, &searchState,
        
NULL, appFileCreator,
        
true,
        
//outputs
        
&cardNum, &dbID));
                }
        }
        return 0;
}



Regards
Gert van Kruiningen

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Timothy
Dean
Sent: Saturday, 14 August 2004 05:37
To: Palm Developer Forum
Subject: CodeWarrior build number

Is there an automatically generated build number in CodeWarrior, and a way
to get at it?  I want to automatically update a build number in the about
screen of my app.  Thanks.

Timothy Dean
MobileDataforce



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




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

Reply via email to