// how to create a global singleton object
const TInt KMarkTlsHandle = 0xC0FFEE;
class CYourClass: public CBase
{
public:
CYourClass(){};
void ConstructL(){};
~CYourClass();
};
CYourClass::~CYourClass()
{
//release TLS
UserSvr::DllFreeTls(KMarkTlsHandle);
}
//how to create a global singleton object
void CMarkEComWrapper::DoCommandCreateSingletonObject()
{
TInt err = KErrNone;
//Get object from STL
CYourClass* iSingletonObject = static_cast
//if not, create one
if (!iSingletonObject)
{
iSingletonObject = new (ELeave) CYourClass;
CleanupStack::PushL(iSingletonObject);
iSingletonObject->ConstructL();
err = UserSvr::DllSetTls( KMarkTlsHandle, iSingletonObject );
CleanupStack::Pop(iSingletonObject);
}
delete iSingletonObject ;
iSingletonObject = 0;
}
how to create a global singleton object in exe Monday, January 11, 2010
Posted by Unknown at 5:07 PM 0 comments
Labels: symbian
List all drivers via DOS command
Command: fsutil fsinfo drives
Detailed descriptions belowing:
Options for fsutil
- behavior 控制文件系统行为
- dirty 管理卷的被损坏的位数
- file 文件特定命令
- fsinfo 文件系统信息
- hardlink 硬链接管理
- objectid 对象 ID 管理
- quota 配额管理
- reparsepoint 重分析点管理
- sparse 稀疏文件控制
- usn USN 管理
- volume 卷管理
options for FSINFO
- drives 列出所有驱动器
- drivetype 查询一个驱动器的驱动器类型
- volumeinfo 查询卷信息
- ntfsinfo 查询 NTFS 特定卷信息
- statistics 查询文件系统统计
Posted by Unknown at 3:43 PM 0 comments
Labels: MSDOS
Subscribe to:
Posts (Atom)