Symbian3/PDK/Source/GUID-D2605514-03F4-4A07-943B-E180341518D4.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 16 Jul 2010 17:23:46 +0100
changeset 12 80ef3a206772
permissions -rw-r--r--
Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-D2605514-03F4-4A07-943B-E180341518D4" xml:lang="en"><title>Retrieving application information using application UID</title><shortdesc>This tutorial describes how application information can
be retrieved from the SCR for a specific application UID.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<prereq id="GUID-244C8436-7871-487A-B94C-BC9A70CEA709"><p>The Client
applications must link against <filepath>scrclient.dll</filepath>.</p></prereq>
<steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2">
<step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2-1"><cmd>Connect
to the SCR server.</cmd>
<info><codeblock xml:space="preserve">#include &lt;usif/scr/scr.h&gt;
Usif::RSoftwareComponentRegistry scrSession;
scrSession.Connect();
</codeblock></info>
</step>
<step id="GUID-52B25417-323F-46D8-B572-A65C4B1F8DBA-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2-2"><cmd>Create an
object of <xref href="GUID-8C085940-AE69-3CE3-993A-675C2DB2D0CD.dita"><apiname>RApplicationRegistrationInfo</apiname></xref> to retrieve
application information based on application UID.</cmd>
<info><codeblock xml:space="preserve">RApplicationRegistrationInfo subSession;</codeblock></info>
</step>
<step id="GUID-90F67FCC-E2E4-4BFD-927F-AF59651B8A2D-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2-3"><cmd>Open a <xref href="GUID-8C085940-AE69-3CE3-993A-675C2DB2D0CD.dita"><apiname>RApplicationRegistrationInfo</apiname></xref>  subsession to retrieve application
information based on application UID.</cmd>
<info><codeblock xml:space="preserve"> subSession.OpenL(scrSession);</codeblock></info>
</step>
<step id="GUID-0D7AF719-87D6-4191-96AE-23193C58C236-GENID-1-12-1-5-1-1-6-1-6-1-4-1-6-1-3-2-4"><cmd>Retrieve
the information using <xref href="GUID-8C085940-AE69-3CE3-993A-675C2DB2D0CD.dita#GUID-8C085940-AE69-3CE3-993A-675C2DB2D0CD/GUID-004208F6-EFEF-3C4A-9B1A-F818B9908555"><apiname>RApplicationRegistrationInfo::GetAppInfoL()</apiname></xref>.</cmd>
<info><codeblock xml:space="preserve">// GetAppInfoL() takes the application UID and an output parameter.
// The locale can be specified (optional) as the 
// third parameter. If locale is not specified the default value is assigned.
 TAppRegInfo appInfo;
 subSession.GetAppInfoL(TUid::Uid(0x1000ABCD), appInfo);</codeblock></info>
</step>
</steps>
</taskbody></task>