<?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 - How to implement CompleteWithAppPath? - Comments</title>
 <link>http://www.newlc.com/forum/how-implement-completewithapppath</link>
 <description>Comments for &quot;How to implement CompleteWithAppPath?&quot;</description>
 <language>en</language>
<item>
 <title>Re: How to implement CompleteWithAppPath?</title>
 <link>http://www.newlc.com/forum/how-implement-completewithapppath#comment-44812</link>
 <description>&lt;p&gt;Hi runforu,&lt;/p&gt;

&lt;p&gt;one more solution is &lt;/p&gt;

&lt;p&gt;TFileName FileName;&lt;br /&gt;
TParsePtrC parse(Application()-&gt;AppFullName());&lt;br /&gt;
FileName.Insert(0,parse.Drive());&lt;/p&gt;

&lt;p&gt;for this  AllFiles capability is not required &lt;/p&gt;</description>
 <pubDate>Thu, 28 Feb 2008 06:07:43 +0100</pubDate>
 <dc:creator>praveenvlm</dc:creator>
 <guid isPermaLink="false">comment 44812 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to implement CompleteWithAppPath?</title>
 <link>http://www.newlc.com/forum/how-implement-completewithapppath#comment-44809</link>
 <description>&lt;p&gt;One option could be to find full path to the application executable using RApaLsSession and taking the drive letter from there, but for that you will need AllFiles capability from Symbian 9.x onwards.&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;const TUint32 KApplicationUid = 0x1234abcd;&lt;br /&gt;&lt;br /&gt;RApaLsSession lsSession;&lt;br /&gt;User::LeaveIfError(lsSession.Connect());&lt;br /&gt;CleanupClosePushL(lsSession);&lt;br /&gt;&lt;br /&gt;TApaAppInfo appInfo;&lt;br /&gt;User::LeaveIfError(lsSession.GetAppInfo(appInfo, TUid::Uid(KApplicationUid)));&lt;br /&gt;TChar drive = appInfo.iFullName[0];&lt;br /&gt;&lt;br /&gt;CleanupStack::PopAndDestroy(&amp;amp;lsSession);&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;other would be to simply try where the executable is:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;RFs fs;&lt;br /&gt;User::LeaveIfError(fs.Connect());&lt;br /&gt;CleanupClosePushL(fs);&lt;br /&gt;&lt;br /&gt;TFileName executable(_L(&amp;quot;!:\\sys\\bin\\NameOfTheExecutable.exe&amp;quot;));&lt;br /&gt;&lt;br /&gt;TChar drive;&lt;br /&gt;TBool driveFound = EFalse;&lt;br /&gt;for (drive = &amp;#039;a; drive &amp;lt;= &amp;#039;z&amp;#039; &amp;amp;&amp;amp; !driveFound; ++drive)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; executable[0] = drive;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TEntry dummy;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (fs.Entry(executable, dummy) == KErrNone)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; driveFound = ETrue;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;#039;&lt;br /&gt;&lt;br /&gt;CleanupStack::PopAndDestroy(&amp;amp;fs);&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Of course, you might not want to search all the way from a to z, but you get the idea.&lt;/p&gt;

&lt;p&gt;The second method does not seem so nice, but the first one does not work if the application does not have registration file.&lt;/p&gt;</description>
 <pubDate>Wed, 27 Feb 2008 21:45:18 +0100</pubDate>
 <dc:creator>jari</dc:creator>
 <guid isPermaLink="false">comment 44809 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to implement CompleteWithAppPath?</title>
 <link>http://www.newlc.com/forum/how-implement-completewithapppath</link>
 <description>&lt;p&gt;How to know which driver my application installed on?&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/forum/how-implement-completewithapppath&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/forum/how-implement-completewithapppath#comments</comments>
 <category domain="http://www.newlc.com/forums/symbian-c">Symbian C++</category>
 <pubDate>Wed, 13 Feb 2008 06:57:30 +0100</pubDate>
 <dc:creator>runforu</dc:creator>
 <guid isPermaLink="false">20249 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
