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
14 #include <afs/param.h>
19 #include "svc_delete.h"
23 * PROTOTYPES _________________________________________________________________
27 BOOL CALLBACK Services_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp);
28 void Services_Delete_OnInitDialog (HWND hDlg, LPIDENT lpi);
32 * ROUTINES ___________________________________________________________________
36 void Services_Delete (LPIDENT lpiService)
38 INT_PTR rc = ModalDialogParam (IDD_SVC_DELETE, GetActiveWindow(), (DLGPROC)Services_Delete_DlgProc, (LPARAM)lpiService);
41 StartTask (taskSVC_DELETE, NULL, lpiService);
47 BOOL CALLBACK Services_Delete_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
49 if (AfsAppLib_HandleHelp (IDD_SVC_DELETE, hDlg, msg, wp, lp))
52 static LPIDENT lpi = NULL;
53 if (msg == WM_INITDIALOG)
61 Services_Delete_OnInitDialog (hDlg, lpi);
69 EndDialog (hDlg, LOWORD(wp));
84 void Services_Delete_OnInitDialog (HWND hDlg, LPIDENT lpi)
86 TCHAR szServer[ cchNAME ];
87 TCHAR szService[ cchNAME ];
88 lpi->GetServerName (szServer);
89 lpi->GetServiceName (szService);
91 TCHAR szOld[ cchRESOURCE ];
92 GetDlgItemText (hDlg, IDC_DELSVC_DESC, szOld, cchRESOURCE);
94 LPTSTR pszNew = FormatString (szOld, TEXT("%s%s"), szServer, szService);
95 SetDlgItemText (hDlg, IDC_DELSVC_DESC, pszNew);