P.S.: Of course the code below assumes that you are running on big
endian (m68k). If you want to port this to a non-endian system (e.g. ARM
code), you will need to convert i_creatorID to/from little_endian first.

Daniel

Am Mittwoch, den 19.04.2006, 07:30 +0200 schrieb Daniel Seifert:
> Am Mittwoch, den 19.04.2006, 02:13 +0000 schrieb Phil:
> > Based on APIs from the Data and Resource Manager, the creator ID of an
> > application is a UInt32. How can I convert the UInt32 creator ID into
> > a 4-letter string (like "addr" or "calc"...) 
> 
> UInt32 i_creatorID = 'abcd';
> char s_creatorID[5];
> 
> StrNCopy(s_creatorID, (char*)&i_creatorID, 4);
> s_creatorID[4] = 0;
> 
> > and vice versa?
> 
> i_creatorID = *((UInt32*)s_creatorID);
> 
> Daniel
> 
> 
> 
> 


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

Reply via email to