当前位置: 首页>>代码示例>>C++>>正文


C++ LPIDENT::GetServerName方法代码示例

本文整理汇总了C++中LPIDENT::GetServerName方法的典型用法代码示例。如果您正苦于以下问题:C++ LPIDENT::GetServerName方法的具体用法?C++ LPIDENT::GetServerName怎么用?C++ LPIDENT::GetServerName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LPIDENT的用法示例。


在下文中一共展示了LPIDENT::GetServerName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Server_SyncVLDB_OnInitDialog

void Server_SyncVLDB_OnInitDialog (HWND hDlg, LPIDENT lpi)
{
   if (lpi->fIsServer())
      {
      TCHAR szServer[ cchNAME ];
      lpi->GetServerName (szServer);

      LPTSTR pszText = FormatString (IDS_SYNCVLDB_SVR_DESC, TEXT("%s"), szServer);
      SetDlgItemText (hDlg, IDC_SYNC_DESC, pszText);
      FreeString (pszText);
      pszText = FormatString (IDS_SYNCVLDB_SVR_DESC2, TEXT("%s"), szServer);
      SetDlgItemText (hDlg, IDC_SYNC_DESC2, pszText);
      FreeString (pszText);

      ShowWindow (hDlg, SW_SHOW);
      }
   else // (lpi->fIsAggregate())
      {
      TCHAR szServer[ cchNAME ];
      lpi->GetServerName (szServer);
      TCHAR szAggregate[ cchNAME ];
      lpi->GetAggregateName (szAggregate);

      LPTSTR pszText = FormatString (IDS_SYNCVLDB_AGG_DESC, TEXT("%s%s"), szServer, szAggregate);
      SetDlgItemText (hDlg, IDC_SYNC_DESC, pszText);
      FreeString (pszText);
      pszText = FormatString (IDS_SYNCVLDB_AGG_DESC2, TEXT("%s%s"), szServer, szAggregate);
      SetDlgItemText (hDlg, IDC_SYNC_DESC2, pszText);
      FreeString (pszText);

      StartTask (taskAGG_FIND_GHOST, hDlg, lpi);
      }
}
开发者ID:bagdxk,项目名称:openafs,代码行数:33,代码来源:svr_syncvldb.cpp

示例2: Alert_GetDescription

LPTSTR Alert_GetDescription (LPIDENT lpi, size_t iAlert, BOOL fFull)
{
   LPOBJECTALERTS lpoa;

   if ((lpoa = Alert_GetObjectAlerts (lpi)) == NULL)
      return NULL;

   if (!lpoa->nAlerts && lpi->fIsServer())
      {
      LPSERVER_PREF lpsp;
      if ((lpsp = (LPSERVER_PREF)lpi->GetUserParam()) != NULL)
         {
         if (!lpsp->fIsMonitored)
            {
            TCHAR szName[ cchNAME ];
            lpi->GetServerName (szName);
            return FormatString (IDS_ALERT_DESCSHORT_UNMONITORED, TEXT("%s"), szName);
            }
         }
      }

   if (iAlert >= lpoa->nAlerts)
      return NULL;

   if (lpoa->aAlerts[ iAlert ].alert == alertSECONDARY)
      {
      return Alert_GetDescriptionFunc (lpoa->aAlerts[ iAlert ].aiSECONDARY.lpiSecondary,
                                       lpoa->aAlerts[ iAlert ].aiSECONDARY.iSecondary,
                                       lpi,
                                       fFull);
      }

   return Alert_GetDescriptionFunc (lpi, iAlert, NULL, fFull);
}
开发者ID:bagdxk,项目名称:openafs,代码行数:34,代码来源:alert.cpp

示例3: Filesets_General_OnInitDialog

void Filesets_General_OnInitDialog (HWND hDlg, LPIDENT lpi)
{
   TCHAR szText[ cchRESOURCE ];
   TCHAR szSvrName[ cchNAME ];
   TCHAR szAggName[ cchNAME ];
   TCHAR szSetName[ cchNAME ];
   VOLUMEID vidFileset;
   lpi->GetServerName (szSvrName);
   lpi->GetAggregateName (szAggName);
   lpi->GetFilesetName (szSetName);
   lpi->GetFilesetID (&vidFileset);

   GetDlgItemText (hDlg, IDC_SET_NAME, szText, cchRESOURCE);
   LPTSTR pszText = FormatString (szText, TEXT("%s%s%s"), szSvrName, szAggName, szSetName);
   SetDlgItemText (hDlg, IDC_SET_NAME, pszText);
   FreeString (pszText);

   pszText = FormatString (TEXT("%1"), TEXT("%lu"), vidFileset);
   SetDlgItemText (hDlg, IDC_SET_ID, pszText);
   FreeString (pszText);

   EnableWindow (GetDlgItem (hDlg, IDC_SET_LOCK), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_UNLOCK), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_QUOTA), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN_SETFULL_DEF), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN_SETFULL), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN_SETFULL_PERCENT), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SET_WARN_SETFULL_DESC), FALSE);
}
开发者ID:bagdxk,项目名称:openafs,代码行数:30,代码来源:set_prop.cpp

示例4: Server_SelectServer

void Server_SelectServer (HWND hDlg, LPIDENT lpiNew, BOOL fForceRedraw)
{
   LPIDENT lpiOld = Server_GetServer (hDlg);
   if (lpiNew != lpiOld)
      {
      SetWindowLongPtr (hDlg, DWLP_USER, (LONG_PTR)lpiNew);

      if (hDlg != g.hMain)
         {
         if (lpiOld)
            PropCache_Delete (pcSERVER, lpiOld);

         if (lpiNew)
            {
            PropCache_Add (pcSERVER, lpiNew, hDlg);

            TCHAR szName[ cchNAME ];
            lpiNew->GetServerName (szName);
            LPTSTR pszTitle = FormatString (IDS_SERVER_TITLE, TEXT("%s"), szName);
            SetWindowText (hDlg, pszTitle);
            FreeString (pszTitle);
            }
         }

      fForceRedraw = TRUE;
      }

   if (fForceRedraw)
      {
      Server_ForceRedraw (hDlg);
      }
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:32,代码来源:svr_window.cpp

示例5: Server_Salvage_OnEndTask_Salvage

void Server_Salvage_OnEndTask_Salvage (HWND hDlg, LPIDENT lpiSalvage, LPTASKPACKET ptp)
{
   if (!ptp->rc)
      {
      ErrorDialog (ptp->status, IDS_ERROR_CANT_SALVAGE);
      DestroyWindow (hDlg);
      }
   else
      {
      if (TASKDATA(ptp)->pszText1)
         {
         SetDlgItemText (hDlg, IDC_SALVAGE_DETAILS, TASKDATA(ptp)->pszText1);
         }
      else
         {
         TCHAR szServer[ cchNAME ];
         lpiSalvage->GetServerName (szServer);
         LPTSTR pszNoLog = FormatString (IDS_ERROR_CANT_READ_SALVAGE_LOG, TEXT("%s"), szServer);
         SetDlgItemText (hDlg, IDC_SALVAGE_DETAILS, pszNoLog);
         FreeString (pszNoLog);
         }

      ShowWindow (hDlg, SW_SHOW);
      }
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:25,代码来源:svr_salvage.cpp

示例6: Server_ShowProperties

void Server_ShowProperties (LPIDENT lpiServer, size_t nAlerts)
{
   HWND hCurrent;

   if ((hCurrent = PropCache_Search (pcSVR_PROP, lpiServer)) != NULL)
      {
      SetFocus (hCurrent);
      }
   else
      {
      TCHAR szName[ cchNAME ];
      lpiServer->GetServerName (szName);
      LPTSTR pszTitle = FormatString (IDS_SVR_PROP_TITLE, TEXT("%s"), szName);

      LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE);
      psh->fMadeCaption = TRUE;

      if ( (PropSheet_AddProblemsTab (psh, IDD_SVR_PROBLEMS, lpiServer, nAlerts)) &&
           (PropSheet_AddTab (psh, IDS_SVR_GENERAL_TAB, IDD_SVR_GENERAL, (DLGPROC)Server_General_DlgProc, (LPARAM)lpiServer, TRUE)) &&
           (PropSheet_AddTab (psh, IDS_SVR_SCOUT_TAB,   IDD_SVR_SCOUT,   (DLGPROC)Server_Scout_DlgProc,   (LPARAM)lpiServer, TRUE)) )
         {
         PropSheet_ShowModeless (psh);
         }
      }
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:25,代码来源:svr_prop.cpp

示例7: Server_General_OnInitDialog

void Server_General_OnInitDialog (HWND hDlg, LPIDENT lpiServer)
{
   TCHAR szText[ cchRESOURCE ];
   lpiServer->GetServerName (szText);
   SetDlgItemText (hDlg, IDC_SVR_NAME, szText);

   EnableWindow (GetDlgItem (hDlg, IDC_SVR_AUTH_YES), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SVR_AUTH_NO), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_SVR_CHANGEADDR), FALSE);
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:10,代码来源:svr_prop.cpp

示例8: Server_Scout_OnEndTask_Apply

void Server_Scout_OnEndTask_Apply (HWND hDlg, LPTASKPACKET ptp)
{
   if (!ptp->rc)
      {
      LPIDENT lpiServer = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);

      TCHAR szText[ cchNAME ];
      lpiServer->GetServerName (szText);
      ErrorDialog (ptp->status, IDS_ERROR_CHANGE_SERVER_STATUS, TEXT("%s"), szText);
      }
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:11,代码来源:svr_prop.cpp

示例9: Aggregates_General_OnEndTask_Apply

void Aggregates_General_OnEndTask_Apply (HWND hDlg, LPTASKPACKET ptp)
{
   if (!ptp->rc)
      {
      LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);

      TCHAR szSvrName[ cchNAME ];
      TCHAR szAggName[ cchNAME ];
      lpi->GetServerName (szSvrName);
      lpi->GetAggregateName (szAggName);
      ErrorDialog (ptp->status, IDS_ERROR_CHANGE_AGGREGATE_STATUS, TEXT("%s%s"), szSvrName, szAggName);
      }
}
开发者ID:bagdxk,项目名称:openafs,代码行数:13,代码来源:agg_prop.cpp

示例10: Services_Delete_OnInitDialog

void Services_Delete_OnInitDialog (HWND hDlg, LPIDENT lpi)
{
   TCHAR szServer[ cchNAME ];
   TCHAR szService[ cchNAME ];
   lpi->GetServerName (szServer);
   lpi->GetServiceName (szService);

   TCHAR szOld[ cchRESOURCE ];
   GetDlgItemText (hDlg, IDC_DELSVC_DESC, szOld, cchRESOURCE);

   LPTSTR pszNew = FormatString (szOld, TEXT("%s%s"), szServer, szService);
   SetDlgItemText (hDlg, IDC_DELSVC_DESC, pszNew);
   FreeString (pszNew);
}
开发者ID:bagdxk,项目名称:openafs,代码行数:14,代码来源:svc_delete.cpp

示例11: Aggregates_ShowProperties

void Aggregates_ShowProperties (LPIDENT lpiAggregate, size_t nAlerts, BOOL fJumpToThreshold, HWND hParentModal)
{
   HWND hCurrent;

   if ((hCurrent = PropCache_Search (pcAGG_PROP, lpiAggregate)) != NULL)
      {
      SetFocus (hCurrent);

      if (fJumpToThreshold)
         {
         HWND hTab;
         if ((hTab = GetDlgItem (hCurrent, IDC_PROPSHEET_TABCTRL)) != NULL)
            {
            int nTabs = TabCtrl_GetItemCount (hTab);
            TabCtrl_SetCurSel (hTab, nTabs-1);

            NMHDR nm;
            nm.hwndFrom = hTab;
            nm.idFrom = IDC_PROPSHEET_TABCTRL;
            nm.code = TCN_SELCHANGE;
            SendMessage (hCurrent, WM_NOTIFY, 0, (LPARAM)&nm);
            }
         }
      }
   else
      {
      TCHAR szSvrName[ cchNAME ];
      TCHAR szAggName[ cchNAME ];
      lpiAggregate->GetServerName (szSvrName);
      lpiAggregate->GetAggregateName (szAggName);
      LPTSTR pszTitle = FormatString (IDS_AGG_PROP_TITLE, TEXT("%s%s"), szSvrName, szAggName);

      LPPROPSHEET psh = PropSheet_Create (pszTitle, FALSE);
      psh->fMadeCaption = TRUE;
      psh->sh.hwndParent = hParentModal;

      if (PropSheet_AddProblemsTab (psh, IDD_AGG_PROBLEMS, lpiAggregate, nAlerts) &&
          PropSheet_AddTab (psh, IDS_AGG_GENERAL_TAB, IDD_AGG_GENERAL, (DLGPROC)Aggregates_General_DlgProc, (LPARAM)lpiAggregate, TRUE, FALSE))
         {
         if (fJumpToThreshold)
            psh->sh.nStartPage = psh->sh.nPages-1;

         if (hParentModal)
            PropSheet_ShowModal (psh, PumpMessage);
         else
            PropSheet_ShowModeless (psh);
         }
      }
}
开发者ID:bagdxk,项目名称:openafs,代码行数:49,代码来源:agg_prop.cpp

示例12: Server_SyncVLDB_OnEndTask_Init

void Server_SyncVLDB_OnEndTask_Init (HWND hDlg, LPTASKPACKET ptp)
{
   if (ptp->rc && (!(TASKDATA(ptp)->wGhost & GHOST_HAS_SERVER_ENTRY)))
      {
      LPIDENT lpi = (LPIDENT)( ptp->lpUser );

      TCHAR szServer[ cchNAME ];
      lpi->GetServerName (szServer);
      TCHAR szAggregate[ cchNAME ];
      lpi->GetAggregateName (szAggregate);

      ErrorDialog (0, IDS_ERROR_CANT_SYNC_GHOST_AGGREGATE, TEXT("%s%s"), szServer, szAggregate);
      DestroyWindow (hDlg);
      return;
      }

   ShowWindow (hDlg, SW_SHOW);
}
开发者ID:bagdxk,项目名称:openafs,代码行数:18,代码来源:svr_syncvldb.cpp

示例13: Server_GetColumnText

LPTSTR Server_GetColumnText (LPIDENT lpi, SERVERCOLUMN svrcol)
{
   static TCHAR aszBuffer[ nSERVERCOLUMNS ][ cchRESOURCE ];
   static size_t iBufferNext = 0;
   LPTSTR pszBuffer = aszBuffer[ iBufferNext++ ];
   if (iBufferNext == nSERVERCOLUMNS)
      iBufferNext = 0;
   *pszBuffer = TEXT('\0');

   LPSERVERSTATUS lpss = NULL;
   LPSERVER_PREF lpsp;
   if ((lpsp = (LPSERVER_PREF)lpi->GetUserParam()) != NULL)
      {
      lpss = &lpsp->ssLast;
      }

   switch (svrcol)
      {
      case svrcolNAME:
         lpi->GetServerName (pszBuffer);
         break;

      case svrcolADDRESS:
         if (lpss)
            FormatSockAddr (pszBuffer, TEXT("%a"), &lpss->aAddresses[0]);
         break;

      case svrcolSTATUS:
         {
         LPTSTR pszDesc;
         if ((pszDesc = Alert_GetQuickDescription (lpi)) == NULL)
            GetString (pszBuffer, IDS_STATUS_NOALERTS);
         else
            {
            lstrcpy (pszBuffer, pszDesc);
            FreeString (pszDesc);
            }
         }
         break;
      }

   return pszBuffer;
}
开发者ID:bagdxk,项目名称:openafs,代码行数:43,代码来源:svr_col.cpp

示例14: Filesets_Release_OnInitDialog

void Filesets_Release_OnInitDialog (HWND hDlg, LPIDENT lpi)
{
   TCHAR szServer[ cchNAME ];
   TCHAR szAggregate[ cchNAME ];
   TCHAR szFileset[ cchNAME ];
   lpi->GetServerName (szServer);
   lpi->GetAggregateName (szAggregate);
   lpi->GetFilesetName (szFileset);

   TCHAR szOld[ cchRESOURCE ];
   GetDlgItemText (hDlg, IDC_RELSET_DESC, szOld, cchRESOURCE);

   LPTSTR pszText = FormatString (szOld, TEXT("%s%s%s"), szServer, szAggregate, szFileset);
   SetDlgItemText (hDlg, IDC_RELSET_DESC, pszText);
   FreeString (pszText);

   CheckDlgButton (hDlg, IDC_RELSET_NORMAL, TRUE);
   CheckDlgButton (hDlg, IDC_RELSET_FORCE, FALSE);
}
开发者ID:chanke,项目名称:openafs-osd,代码行数:19,代码来源:set_release.cpp

示例15: Aggregates_General_OnInitDialog

void Aggregates_General_OnInitDialog (HWND hDlg)
{
   LPIDENT lpi = (LPIDENT)GetWindowLongPtr (hDlg, DWLP_USER);

   TCHAR szSvrName[ cchNAME ];
   TCHAR szAggName[ cchNAME ];
   lpi->GetServerName (szSvrName);
   lpi->GetAggregateName (szAggName);

   TCHAR szText[ cchRESOURCE ];
   GetDlgItemText (hDlg, IDC_AGG_NAME, szText, cchRESOURCE);
   LPTSTR pszText = FormatString (szText, TEXT("%s%s"), szSvrName, szAggName);
   SetDlgItemText (hDlg, IDC_AGG_NAME, pszText);
   FreeString (pszText);

   EnableWindow (GetDlgItem (hDlg, IDC_AGG_WARNALLOC), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_AGG_WARN), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_AGG_WARN_AGGFULL_DEF), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_AGG_WARN_AGGFULL), FALSE);
   EnableWindow (GetDlgItem (hDlg, IDC_AGG_WARN_AGGFULL_PERCENT), FALSE);
}
开发者ID:bagdxk,项目名称:openafs,代码行数:21,代码来源:agg_prop.cpp


注:本文中的LPIDENT::GetServerName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。