std::string WinService::displayName() const
{
    POCO_LPQUERY_SERVICE_CONFIG pSvcConfig = config();
#if defined(POCO_WIN32_UTF8)
    std::wstring udispName(pSvcConfig->lpDisplayName);
    std::string dispName;
    Poco::UnicodeConverter::toUTF8(udispName, dispName);
#else
    std::string dispName(pSvcConfig->lpDisplayName);
#endif
    LocalFree(pSvcConfig);
    return dispName;
}
//----------------------------------------------------------------------------------------
// GetDispName_Document
//----------------------------------------------------------------------------------------
PMString
CZPTasksTVNodeWidgetMgr::GetDispName_Document(
	const IZPTaskInfo *			inTaskInfo) const
{
	const PMString & theAssetID = inTaskInfo->GetDocumentID();
	if( !theAssetID.IsEmpty() )
	{
		InterfacePtr<const IZPAssetMgr> assetMgr( mTaskMgr, UseDefaultIID() );
		ASSERT( assetMgr );

		const IStringData * dbAssetID = assetMgr->GetAssetByID( theAssetID );
		if( dbAssetID )
		{
			InterfacePtr<const IStringData> dispName( dbAssetID, IID_IZPDATANAME );
			return dispName->Get();
		}
	}
	return kNullString;
}
//----------------------------------------------------------------------------------------
// GetDispName_Category
//----------------------------------------------------------------------------------------
PMString
CZPTasksTVNodeWidgetMgr::GetDispName_Category(
	const IZPTaskInfo *			inTaskInfo) const
{
	const PMString & theCategoryID = inTaskInfo->GetCategoryID();
	if( !theCategoryID.IsEmpty() )
	{
		InterfacePtr<const IZPTaskCategoryMgr> taskCategoryMgr( mTaskMgr, UseDefaultIID() );
		ASSERT( taskCategoryMgr );

		const IStringData * dbTaskCategoryID = taskCategoryMgr->GetTaskCategoryForID( theCategoryID );
		if( dbTaskCategoryID )
		{
			InterfacePtr<const IStringData> dispName( dbTaskCategoryID, IID_IZPDATANAME );
			return dispName->Get();
		}
	}
	return kNullString;
}
//----------------------------------------------------------------------------------------
// GetDispName_User
//----------------------------------------------------------------------------------------
PMString
CZPTasksTVNodeWidgetMgr::GetDispName_User(
	const IZPTaskInfo *			inTaskInfo,
	enTVColTasks				inColID) const
{
	//TODO: use inColID
	const PMString & theUserID = inTaskInfo->GetAssignedToUserID();
	if( !theUserID.IsEmpty() )
	{
		InterfacePtr<const IZPUserMgr> userMgr( mTaskMgr, UseDefaultIID() );
		ASSERT( userMgr );

		const IStringData * dbUserID = userMgr->GetUserForID( theUserID );
		if( dbUserID )
		{
			InterfacePtr<const IStringData> dispName( dbUserID, IID_IZPDATANAME );
			return dispName->Get();
		}
	}
	return kNullString;
}