2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 #include <afs/param.h>
16 #include "svc_delete.h"
20 * PROTOTYPES _________________________________________________________________
24 BOOL CALLBACK Services_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp);
25 void Services_Delete_OnInitDialog (HWND hDlg, LPIDENT lpi);
29 * ROUTINES ___________________________________________________________________
33 void Services_Delete (LPIDENT lpiService)
35 int rc = ModalDialogParam (IDD_SVC_DELETE, GetActiveWindow(), (DLGPROC)Services_Delete_DlgProc, (LPARAM)lpiService);
38 StartTask (taskSVC_DELETE, NULL, lpiService);
44 BOOL CALLBACK Services_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
46 if (AfsAppLib_HandleHelp (IDD_SVC_DELETE, hDlg, msg, wp, lp))
49 static LPIDENT lpi = NULL;
50 if (msg == WM_INITDIALOG)
58 Services_Delete_OnInitDialog (hDlg, lpi);
66 EndDialog (hDlg, LOWORD(wp));
81 void Services_Delete_OnInitDialog (HWND hDlg, LPIDENT lpi)
83 TCHAR szServer[ cchNAME ];
84 TCHAR szService[ cchNAME ];
85 lpi->GetServerName (szServer);
86 lpi->GetServiceName (szService);
88 TCHAR szOld[ cchRESOURCE ];
89 GetDlgItemText (hDlg, IDC_DELSVC_DESC, szOld, cchRESOURCE);
91 LPTSTR pszNew = FormatString (szOld, TEXT("%s%s"), szServer, szService);
92 SetDlgItemText (hDlg, IDC_DELSVC_DESC, pszNew);