mydll.cpp

来自「S60 Dll development source code」· C++ 代码 · 共 71 行

CPP
71
字号
/* Copyright (c) 2004, Nokia. All rights reserved */


// INCLUDE FILES
#include "Mydll.h"

GLDEF_C TInt E32Dll(TDllReason/*aReason*/)
{
	return (KErrNone);
}

EXPORT_C CMyClass* CMyClass::NewL()
{
	CMyClass* self = NewLC();
	CleanupStack::Pop(self);
	return self;
}

EXPORT_C CMyClass* CMyClass::NewLC()
{
	CMyClass* self = new (ELeave) CMyClass();
	CleanupStack::PushL(self);
	self->ConstructL();
	return self;
}

void CMyClass::ConstructL()
{
}


CMyClass::CMyClass()
{
}

CMyClass::~CMyClass()
{
}

void CMyClass::PrivateMethod()
{
}

EXPORT_C TInt CMyClass::GetItemTextArray(CDesCArray* itemList)
{
	if( itemList )
	{
		itemList->AppendL(_L("First item"));
    itemList->AppendL(_L("Second item"));
		itemList->AppendL(_L("third item"));
		itemList->AppendL(_L("fourth item"));
		itemList->AppendL(_L("fifth item"));
		itemList->AppendL(_L("sixth item"));
		itemList->AppendL(_L("senventh item"));
		return 1;
	}
	return 0;
}

EXPORT_C CDesCArray* GetItemTextArrayEx()
{
	CDesCArray * itemList = new (ELeave) CDesCArrayFlat(16);
	itemList->AppendL(_L("First item"));
  itemList->AppendL(_L("Second item"));
	itemList->AppendL(_L("third item"));
	itemList->AppendL(_L("fourth item"));
	itemList->AppendL(_L("fifth item"));
	itemList->AppendL(_L("sixth item"));
	itemList->AppendL(_L("senventh item"));
  return itemList;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?