WEB开发网
开发学院手机开发Symbian 开发 在Symbian exe 程序中显示图形 阅读

在Symbian exe 程序中显示图形

 2010-05-06 21:39:00 来源:WEB开发网   
核心提示:(epocexe is analogous, except the exported function InitEmulator() is replaced by WinsMain()):我们的启动代码看起来是这样的,下面是exedll所必须的两个函数(epocexe是类似的,在Symbian exe 程序中显示图形(

(epocexe is analogous, except the exported function InitEmulator() is replaced by WinsMain

()):

我们的启动代码看起来是这样的,下面是exedll所必须的两个函数(epocexe是类似的,除非导出函数

InitEmulator()被WinsMain()所取代):

GLDEF_C TInt E32Main()

{

__UHEAP_MARK;

CTrapCleanup* cleanup = CTrapCleanup::New();

TRAPD(error, ExeMainL());

__ASSERT_ALWAYS(!error, User::Panic(_L("EXEUI"), error));

delete cleanup;

__UHEAP_MARKEND;

return 0;

}

// If using exedll target type

#if defined(__WINS__)

EXPORT_C TInt InitEmulator()

{

E32Main();

User::Exit(0);

return KErrNone;

}

TInt E32Dll(TDllReason)

{

return KErrNone;

}

#endif

Now the idea is renaming ExeUI.dll to ExeUI.app, and copying it to an application directory

on the emulator tree to make it look like an ordinary application. So we create the ExeUI

directory in Epoc32WinscsystemApps (or Epoc32Releasewinsudebzsystemapps if you

wish). As we're creating an application, we also need to provide it of a proper UID, so

don't forget to add the corresponding line in the .mmp

Now you may launch the emulator, that will show the ExeUI program's default icon.

现在所要做的工作就是把把ExeUI.dll改名为ExeUI.app,并拷贝到模拟器的一个应用程序目录下。我们

建立ExeUI目录Epoc32WinscsystemApps (或 Epoc32Releasewinsudebzsystemapps只要你愿意

)我们这不是建立了一个应用程序吗,所以我们还要提供一个合适的UID,别忘了在.mmp文件相应的地方

添加它。好了,你启动模拟器,它会显示ExeUI程序的默认图标了。

上一页  1 2 3 4 5 

Tags:Symbian exe 程序

编辑录入:coldstar [复制链接] [打 印]
赞助商链接