本文整理汇总了C++中LPIDENT::OpenServer方法的典型用法代码示例。如果您正苦于以下问题:C++ LPIDENT::OpenServer方法的具体用法?C++ LPIDENT::OpenServer怎么用?C++ LPIDENT::OpenServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPIDENT
的用法示例。
在下文中一共展示了LPIDENT::OpenServer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Alert_BeginUpdate
void Alert_BeginUpdate (LPIDENT lpi, LPSERVER *ppServer)
{
if (lpi->fIsServer())
{
*ppServer = NULL;
}
else
{
*ppServer = lpi->OpenServer();
}
}
示例2: DispatchNotification_AltThread
void DispatchNotification_AltThread (NOTIFYEVENT evt, PNOTIFYPARAMS pParams)
{
LPIDENT lpiEvt = pParams->lpi1;
switch (evt)
{
case evtRefreshStatusEnd:
if (lpiEvt && (lpiEvt->fIsService() || lpiEvt->fIsAggregate() || lpiEvt->fIsFileset()))
{
Alert_RemoveSecondary (lpiEvt);
Alert_Scout_QueueCheckServer (lpiEvt);
}
if (lpiEvt && lpiEvt->fIsServer())
{
LPSERVER_PREF lpsp;
if ((lpsp = (LPSERVER_PREF)lpiEvt->GetUserParam()) != NULL)
{
LPSERVER lpServer;
if ((lpServer = lpiEvt->OpenServer()) != NULL)
{
if (lpsp->fIsMonitored != lpServer->fIsMonitored())
{
g.sub = Subsets_SetMonitor (g.sub, lpiEvt, lpServer->fIsMonitored());
UpdateDisplay_ServerWindow (FALSE, lpiEvt);
}
lpsp->fIsMonitored = lpServer->fIsMonitored();
lpServer->Close();
}
}
Alert_Scout_ServerStatus (lpiEvt, pParams->status);
}
break;
// When we get a create request, use the object's Get/SetUserParam()
// methods to attach an allocated structure to the thing--the structure
// contains the preferences for the server/fileset/etc (for instance,
// its warning threshholds, any current scout problems, etc).
// On delete requests, free that structure.
//
case evtCreate:
if (lpiEvt->fIsServer())
{
PVOID pPref = Server_LoadPreferences (lpiEvt);
lpiEvt->SetUserParam (pPref);
// Should this server be monitored?
//
if (!Subsets_fMonitorServer (g.sub, lpiEvt))
{
LPSERVER lpServer;
if ((lpServer = lpiEvt->OpenServer()) != NULL)
{
lpServer->SetMonitor (FALSE);
lpServer->Close();
}
}
Alert_Scout_SetOutOfDate (lpiEvt);
}
else if (lpiEvt->fIsService())
{
PVOID pPref = Services_LoadPreferences (lpiEvt);
lpiEvt->SetUserParam (pPref);
}
else if (lpiEvt->fIsAggregate())
{
PVOID pPref = Aggregates_LoadPreferences (lpiEvt);
lpiEvt->SetUserParam (pPref);
}
else if (lpiEvt->fIsFileset())
{
PVOID pPref = Filesets_LoadPreferences (lpiEvt);
lpiEvt->SetUserParam (pPref);
}
if (!lpiEvt->fIsCell())
{
Alert_Scout_QueueCheckServer (lpiEvt);
}
break;
// When we get a create request, use the object's Get/SetUserParam()
// methods to attach an allocated structure to the thing--the structure
// contains the preferences for the server/fileset/etc (for instance,
// its warning threshholds, any current scout problems, etc).
// On delete requests, free that structure.
//
case evtDestroy:
if (lpiEvt->fIsServer())
{
PVOID pPref = lpiEvt->GetUserParam();
lpiEvt->SetUserParam (0);
if (pPref) Delete (pPref);
}
else if (lpiEvt->fIsService() || lpiEvt->fIsAggregate() || lpiEvt->fIsFileset())
{
Alert_RemoveSecondary (lpiEvt);
PVOID pPref = lpiEvt->GetUserParam();
lpiEvt->SetUserParam (0);
if (pPref) Delete (pPref);
//.........这里部分代码省略.........