Symbian 签名和Uid相关内容的整理(二)

每个symbian应用程序有3个uID:

 

UID1-第一个UID(类型):

       UID1用来设定该应用程序是一个执行程序(executable file)还是一个数据文件(data file).

UID1-Indicates whether this is an executable file or data file.

UID value
 Numeric value (Hex)
 Meaning
 
KExecutableImageUid
 0x1000007A
 Indicates this an .exe executable file
 
KDaynamicLibraryUid
 0x10000079
 Indicates this a DLL(executable) There are various types, with different extension(.dll, .app, .ldd, .pdd)
 
KDirectFileStoreLayoutUid
 0x10000037
 Indicates this is a direct file store (data, not executable)Bracketed values from header files
 
KPermanentFileStoreLayoutUid
 0x10000050
 Indicates this is a permanent file store(data, not executable)

 

UID2-第二个UID(子类型):

       UID2-具体含义取决于UID1的值:

1.       如果UID1是KExecutableImageUid, UID2不使用,所以UID2的值可以随意取。

2.       如果UID1是KDynamicLibraryUid, UID2将会是:

UID value
 Numeric value (Hex)
 Meaning
 
KSharedLibraryUid
 0x1000008D
 Indicates this is a static interface DLL (.dll)
 
KUidApp
 0x100039CE
 Indicates an application conforming to APPARC(includes all Qikon apps, .app)
 
KLogicalDeviceDriverUid
 0x100000AF
 Indicates his is a logical decive driver (.ldd)
 
KPhysicalDeviceDriverUid
 0x100039D0
 Indicates this is a physical device driver(.pdd)


3.       如果UID1是KDirectFileStoreLayoutUid或者KPermanentFileStoreLayoutUid,那么UID2将是:

        UID value
 Numeric value (Hex)
 Meaning
 
KUidAppDllDoc
 0x10003A12
 Indicates this is a file store created by an .app to store user data (i.e, a document)
 
KUidAppInfoFile
 0x10003A38
 Indicates this is an AIF file (a type of file store)

 

UID3-第三个UID(子子类型):

       每个独立的应用程序有一个唯一的UID3值,它也被用作安全ID(secure ID),对于UIKON应用程序而言,用于关联数据文件和程序:

1.       对于dll和exe文件,它辩识特定的二进制(it identified the particular binary)。

2.       对于.app(UIKON应用程序),它辩识特定的应用程序(it identified the particular application program).

3.       对于由.apps创建的文件存储(file stores),它辩识和该文件相关的应用程序(it identifies the application program associated with this file).

4.       对于其他文件存储(file stores), 它没有典型的用途(但是你可以自定义它的用途)。

 

SID(Security ID):

       二进制的安全标志符(SecureID)并没有明确地指定,如果你没有为它设定值的话,它默认是和UID3相同的,如果UID3也没有设定的话,它就会被视为是KNullUID, 如果应用程序的SecureID是KNullUId的话,就意味着未定义,并可能导致几个后果,如对应用程序使用的数据缺少保密性(privacy)。

 

如果你创建一个dll,通过在.mmp文件中指定TARGETTYPE dll,你会得到.lib和.dll文件对。你可以通过两种方式来动态链接该dll(dynamic load): 通过在.mmp文件中导入它的.lib文件,这种情况下,你没有必要指定UID;通过使用RLibary类型实时(runtime)导入dll文件,这种情况必须指定UID.

 

如果你通过在MMP文件中设定TARGETTYPE lib来创建.lib文件,链接该.lib文件时(static link), 你获得的是一个包含所有代码的.lib文件,这时候无需指定一个UID.


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/actual_/archive/2009/11/28/4885684.aspx

posted @ 2010-04-18 20:30  秋天的风  阅读(448)  评论(0编辑  收藏  举报