it'll be a hex number, not a string like you're expecting. 
 
you'll have to concatenate the major, minor etc numbers together in a
string with dots in-between the numbers - i guess this is what you're
after.
 
unless anyone else knows a better way of doing this?
 
i had a look in Incs\Core\System\SystemMgr.h for the macros for getting
the values
 
hope this helps you on your way
 
- dave
 
// MACRO: sysMakeROMVersion
//
// Builds a ROM version value from the major, minor, fix, stage, and
build numbers
//
#define sysMakeROMVersion(major, minor, fix, stage, buildNum)   \
  (                     \
  (((UInt32)((UInt8)(major) & 0x0FF)) << 24) |       \
  (((UInt32)((UInt8)(minor) & 0x00F)) << 20) |       \
  (((UInt32)((UInt8)(fix)   & 0x00F)) << 16) |       \
  (((UInt32)((UInt8)(stage) & 0x00F)) << 12) |       \
  (((UInt32)((UInt16)(buildNum) & 0x0FFF)))        \
  )
 

// Macros for parsing the ROM version number
// (the system OS version is obtained by calling
// FtrGet(sysFtrCreator, sysFtrNumROMVersion, dwOSVerP), where dwOSVerP
is
// a pointer to to a UInt32 variable that is to receive the OS version
number)
#define sysGetROMVerMajor(dwROMVer)  (((UInt16)((dwROMVer) >> 24)) &
0x00FF)
#define sysGetROMVerMinor(dwROMVer)  (((UInt16)((dwROMVer) >> 20)) &
0x000F)
#define sysGetROMVerFix(dwROMVer)  (((UInt16)((dwROMVer) >> 16)) &
0x000F)
#define sysGetROMVerStage(dwROMVer)  (((UInt16)((dwROMVer) >> 12)) &
0x000F)
#define sysGetROMVerBuild(dwROMVer)  (((UInt16)(dwROMVer))         &
0x0FFF)

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Karthik
Jaganathan
Sent: 11 April 2008 12:02
To: Palm Developer Forum
Subject: RE: how to find OS name, version, devicename?



i did both the technique that u said,that is convert the romVersion into
Char *, and StrIToH method,  but still it doesnt produce proper result,
actually what the result should come?
Thanks with
karthik





________________________________

        Subject: RE: how to find OS name, version, devicename?
        Date: Fri, 11 Apr 2008 09:41:04 +0100
        From: [EMAIL PROTECTED]
        To: palm-dev-forum@news.palmos.com
        
        
        romVersion is a UInt32, you'll need to convert it to a string
Char*, and pass that to WinDrawChars. You can use StrIToH.
         
________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Karthik
Jaganathan
        Sent: 11 April 2008 07:38
        To: Palm Developer Forum
        Subject: RE: how to find OS name, version, devicename?
        
        
        hi riyon,
            i also used the windraw method to print romVersion value but
it shows some correpted value, how to display it?
        
        i used like this
        WinDrawChars((Char *) &romVersion,4, 20, 30);
        




________________________________

                Date: Thu, 10 Apr 2008 23:14:05 -0700
                From: [EMAIL PROTECTED]
                To: palm-dev-forum@news.palmos.com
                Subject: Re: how to find OS name, version, devicename?
                
                
                
                
                On 4/10/08, Karthik Jaganathan <[EMAIL PROTECTED]>
wrote: 

                        hi Le,
                        
                        thanks for ur reply, i used the method to find
os version,
                        UInt32 romVersion;
                        miscErr = FtrGet(sysFtrCreator,
sysFtrNumROMVersion, &romVersion );
                        if i print the romVersion it doesn't show the
result, similarly memory details,
                        but deviceid, companyid shows exact result, 

                It's a hex value, though I forget the exact format.
                You can, however, compare the OS version with a required
one, using the macro sysMakeRomVersion
                if (romVersion >=
sysMakeROMVersion(5,0,0,sysROMStageRelease,0))
                //OS 5 or above
                 


                        Le i am having  one more doubt, can i show the
company name(like palm inc), device name(like treo 680) instead of
deviceid(D053), companyid(hspr).

                If you keep a table in your code to cross-reference it
to. 


                        Thanks with,
                        karthik
                        



________________________________

                        > From: [EMAIL PROTECTED]
                        > To: palm-dev-forum@news.palmos.com
                        > Subject: re: how to find OS name, version,
devicename?
                        > Date: Thu, 10 Apr 2008 07:21:43 -0700 
                        
                        > 
                        > karthik wrote:
                        > 
                        > > if i install my application into some mobile
devices, and if i
                        > > click a button, it should open a form, and
it shows the
                        > > corresponding device name, OS name, and OS
version, memory
                        > > used etc, is there any api for that please
find for me,
                        > > i searched palm os reference manual but i
cant find it please help
                        > > for me.
                        > 
                        > OS FtrGet( sysFtrCreator, sysFtrNumROMVersion,
&romVersion );
                        > Memory MemHeapFreeBytes( 0, &gFreeHeap,
&feature );
                        > Device FtrGet( sysFtrCreator,
sysFtrNumOEMDeviceID, &feature );
                        > 
                        > See also
http://www.mobilegeographics.com/dev/devices.php
                        > 
                        > 
                        > Luc Le Blanc
                        > 
                        > -- 
                        > For information on using the ACCESS Developer
Forums, or to unsubscribe, please see
http://www.access-company.com/developers/forums/
                        
                        
________________________________

                        Windows Live Messenger : Get connected, share
yourself, make a difference the way you chat. Check it out!
<http://get.live.com/messenger/overview> 
                        
                        -- 
                        For information on using the ACCESS Developer
Forums, or to unsubscribe, please see
http://www.access-company.com/developers/forums/




                -- 
                Thanks and best regards,
                Ryan Rix
                TamsPalm - The PalmOS Blog
                
                
                Jasmine Bowden - Class of 2009, Marc Rasmussen - Class
of 2008, Erica
                Sheffey - Class of 2009, Rest in peace. 
                -- 
                For information on using the ACCESS Developer Forums, or
to unsubscribe, please see
http://www.access-company.com/developers/forums/


________________________________

        Windows Live Spaces : Help your online world come to life, add
500 photos a month. Try it! <http://home.services.spaces.live.com/> 
        
        -- 
        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/


________________________________

Coolhotmail : Board of the same old Email ID's? Get a unique one here.
Try it now! <http://www.ideacellular.com/IDEA.portal> 

-- 
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