本文整理汇总了C++中FreeString函数的典型用法代码示例。如果您正苦于以下问题:C++ FreeString函数的具体用法?C++ FreeString怎么用?C++ FreeString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FreeString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnExpiredCredentials
void OnExpiredCredentials (WPARAM wp, LPARAM lp)
{
BOOL fExpired = (BOOL)wp;
LPCREDENTIALSDLG_PARAMS lpp = (LPCREDENTIALSDLG_PARAMS)lp;
if (lpp && lpp->bcdp.pfShowWarningEver && *(lpp->bcdp.pfShowWarningEver))
{
int idsWarning = (wp) ? IDS_BADCREDS_DESC_EXPIRED : IDS_BADCREDS_DESC_DESTROYED;
int idsDesc = (lpp->bcdp.idsDesc) ? lpp->bcdp.idsDesc : IDS_BADCREDS_DESC2;
LPTSTR pszDesc = FormatString (idsDesc, TEXT("%s"), lpp->szCell);
LPTSTR pszFullText = FormatString (idsWarning, TEXT("%s%s%m"), lpp->szCell, pszDesc, IDS_BADCREDS_DESC3);
FreeString (pszDesc);
REALBADCREDSDLG_PARAMS pp;
memset (&pp, 0x00, sizeof(pp));
pp.pszFullText = pszFullText;
memcpy (&pp.bcdp, &lpp->bcdp, sizeof(BADCREDSDLG_PARAMS));
if (ModalDialogParam (IDD_APPLIB_BADCREDS, NULL, (DLGPROC)BadCreds_DlgProc, (LPARAM)&pp) != IDCANCEL)
{
AfsAppLib_ShowCredentialsDialog (lpp);
}
FreeString (pszFullText);
}
if (lpp)
{
Delete (lpp);
}
}
示例2: 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);
}
}
示例3: Services_StartStop_OnInitDialog
void Services_StartStop_OnInitDialog (HWND hDlg, LPSERVICE_STARTSTOP_PARAMS lpp)
{
LPTSTR pszString = FormatString ((lpp->fStart) ? IDS_STARTSERVICE_TITLE : IDS_STOPSERVICE_TITLE);
SetWindowText (hDlg, pszString);
FreeString (pszString);
TCHAR szServer[ cchNAME ];
lpp->lpi->GetServerName (szServer);
TCHAR szService[ cchNAME ];
lpp->lpi->GetServiceName (szService);
pszString = FormatString ((lpp->fStart) ? IDS_STARTSERVICE_TEXT : IDS_STOPSERVICE_TEXT, TEXT("%s%s"), szServer, szService);
SetDlgItemText (hDlg, IDC_STARTSTOP_TEXT, pszString);
FreeString (pszString);
pszString = FormatString ((lpp->fStart) ? IDS_STARTSERVICE_STARTUP : IDS_STOPSERVICE_STARTUP, TEXT("%s%s"), szServer, szService);
SetDlgItemText (hDlg, IDC_STARTSTOP_STARTUP, pszString);
FreeString (pszString);
pszString = FormatString ((lpp->fStart) ? IDS_STARTSERVICE_PERMANENT : IDS_STOPSERVICE_PERMANENT, TEXT("%s%s"), szServer, szService);
SetDlgItemText (hDlg, IDC_STARTSTOP_PERMANENT, pszString);
FreeString (pszString);
pszString = FormatString ((lpp->fStart) ? IDS_STARTSERVICE_TEMPORARY : IDS_STOPSERVICE_TEMPORARY, TEXT("%s%s"), szServer, szService);
SetDlgItemText (hDlg, IDC_STARTSTOP_TEMPORARY, pszString);
FreeString (pszString);
CheckDlgButton (hDlg, IDC_STARTSTOP_PERMANENT, !lpp->fTemporary);
CheckDlgButton (hDlg, IDC_STARTSTOP_TEMPORARY, lpp->fTemporary);
}
示例4: 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);
}
示例5: FreeString
USER::~USER (void)
{
if (m_lpiThis)
m_lpiThis->m_cRef --;
FreeString (m_mszOwnerOf);
FreeString (m_mszMemberOf);
}
示例6: Subsets_FreeSubset
void Subsets_FreeSubset (LPSUBSET sub)
{
if (sub != NULL)
{
if (sub->pszMonitored)
FreeString (sub->pszMonitored);
if (sub->pszUnmonitored)
FreeString (sub->pszUnmonitored);
Delete (sub);
}
}
示例7: Message_ThreadProc
DWORD WINAPI Message_ThreadProc (PVOID lp)
{
LPMESSAGE_PARAMS pmp = (LPMESSAGE_PARAMS)lp;
DWORD rc = MessageBox (NULL, pmp->pszText, pmp->pszTitle, pmp->dwType);
FreeString (pmp->pszText);
FreeString (pmp->pszTitle);
Delete(pmp);
return rc;
}
示例8: Subsets_GetSubsetFromDialog
void Subsets_GetSubsetFromDialog (HWND hDlg, LPSUBSET sub)
{
HWND hList = GetDlgItem (hDlg, IDC_SUBSET_LIST);
if (sub->pszMonitored)
{
FreeString (sub->pszMonitored);
sub->pszMonitored = NULL;
}
if (sub->pszUnmonitored)
{
FreeString (sub->pszUnmonitored);
sub->pszUnmonitored = NULL;
}
// Is there only one server box checked?
//
int iiMax = (int) SendMessage (hList, LB_GETCOUNT, 0, 0);
size_t cChecked = 0;
int iiChecked;
for (int ii = 0; ii < iiMax; ++ii)
{
if (LB_GetCheck (hList, ii))
{
iiChecked = ii;
if ((++cChecked) > 1)
break;
}
}
if (cChecked == 1) // Only one is checked--use pszMonitored.
{
TCHAR szServer[ cchNAME ];
SendMessage (hList, LB_GETTEXT, iiChecked, (LPARAM)szServer);
FormatMultiString (&sub->pszMonitored, TRUE, TEXT("%1"), TEXT("%s"), szServer);
}
else // Use pszUnmonitored.
{
for (int ii = 0; ii < iiMax; ++ii)
{
if (!LB_GetCheck (hList, ii))
{
TCHAR szServer[ cchNAME ];
SendMessage (hList, LB_GETTEXT, ii, (LPARAM)szServer);
FormatMultiString (&sub->pszUnmonitored, TRUE, TEXT("%1"), TEXT("%s"), szServer);
}
}
}
}
示例9: FreeMenuList
void
FreeMenuList(struct MenuSpecial *ms)
{
struct MenuItem *item, *next, *stop, *special = ms->ms_Item;
APTR parent = ms->ms_Parent;
UBYTE type = ms->ms_Type;
if (!parent || !special)
return;
stop = special->NextItem;
if (type == MST_FIRSTITEM) {
item = ((struct Menu *)parent)->FirstItem;
((struct Menu *)parent)->FirstItem = special;
} else if (type == MST_FIRSTSUBITEM) {
item = ((struct MenuItem *)parent)->SubItem;
((struct MenuItem *)parent)->SubItem = special;
} else {
item = ((struct MenuItem *)parent)->NextItem;
((struct MenuItem *)parent)->NextItem = special;
}
for (;item != stop; item = next) {
next = item->NextItem;
if (item->Flags & ITEMTEXT) {
FreeString(((struct IntuiText *)item->ItemFill)->IText);
FreePooled(pool, item->ItemFill, sizeof(struct IntuiText));
}
FreePooled(pool, item, sizeof(struct SpecialMenuItem));
}
}
示例10: GetStringByID
void nsOEStringBundle::GetStringByID( PRInt32 stringID, nsString& result, nsIStringBundle *pBundle)
{
PRUnichar *ptrv = GetStringByID( stringID, pBundle);
result = ptrv;
FreeString( ptrv);
}
示例11: Server_Hosts_OnInitDialog
void Server_Hosts_OnInitDialog (HWND hDlg, LPSVR_HOSTS_PARAMS lpp)
{
TCHAR szServer[ cchNAME ];
lpp->lpiServer->GetServerName (szServer);
LPTSTR pszText = FormatString (IDS_HOST_TITLE, TEXT("%s"), szServer);
SetDlgItemText (hDlg, IDC_HOST_TITLE, pszText);
FreeString (pszText);
HWND hList = GetDlgItem (hDlg, IDC_HOST_LIST);
// We'll need an imagelist, if we want icons in the list.
//
HIMAGELIST hLarge;
if ((hLarge = ImageList_Create (32, 32, ILC_COLOR4 | ILC_MASK, 1, 1)) != 0)
AfsAppLib_AddToImageList (hLarge, IDI_SERVER, TRUE);
HIMAGELIST hSmall;
if ((hSmall = ImageList_Create (16, 16, ILC_COLOR4 | ILC_MASK, 1, 1)) != 0)
AfsAppLib_AddToImageList (hSmall, IDI_SERVER, FALSE);
FastList_SetImageLists (hList, hSmall, hLarge);
// Start loading the host list
//
StartTask (taskSVR_HOSTLIST_OPEN, hDlg, lpp->lpiServer);
EnableWindow (hList, FALSE);
EnableWindow (GetDlgItem (hDlg, IDC_HOST_ADD), FALSE);
EnableWindow (GetDlgItem (hDlg, IDC_HOST_REMOVE), FALSE);
}
示例12: 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);
}
}
示例13: Group_Create_OnNames
void Group_Create_OnNames (HWND hDlg)
{
TCHAR szSeparators[ cchRESOURCE ];
GetString (szSeparators, IDS_SEPARATORS);
lstrcat (szSeparators, TEXT(" \t"));
LPTSTR pszNames = GetEditText (GetDlgItem (hDlg, IDC_NEWGROUP_NAME));
EnableWindow (GetDlgItem (hDlg, IDOK), (pszNames && *pszNames));
BOOL fMultiple = FALSE;
for (LPTSTR psz = pszNames; !fMultiple && psz && *psz; ++psz)
{
if (lstrchr (szSeparators, *psz))
fMultiple = TRUE;
}
FreeString (pszNames);
EnableWindow (GetDlgItem (hDlg, IDC_NEWGROUP_ID_AUTO), !fMultiple);
EnableWindow (GetDlgItem (hDlg, IDC_NEWGROUP_ID_MANUAL), !fMultiple);
if (fMultiple)
{
CheckDlgButton (hDlg, IDC_NEWGROUP_ID_AUTO, TRUE);
CheckDlgButton (hDlg, IDC_NEWGROUP_ID_MANUAL, FALSE);
Group_Create_OnID (hDlg);
}
}
示例14: GetStringByID
void nsEudoraStringBundle::GetStringByID(int32_t stringID, nsString& result)
{
PRUnichar *ptrv = GetStringByID(stringID);
result = ptrv;
FreeString(ptrv);
}
示例15: Group_Create_OnInitDialog
void Group_Create_OnInitDialog (HWND hDlg)
{
LPCREATEGROUPDLG lpp = (LPCREATEGROUPDLG)GetWindowLongPtr (hDlg, DWLP_USER);
// Fix the title of the dialog
//
ULONG status;
TCHAR szName[ cchNAME ];
asc_CellNameGet_Fast (g.idClient, g.idCell, szName, &status);
TCHAR szText[ cchRESOURCE ];
GetDlgItemText (hDlg, IDC_NEWGROUP_TITLE, szText, cchRESOURCE);
LPTSTR pszText = FormatString (szText, TEXT("%s"), szName);
SetDlgItemText (hDlg, IDC_NEWGROUP_TITLE, pszText);
FreeString (pszText);
// Attach a spinner to the ID control
//
CheckDlgButton (hDlg, IDC_NEWGROUP_ID_AUTO, TRUE);
CreateSpinner (GetDlgItem (hDlg, IDC_NEWGROUP_ID), 10, TRUE, -0x7FFFFFFF, -1, -1);
Group_Create_OnID (hDlg);
StartTask (taskOBJECT_GET, hDlg, (PVOID)(g.idCell));
}