<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - symbian v9 capabilties with DLLs | how to build static library - Comments</title>
 <link>http://www.newlc.com/en/topic-17416</link>
 <description>Comments for &quot;symbian v9 capabilties with DLLs | how to build static library&quot;</description>
 <language>en</language>
<item>
 <title>Re: symbian v9 capabilties with DLLs | how to build static libra</title>
 <link>http://www.newlc.com/en/topic-17416#comment-37030</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;If anyone is interested, I have just received a reply in symbian newsgroup:&lt;br /&gt;&lt;br /&gt;&amp;quot;Capabilities aren&amp;#039;t what an app needs, but what they can be trusted with.&lt;br /&gt;A general DLL needs all the capabilities of every app, and dll, that (may)&amp;nbsp; &lt;br /&gt;use it.&lt;br /&gt;The result is that general purpose DLLs are usually specified as&lt;br /&gt;CAPABILITY ALL -TCB&lt;br /&gt;(or CAPABILITY CAP_GENERAL_DLL)&amp;quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote from: ogryzok&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;Hello,&lt;br /&gt;&lt;br /&gt;1) I set PlatSecEnforcement ON in epoc.ini to see, why my app cannot run in &lt;br /&gt;the phone. Launching my app fails with:&lt;br /&gt;&amp;quot;Menu: unable to execute file for security reasons&amp;quot;.&lt;br /&gt;&lt;br /&gt;On emulator with security ON, I have (epocwind.out):&lt;br /&gt;622.730 *PlatSec* ERROR - Capability check failed - Can&amp;#039;t load MyApp.exe &lt;br /&gt;because it links to thirdPartyDll.dll which has the following capabilities &lt;br /&gt;missing: NetworkServices LocalServices&lt;br /&gt;&lt;br /&gt;thirdPartyDll.dll (static interface DLL) has CAPABILITY NONE, since it &lt;br /&gt;doesn&amp;#039;t need any caps.&lt;br /&gt;&lt;br /&gt;My question: if in thirdPartyDll.dll project to set CAPABILITY ALL, will it &lt;br /&gt;help to make my .exe independent of thirdPartyDll.dll caps?&lt;br /&gt;&amp;nbsp; &amp;nbsp; thirstPartyDll.mmp: CAPABILITY ALL&lt;br /&gt;&amp;nbsp; &amp;nbsp; MyExe.mmp: CAPABILITY NetworkServices etc.&lt;br /&gt;&lt;br /&gt;I cannot ask 3rd party everytime to re-build a DLL evertytime my .exe needs &lt;br /&gt;new capabilities. What am I missing here?&lt;br /&gt;&lt;br /&gt;Another question&lt;br /&gt;2) How do we make static libraries on Symbian v9?&lt;br /&gt;I found a document here: &lt;br /&gt;&lt;a href=&quot;http&amp;#58;//sw.nokia.com/id/79242fb7-ec4c-4fba-99b7-06747ef8b799/Symbian_OS_Platform_Independent_Engine_Development_v1_0_en.pdf&quot; target=&quot;_blank&quot;&gt;http://sw.nokia.com/id/79242fb7-ec4c-4fba-99b7-06747ef8b799/Symbian_OS_Platform_Independent_Engine_Development_v1_0_en.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;However, setting the target and target type to lib does not help:&lt;br /&gt;TARGET staticlib.lib&lt;br /&gt;TARGETTYPE lib&lt;br /&gt;&lt;br /&gt;The build process still produces a DLL (and a .lib (static interface DLL)) &lt;br /&gt;and the line&lt;br /&gt;/* &lt;li type=&quot;square&quot;&gt; */ macro __DLL__ SYMBIAN&lt;br /&gt;is added to .mmp file&lt;br /&gt;&lt;br /&gt;I&amp;#039;m using Visual studio with carbide&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jevgenij &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 24 Jan 2007 12:58:24 +0100</pubDate>
 <dc:creator>ogryzok</dc:creator>
 <guid isPermaLink="false">comment 37030 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: symbian v9 capabilties with DLLs | how to build static libra</title>
 <link>http://www.newlc.com/en/topic-17416#comment-37029</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote from: puterman&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;Capabilities are interpreted differently for DLL:s and EXE:s.&amp;nbsp; I recommend that you read up on the available documentation at symbiansigned.com (or the platsec book).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Documentation: &lt;br /&gt;&amp;quot;Capabilities are granted to programs (i.e. processes) only. Where a program (an .EXE file)&lt;br /&gt;loads a library (a .DLL file), the library is loaded only if it is authorised for all the capabilities&lt;br /&gt;already possessed by the loading program; if not, the program will fail. Capabilities of both&lt;br /&gt;programs and libraries are assigned in the source code (the .MMP file)...&lt;br /&gt;If a process that has been assigned specific capabilities calls code inside a DLL, that DLL must&lt;br /&gt;have been granted the same (or more) capabilities as those given to the calling program. .... Therefore, the DLL must&lt;br /&gt;contain sufficient capabilities itself in order to ensure that the requirements of all callers are&lt;br /&gt;fulfilled.&lt;br /&gt;For example:&lt;br /&gt;The program P.EXE is linked to the library L1.DLL.&lt;br /&gt;The library L1.DLL is linked to the library L0.DLL.&lt;br /&gt;Case 1:&lt;br /&gt;P.EXE holds Cap1 &amp;amp; Cap2&lt;br /&gt;L1.DLL holds Cap1 &amp;amp; Cap3&lt;br /&gt;L0.DLL holds Cap1 &amp;amp; Cap2.&lt;br /&gt;The load fails because P.EXE cannot load L1.DLL (no Cap2).&amp;quot;&lt;br /&gt;&lt;br /&gt;My situation is:&lt;br /&gt;Case my:&lt;br /&gt;P.EXE holds Cap1 &amp;amp; Cap2&lt;br /&gt;L1.DLL holds no caps&lt;br /&gt;&lt;br /&gt;The load fails because P.EXE cannot load L1.DLL (no Caps1, no Cap2).&lt;br /&gt;&lt;br /&gt;It&amp;#039;s a shared DLL, I&amp;#039;m using. And my program will change with the time and will require more capabilities. As fas as I understand, the DLL will have to be rebuilt (with new caps) each time, I add new caps to my exe.&lt;br /&gt;That&amp;#039;s why I was asking if it was possible to give all caps to DLL in advance, so there is no need to rebuild and grant new caps, so it matches (or more) exe&amp;#039;s caps.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 24 Jan 2007 12:24:19 +0100</pubDate>
 <dc:creator>ogryzok</dc:creator>
 <guid isPermaLink="false">comment 37029 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: symbian v9 capabilties with DLLs | how to build static libra</title>
 <link>http://www.newlc.com/en/topic-17416#comment-37028</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Capabilities are interpreted differently for DLL:s and EXE:s.&amp;nbsp; I recommend that you read up on the available documentation at symbiansigned.com (or the platsec book).&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 24 Jan 2007 10:43:45 +0100</pubDate>
 <dc:creator>puterman</dc:creator>
 <guid isPermaLink="false">comment 37028 at http://www.newlc.com</guid>
</item>
<item>
 <title>symbian v9 capabilties with DLLs | how to build static library</title>
 <link>http://www.newlc.com/en/topic-17416</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/topic-17416&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/topic-17416#comments</comments>
 <category domain="http://www.newlc.com/en/forums/security-payment">DRM / Security / Payment</category>
 <pubDate>Wed, 24 Jan 2007 09:42:10 +0100</pubDate>
 <dc:creator>ogryzok</dc:creator>
 <guid isPermaLink="false">16951 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
