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-743BFB3C-7B88-4A5C-A655-A50DEB45FC46" xml:lang="en"><title>Creating
an installer as an in-process plug-in</title><prolog><metadata><keywords/></metadata></prolog><taskbody>
<steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-12-1-5-1-1-6-1-4-1-4-1-3-1-5-1-2-1">
<step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-12-1-5-1-1-6-1-4-1-4-1-3-1-5-1-2-1-1"><cmd/>
<info> <p>Create an ECom plug-in implementation of the <xref href="GUID-CD380D01-8649-36E4-8435-C6F600D5A5CF.dita"><apiname>CSifPlugin</apiname></xref> interface.
For detailed information about creating an ECom plug-in interface implementation,
see the <xref href="GUID-F94CEC6D-C602-550F-9B12-856493F3C509.dita">Implementing
an Interface</xref> section. </p> <p>For example: </p> <codeblock id="GUID-C49BDE13-8928-5305-80A7-C5FDE77C9CF5" xml:space="preserve">Class CSamplePlugin : public CSifPlugin
{
public:
static CSamplePlugin* NewL();
~CSamplePlugin();
//Define all virtual functions of CSifPlugin
...
void GetComponentInfo(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
void GetComponentInfo(RFile& aFileHandle, const TSecurityContext& aSecurityContext,
CComponentInfo& aComponentInfo, TRequestStatus& aStatus);
void Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext,
const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams,
TRequestStatus& aStatus);
...
private:
CSamplePlugin() {}
void ConstructL();
CSamplePlugin(const CSamplePlugin &);
CSamplePlugin & operator =(const CSamplePlugin &);
};</codeblock> </info>
</step>
<step id="GUID-48B8E4D6-8D55-414F-A33F-2D1C597A4A6F"><cmd>Export the implementation factories by declaring an array containing
the ECom implementation and an appropriate exported function. For detailed
information about exporting the implementation factories, see the <xref href="GUID-895A685E-83E8-51A3-A823-3A0E07B1E609.dita">Exporting
the Implementation Factories </xref> section.</cmd>
</step>
<step id="GUID-16AC7BCD-3445-4615-8E82-73EBBE7592C7"><cmd/>
<info><p>Publish the properties of your ECom implementation in a registration
resource file. For detailed information publishing the properties in a registration
resource file, see the <xref href="GUID-9A9103E4-27B0-5CF3-855A-DCD44795A5C0.dita">Providing
registry information</xref> section. </p> <p>For example: </p> <codeblock id="GUID-525E615B-4843-5C26-AC11-80CE4F421474" xml:space="preserve">// ECOM DLL UID: 0x1028634F
// ECOM interface UID: 0x10285BC2 (KUidSifPlugin)
// ECOM Implementation: 0x10286350
#include <ecom/registryinfo.rh>
RESOURCE REGISTRY_INFO so_registry
{
dll_uid = 0x1028634F;
interfaces =
{
INTERFACE_INFO
{
interface_uid = 0x10285BC2;
implementations =
{
IMPLEMENTATION_INFO
{
implementation_uid = 0x10286350;
version_no = 1;
default_data = "";
opaque_data = "";
}
};
}
};
}</codeblock></info>
</step>
<step id="GUID-D838CBF1-6607-4DE8-B9ED-8D86838BE4DD"><cmd>Create a DLL with target type as <codeph>plugin</codeph>. </cmd>
</step>
</steps>
</taskbody></task>