I can't, for the life of me, imagine why you'd need to do this. Do you
want to insure that you're app runs even when someone changes the
creator ID?

Anyway, here's how you do it:

        UInt16 cardNo;
        LocalID dbID;
        UInt32 creatorID;
        Char appname[32];
        Char creatorIDString[5];
        Char output[80];
        int i;

        if (!SysCurAppDatabase(&cardNo, &dbID))
        {
                DmDatabaseInfo(cardNo, dbID, appname,
                        NULL, NULL, NULL, NULL, NULL, NULL,
                        NULL, NULL, NULL, &creatorID);

                creatorIDString[4] = 0;
                for (i = 0; i < 4; i++)
                        creatorIDString[i] = ((char *)&creatorID)[i];

                MemSet(output, 80, 0);
                StrPrintF(output, "Creator: %s\nName: %s", creatorIDString, 
appName);
        }


Now... why? :)

Brandon



On Wed,  9 Feb 2005 18:03:31 -0000, Mihail Ivanchev
<[EMAIL PROTECTED]> wrote:
> Hallo. I need to read preferences at the start of my application but i need 
> to the creator id of the app. I know it of course before the app starts but 
> how can i get it programatically? 10x
> --
> 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