summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2005-07-25 22:45:28 (UTC)
committer Michael Krelin <hacker@klever.net>2005-07-25 22:45:28 (UTC)
commitd2f4327f3752ff30c3b0ec7fdd2e63bc1a1db5ee (patch) (unidiff)
tree1b5ddc636cee876fac8e90eb78ca3546a1a631b1
parent10639b71121a3fe7de24fe141d8dbe399fa283ff (diff)
downloaddipstick-d2f4327f3752ff30c3b0ec7fdd2e63bc1a1db5ee.zip
dipstick-d2f4327f3752ff30c3b0ec7fdd2e63bc1a1db5ee.tar.gz
dipstick-d2f4327f3752ff30c3b0ec7fdd2e63bc1a1db5ee.tar.bz2
added ability to parse multiple urls from plaintext selection and bumped versions
git-svn-id: http://svn.klever.net/kin/dipstick/trunk@126 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--COPYING2
-rw-r--r--DipstickDlg.cpp62
-rw-r--r--DipstickDlg.h2
-rw-r--r--dipstick.rc24
-rw-r--r--help/dipstick.rtf4
-rw-r--r--help/dipstick.xml5
-rw-r--r--install/install.cpp2
-rw-r--r--install/install.rc10
-rw-r--r--resource.h1
-rw-r--r--stdafx.h3
10 files changed, 83 insertions, 32 deletions
diff --git a/COPYING b/COPYING
index 427b0ba..fa23ff9 100644
--- a/COPYING
+++ b/COPYING
@@ -1,19 +1,19 @@
1Copyright (c) 1996-2004 Klever Group (http://www.klever.net/) 1Copyright (c) 1996-2005 Klever Group (http://www.klever.net/)
2 2
3Permission is hereby granted, free of charge, to any person obtaining a copy of 3Permission is hereby granted, free of charge, to any person obtaining a copy of
4this software and associated documentation files (the "Software"), to deal in 4this software and associated documentation files (the "Software"), to deal in
5the Software without restriction, including without limitation the rights to 5the Software without restriction, including without limitation the rights to
6use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 6use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7of the Software, and to permit persons to whom the Software is furnished to do 7of the Software, and to permit persons to whom the Software is furnished to do
8so, subject to the following conditions: 8so, subject to the following conditions:
9 9
10The above copyright notice and this permission notice shall be included in all 10The above copyright notice and this permission notice shall be included in all
11copies or substantial portions of the Software. 11copies or substantial portions of the Software.
12 12
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19SOFTWARE. 19SOFTWARE.
diff --git a/DipstickDlg.cpp b/DipstickDlg.cpp
index ace2aff..f27b219 100644
--- a/DipstickDlg.cpp
+++ b/DipstickDlg.cpp
@@ -1,1586 +1,1628 @@
1// DipstickDlg.cpp : implementation file 1// DipstickDlg.cpp : implementation file
2// 2//
3 3
4#include "stdafx.h" 4#include "stdafx.h"
5#include "Dipstick.h" 5#include "Dipstick.h"
6#include "DipstickDlg.h" 6#include "DipstickDlg.h"
7#include "DragPad.h" 7#include "DragPad.h"
8#include "OptionsDlg.h" 8#include "OptionsDlg.h"
9#include "HostNameDlg.h" 9#include "HostNameDlg.h"
10#include "HostProperties.h" 10#include "HostProperties.h"
11#include "AutoBestDlg.h" 11#include "AutoBestDlg.h"
12#include "ddeml.h" 12#include "ddeml.h"
13 13
14#include "URLSource.h" 14#include "URLSource.h"
15#include "SelectURLsDlg.h" 15#include "SelectURLsDlg.h"
16 16
17#ifdef _DEBUG 17#ifdef _DEBUG
18#define new DEBUG_NEW 18#define new DEBUG_NEW
19#undef THIS_FILE 19#undef THIS_FILE
20static char THIS_FILE[] = __FILE__; 20static char THIS_FILE[] = __FILE__;
21#endif 21#endif
22 22
23///////////////////////////////////////////////////////////////////////////// 23/////////////////////////////////////////////////////////////////////////////
24// CAboutDlg dialog used for App About 24// CAboutDlg dialog used for App About
25 25
26class CAboutDlg : public CDialog 26class CAboutDlg : public CDialog
27{ 27{
28public: 28public:
29 CAboutDlg(); 29 CAboutDlg();
30 30
31// Dialog Data 31// Dialog Data
32 //{{AFX_DATA(CAboutDlg) 32 //{{AFX_DATA(CAboutDlg)
33 enum { IDD = IDD_ABOUTBOX }; 33 enum { IDD = IDD_ABOUTBOX };
34 //}}AFX_DATA 34 //}}AFX_DATA
35 35
36 // ClassWizard generated virtual function overrides 36 // ClassWizard generated virtual function overrides
37 //{{AFX_VIRTUAL(CAboutDlg) 37 //{{AFX_VIRTUAL(CAboutDlg)
38 protected: 38 protected:
39 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 39 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
40 //}}AFX_VIRTUAL 40 //}}AFX_VIRTUAL
41 41
42// Implementation 42// Implementation
43protected: 43protected:
44 virtual BOOL OnInitDialog(); 44 virtual BOOL OnInitDialog();
45 //{{AFX_MSG(CAboutDlg) 45 //{{AFX_MSG(CAboutDlg)
46 afx_msg void OnKlevernet(); 46 afx_msg void OnKlevernet();
47 //}}AFX_MSG 47 //}}AFX_MSG
48 DECLARE_MESSAGE_MAP() 48 DECLARE_MESSAGE_MAP()
49}; 49};
50 50
51CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) 51CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
52{ 52{
53 //{{AFX_DATA_INIT(CAboutDlg) 53 //{{AFX_DATA_INIT(CAboutDlg)
54 //}}AFX_DATA_INIT 54 //}}AFX_DATA_INIT
55} 55}
56 56
57void CAboutDlg::DoDataExchange(CDataExchange* pDX) 57void CAboutDlg::DoDataExchange(CDataExchange* pDX)
58{ 58{
59 CDialog::DoDataExchange(pDX); 59 CDialog::DoDataExchange(pDX);
60 //{{AFX_DATA_MAP(CAboutDlg) 60 //{{AFX_DATA_MAP(CAboutDlg)
61 //}}AFX_DATA_MAP 61 //}}AFX_DATA_MAP
62} 62}
63 63
64BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) 64BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
65 //{{AFX_MSG_MAP(CAboutDlg) 65 //{{AFX_MSG_MAP(CAboutDlg)
66 ON_BN_CLICKED(IDC_KLEVERNET, OnKlevernet) 66 ON_BN_CLICKED(IDC_KLEVERNET, OnKlevernet)
67 //}}AFX_MSG_MAP 67 //}}AFX_MSG_MAP
68END_MESSAGE_MAP() 68END_MESSAGE_MAP()
69 69
70///////////////////////////////////////////////////////////////////////////// 70/////////////////////////////////////////////////////////////////////////////
71// CDipstickDlg dialog 71// CDipstickDlg dialog
72 72
73CDipstickDlg::CDipstickDlg(CWnd* pParent /*=NULL*/) 73CDipstickDlg::CDipstickDlg(CWnd* pParent /*=NULL*/)
74 : CDialog(CDipstickDlg::IDD, pParent), 74 : CDialog(CDipstickDlg::IDD, pParent),
75 m_DragPad(NULL), m_PingsPerHost(10), m_PingSize(32), m_TimeOut(5000), m_Interval(500), 75 m_DragPad(NULL), m_PingsPerHost(10), m_PingSize(32), m_TimeOut(5000), m_Interval(500),
76 m_SortCriteria(sortAvg), m_bShown(FALSE), m_MaxThreads(10), m_bExiting(FALSE), 76 m_SortCriteria(sortAvg), m_bShown(FALSE), m_MaxThreads(10), m_bExiting(FALSE),
77 m_bMSWorkAround(TRUE), m_MinSize(-1,-1), m_bAutoBest(TRUE), m_bSmartAdjust(TRUE), 77 m_bMSWorkAround(TRUE), m_MinSize(-1,-1), m_bAutoBest(TRUE), m_bSmartAdjust(TRUE),
78 m_bAdjustInnermost(TRUE), m_ActiveThreads(0), m_bIgnorelative(TRUE) 78 m_bAdjustInnermost(TRUE), m_ActiveThreads(0), m_bIgnorelative(TRUE)
79{ 79{
80CWinApp *app = AfxGetApp(); 80CWinApp *app = AfxGetApp();
81 ASSERT(app); 81 ASSERT(app);
82WORD hi,lo; 82WORD hi,lo;
83 hi=app->GetProfileInt("Options","IntervalHi",HIWORD(m_Interval)); 83 hi=app->GetProfileInt("Options","IntervalHi",HIWORD(m_Interval));
84 lo=app->GetProfileInt("Options","IntervalLo",LOWORD(m_Interval)); 84 lo=app->GetProfileInt("Options","IntervalLo",LOWORD(m_Interval));
85 m_Interval=MAKELONG(lo,hi); 85 m_Interval=MAKELONG(lo,hi);
86 m_MaxThreads=app->GetProfileInt("Options","MaxThreads",m_MaxThreads); 86 m_MaxThreads=app->GetProfileInt("Options","MaxThreads",m_MaxThreads);
87 m_PingSize=app->GetProfileInt("Options","PingSize",m_PingSize); 87 m_PingSize=app->GetProfileInt("Options","PingSize",m_PingSize);
88 m_PingsPerHost=app->GetProfileInt("Options","PingsPerHost",m_PingsPerHost); 88 m_PingsPerHost=app->GetProfileInt("Options","PingsPerHost",m_PingsPerHost);
89 m_SortCriteria=app->GetProfileInt("Options","SortBy",m_SortCriteria); 89 m_SortCriteria=app->GetProfileInt("Options","SortBy",m_SortCriteria);
90 hi=app->GetProfileInt("Options","TimeOutHi",HIWORD(m_TimeOut)); 90 hi=app->GetProfileInt("Options","TimeOutHi",HIWORD(m_TimeOut));
91 lo=app->GetProfileInt("Options","TimeOutLo",LOWORD(m_TimeOut)); 91 lo=app->GetProfileInt("Options","TimeOutLo",LOWORD(m_TimeOut));
92 m_TimeOut=MAKELONG(lo,hi); 92 m_TimeOut=MAKELONG(lo,hi);
93 m_bMSWorkAround = app->GetProfileInt("Options","InnermostURL",m_bMSWorkAround); 93 m_bMSWorkAround = app->GetProfileInt("Options","InnermostURL",m_bMSWorkAround);
94 m_bAutoBest = app->GetProfileInt("Options","AutoBest",m_bAutoBest); 94 m_bAutoBest = app->GetProfileInt("Options","AutoBest",m_bAutoBest);
95 m_bSmartAdjust = app->GetProfileInt("Options","SmartAdjust",m_bSmartAdjust); 95 m_bSmartAdjust = app->GetProfileInt("Options","SmartAdjust",m_bSmartAdjust);
96 m_bAdjustInnermost = app->GetProfileInt("Options","AdjustInnermost",m_bAdjustInnermost); 96 m_bAdjustInnermost = app->GetProfileInt("Options","AdjustInnermost",m_bAdjustInnermost);
97 m_bIgnorelative = app->GetProfileInt("Options","IgnoreRelative",m_bIgnorelative); 97 m_bIgnorelative = app->GetProfileInt("Options","IgnoreRelative",m_bIgnorelative);
98 m_impexPath = app->GetProfileString("Options","ImportExportPath",m_impexPath); 98 m_impexPath = app->GetProfileString("Options","ImportExportPath",m_impexPath);
99 //{{AFX_DATA_INIT(CDipstickDlg) 99 //{{AFX_DATA_INIT(CDipstickDlg)
100 //}}AFX_DATA_INIT 100 //}}AFX_DATA_INIT
101 // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 101 // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
102 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); 102 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
103 m_bmpBack.LoadBitmap(IDB_DIABACK); 103 m_bmpBack.LoadBitmap(IDB_DIABACK);
104 m_bmpBack.GetBitmap(&m_bitmapBack); 104 m_bmpBack.GetBitmap(&m_bitmapBack);
105CString tmp; 105CString tmp;
106 VERIFY(tmp.LoadString(IDS_REGEX_HTMLURL)); 106 VERIFY(tmp.LoadString(IDS_REGEX_HTMLURL));
107 VERIFY(m_reHTMLURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase)); 107 VERIFY(m_reHTMLURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase));
108 VERIFY(tmp.LoadString(IDS_REGEX_URL));
109 VERIFY(m_reURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase));
108} 110}
109 111
110CDipstickDlg::~CDipstickDlg() 112CDipstickDlg::~CDipstickDlg()
111{ 113{
112} 114}
113 115
114void CDipstickDlg::DoDataExchange(CDataExchange* pDX) 116void CDipstickDlg::DoDataExchange(CDataExchange* pDX)
115{ 117{
116 CDialog::DoDataExchange(pDX); 118 CDialog::DoDataExchange(pDX);
117 //{{AFX_DATA_MAP(CDipstickDlg) 119 //{{AFX_DATA_MAP(CDipstickDlg)
118 DDX_Control(pDX, IDC_ADVANCED, m_AdvancedCtl); 120 DDX_Control(pDX, IDC_ADVANCED, m_AdvancedCtl);
119 DDX_Control(pDX, ID_HELP, m_HelpCtl); 121 DDX_Control(pDX, ID_HELP, m_HelpCtl);
120 DDX_Control(pDX, IDC_EXIT, m_ExitCtl); 122 DDX_Control(pDX, IDC_EXIT, m_ExitCtl);
121 DDX_Control(pDX, IDC_OPTIONS, m_OptionsCtl); 123 DDX_Control(pDX, IDC_OPTIONS, m_OptionsCtl);
122 DDX_Control(pDX, IDC_MANUALPING, m_ManualPingCtl); 124 DDX_Control(pDX, IDC_MANUALPING, m_ManualPingCtl);
123 DDX_Control(pDX, IDC_REMOVE, m_RemoveCtl); 125 DDX_Control(pDX, IDC_REMOVE, m_RemoveCtl);
124 DDX_Control(pDX, IDC_REPINGALL, m_RepingAllCtl); 126 DDX_Control(pDX, IDC_REPINGALL, m_RepingAllCtl);
125 DDX_Control(pDX, IDC_REPING, m_RepingCtl); 127 DDX_Control(pDX, IDC_REPING, m_RepingCtl);
126 DDX_Control(pDX, IDC_CLEAR, m_ClearListCtl); 128 DDX_Control(pDX, IDC_CLEAR, m_ClearListCtl);
127 DDX_Control(pDX, IDC_HOSTLIST, m_HostList); 129 DDX_Control(pDX, IDC_HOSTLIST, m_HostList);
128 //}}AFX_DATA_MAP 130 //}}AFX_DATA_MAP
129} 131}
130 132
131BEGIN_MESSAGE_MAP(CDipstickDlg, CDialog) 133BEGIN_MESSAGE_MAP(CDipstickDlg, CDialog)
132 //{{AFX_MSG_MAP(CDipstickDlg) 134 //{{AFX_MSG_MAP(CDipstickDlg)
133 ON_WM_SYSCOMMAND() 135 ON_WM_SYSCOMMAND()
134 ON_WM_PAINT() 136 ON_WM_PAINT()
135 ON_WM_QUERYDRAGICON() 137 ON_WM_QUERYDRAGICON()
136 ON_WM_DESTROY() 138 ON_WM_DESTROY()
137 ON_BN_CLICKED(IDC_OPTIONS, OnOptions) 139 ON_BN_CLICKED(IDC_OPTIONS, OnOptions)
140 ON_MESSAGE(WM_DNP_URLSPING, OnURLSPing)
138 ON_MESSAGE(WM_DNP_URLPING, OnUrlPing) 141 ON_MESSAGE(WM_DNP_URLPING, OnUrlPing)
139 ON_MESSAGE(WM_DNP_ACTIVITYCOUNT, OnActivityCount) 142 ON_MESSAGE(WM_DNP_ACTIVITYCOUNT, OnActivityCount)
140 ON_MESSAGE(WM_DNP_UPDATEHOSTDATA, OnUpdateHostData) 143 ON_MESSAGE(WM_DNP_UPDATEHOSTDATA, OnUpdateHostData)
141 ON_MESSAGE(WM_DNP_HTML, OnHTMLTransfer) 144 ON_MESSAGE(WM_DNP_HTML, OnHTMLTransfer)
142 ON_NOTIFY(LVN_COLUMNCLICK, IDC_HOSTLIST, OnColumnclickHostlist) 145 ON_NOTIFY(LVN_COLUMNCLICK, IDC_HOSTLIST, OnColumnclickHostlist)
143 ON_WM_WINDOWPOSCHANGING() 146 ON_WM_WINDOWPOSCHANGING()
144 ON_COMMAND(ID_DRAGPAD_OPTIONS, OnDragpadOptions) 147 ON_COMMAND(ID_DRAGPAD_OPTIONS, OnDragpadOptions)
145 ON_COMMAND(ID_DRAGPAD_SHOWMAINWINDOW, OnDragpadShowmainwindow) 148 ON_COMMAND(ID_DRAGPAD_SHOWMAINWINDOW, OnDragpadShowmainwindow)
146 ON_COMMAND(ID_DRAGPAD_HELP, OnDragpadHelp) 149 ON_COMMAND(ID_DRAGPAD_HELP, OnDragpadHelp)
147 ON_COMMAND(ID_DRAGPAD_ABOUT, OnDragpadAbout) 150 ON_COMMAND(ID_DRAGPAD_ABOUT, OnDragpadAbout)
148 ON_COMMAND(ID_DRAGPAD_EXIT, OnDragpadExit) 151 ON_COMMAND(ID_DRAGPAD_EXIT, OnDragpadExit)
149 ON_BN_CLICKED(IDC_MANUALPING, OnManualping) 152 ON_BN_CLICKED(IDC_MANUALPING, OnManualping)
150 ON_COMMAND(ID_DRAGPAD_MANUALPING, OnDragpadManualping) 153 ON_COMMAND(ID_DRAGPAD_MANUALPING, OnDragpadManualping)
151 ON_COMMAND(ID_DRAGPAD_REPINGALL, OnDragpadRepingAll) 154 ON_COMMAND(ID_DRAGPAD_REPINGALL, OnDragpadRepingAll)
152 ON_COMMAND(ID_DRAGPAD_REMOVEALL, OnDragpadRemoveAll) 155 ON_COMMAND(ID_DRAGPAD_REMOVEALL, OnDragpadRemoveAll)
153 ON_BN_CLICKED(IDC_REPING, OnReping) 156 ON_BN_CLICKED(IDC_REPING, OnReping)
154 ON_BN_CLICKED(IDC_REPINGALL, OnRepingall) 157 ON_BN_CLICKED(IDC_REPINGALL, OnRepingall)
155 ON_BN_CLICKED(IDC_CLEAR, OnClear) 158 ON_BN_CLICKED(IDC_CLEAR, OnClear)
156 ON_NOTIFY(LVN_INSERTITEM, IDC_HOSTLIST, OnInsertitemHostlist) 159 ON_NOTIFY(LVN_INSERTITEM, IDC_HOSTLIST, OnInsertitemHostlist)
157 ON_NOTIFY(LVN_DELETEITEM, IDC_HOSTLIST, OnDeleteitemHostlist) 160 ON_NOTIFY(LVN_DELETEITEM, IDC_HOSTLIST, OnDeleteitemHostlist)
158 ON_NOTIFY(LVN_DELETEALLITEMS, IDC_HOSTLIST, OnDeleteallitemsHostlist) 161 ON_NOTIFY(LVN_DELETEALLITEMS, IDC_HOSTLIST, OnDeleteallitemsHostlist)
159 ON_BN_CLICKED(IDC_EXIT, OnExit) 162 ON_BN_CLICKED(IDC_EXIT, OnExit)
160 ON_NOTIFY(LVN_ITEMCHANGED, IDC_HOSTLIST, OnItemchangedHostlist) 163 ON_NOTIFY(LVN_ITEMCHANGED, IDC_HOSTLIST, OnItemchangedHostlist)
161 ON_BN_CLICKED(IDC_REMOVE, OnRemove) 164 ON_BN_CLICKED(IDC_REMOVE, OnRemove)
162 ON_NOTIFY(NM_RCLICK, IDC_HOSTLIST, OnRclickHostlist) 165 ON_NOTIFY(NM_RCLICK, IDC_HOSTLIST, OnRclickHostlist)
163 ON_COMMAND(ID_HOSTLIST_REPING, OnHostListReping) 166 ON_COMMAND(ID_HOSTLIST_REPING, OnHostListReping)
164 ON_COMMAND(ID_HOSTLIST_REMOVE, OnHostListRemove) 167 ON_COMMAND(ID_HOSTLIST_REMOVE, OnHostListRemove)
165 ON_COMMAND(ID_HOSTLIST_REPINGALL, OnHostListRepingAll) 168 ON_COMMAND(ID_HOSTLIST_REPINGALL, OnHostListRepingAll)
166 ON_COMMAND(ID_HOSTLIST_REMOVEALL, OnHostListRemoveAll) 169 ON_COMMAND(ID_HOSTLIST_REMOVEALL, OnHostListRemoveAll)
167 ON_COMMAND(ID_HOSTLIST_OPENURL, OnHostListOpenURL) 170 ON_COMMAND(ID_HOSTLIST_OPENURL, OnHostListOpenURL)
168 ON_COMMAND(ID_HOSTLIST_PROPERTIES, OnHostListProperties) 171 ON_COMMAND(ID_HOSTLIST_PROPERTIES, OnHostListProperties)
169 ON_NOTIFY(NM_DBLCLK, IDC_HOSTLIST, OnDblclkHostlist) 172 ON_NOTIFY(NM_DBLCLK, IDC_HOSTLIST, OnDblclkHostlist)
170 ON_WM_CLOSE() 173 ON_WM_CLOSE()
171 ON_WM_GETMINMAXINFO() 174 ON_WM_GETMINMAXINFO()
172 ON_WM_SIZE() 175 ON_WM_SIZE()
173 ON_BN_CLICKED(ID_HELP, OnHelp) 176 ON_BN_CLICKED(ID_HELP, OnHelp)
174 ON_NOTIFY(LVN_BEGINDRAG, IDC_HOSTLIST, OnBegindragHostlist) 177 ON_NOTIFY(LVN_BEGINDRAG, IDC_HOSTLIST, OnBegindragHostlist)
175 ON_COMMAND(ID_HOSTLIST_PASTEURL, OnPasteurl) 178 ON_COMMAND(ID_HOSTLIST_PASTEURL, OnPasteurl)
176 ON_COMMAND(ID_HOSTLIST_COPYURL, OnHostlistCopyurl) 179 ON_COMMAND(ID_HOSTLIST_COPYURL, OnHostlistCopyurl)
177 ON_WM_HELPINFO() 180 ON_WM_HELPINFO()
178 ON_WM_DROPFILES() 181 ON_WM_DROPFILES()
179 ON_BN_CLICKED(IDC_ADVANCED, OnAdvanced) 182 ON_BN_CLICKED(IDC_ADVANCED, OnAdvanced)
180 ON_COMMAND(ID_ADVANCED_EXPORTLIST, OnAdvancedExportlist) 183 ON_COMMAND(ID_ADVANCED_EXPORTLIST, OnAdvancedExportlist)
181 ON_COMMAND(ID_ADVANCED_IMPORTLIST, OnAdvancedImportlist) 184 ON_COMMAND(ID_ADVANCED_IMPORTLIST, OnAdvancedImportlist)
182 ON_COMMAND(ID_DRAGPAD_PASTEURL, OnPasteurl) 185 ON_COMMAND(ID_DRAGPAD_PASTEURL, OnPasteurl)
183 ON_COMMAND(ID_DRAGPAD_ADVANCED_EXPORTLIST, OnDragpadAdvancedExportlist) 186 ON_COMMAND(ID_DRAGPAD_ADVANCED_EXPORTLIST, OnDragpadAdvancedExportlist)
184 ON_COMMAND(ID_DRAGPAD_ADVANCED_IMPORTLIST, OnDragpadAdvancedImportlist) 187 ON_COMMAND(ID_DRAGPAD_ADVANCED_IMPORTLIST, OnDragpadAdvancedImportlist)
185 //}}AFX_MSG_MAP 188 //}}AFX_MSG_MAP
186END_MESSAGE_MAP() 189END_MESSAGE_MAP()
187 190
188///////////////////////////////////////////////////////////////////////////// 191/////////////////////////////////////////////////////////////////////////////
189// CDipstickDlg message handlers 192// CDipstickDlg message handlers
190 193
191BOOL CDipstickDlg::OnInitDialog() 194BOOL CDipstickDlg::OnInitDialog()
192{ 195{
193 CDialog::OnInitDialog(); 196 CDialog::OnInitDialog();
194 197
195 // Add "About..." menu item to system menu. 198 // Add "About..." menu item to system menu.
196 199
197 // IDM_ABOUTBOX must be in the system command range. 200 // IDM_ABOUTBOX must be in the system command range.
198 ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); 201 ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
199 ASSERT(IDM_ABOUTBOX < 0xF000); 202 ASSERT(IDM_ABOUTBOX < 0xF000);
200 203
201 CMenu* pSysMenu = GetSystemMenu(FALSE); 204 CMenu* pSysMenu = GetSystemMenu(FALSE);
202 CString strAboutMenu; 205 CString strAboutMenu;
203 strAboutMenu.LoadString(IDS_ABOUTBOX); 206 strAboutMenu.LoadString(IDS_ABOUTBOX);
204 if (!strAboutMenu.IsEmpty()) 207 if (!strAboutMenu.IsEmpty())
205 { 208 {
206 pSysMenu->AppendMenu(MF_SEPARATOR); 209 pSysMenu->AppendMenu(MF_SEPARATOR);
207 pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); 210 pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
208 } 211 }
209 212
210 // Set the icon for this dialog. The framework does this automatically 213 // Set the icon for this dialog. The framework does this automatically
211 // when the application's main window is not a dialog 214 // when the application's main window is not a dialog
212 SetIcon(m_hIcon, TRUE); // Set big icon 215 SetIcon(m_hIcon, TRUE); // Set big icon
213 SetIcon(m_hIcon, FALSE); // Set small icon 216 SetIcon(m_hIcon, FALSE); // Set small icon
214 217
215CRect wrci, wrco; 218CRect wrci, wrco;
216 GetWindowRect(&wrco); 219 GetWindowRect(&wrco);
217 GetClientRect(&wrci); 220 GetClientRect(&wrci);
218CRect brc1, brc2, lrc; 221CRect brc1, brc2, lrc;
219 m_HostList.GetWindowRect(&lrc); 222 m_HostList.GetWindowRect(&lrc);
220 ScreenToClient(&lrc); 223 ScreenToClient(&lrc);
221 m_ManualPingCtl.GetWindowRect(&brc1); 224 m_ManualPingCtl.GetWindowRect(&brc1);
222 ScreenToClient(brc1); 225 ScreenToClient(brc1);
223 m_RepingCtl.GetWindowRect(&brc2); 226 m_RepingCtl.GetWindowRect(&brc2);
224 ScreenToClient(&brc2); 227 ScreenToClient(&brc2);
225 m_OverX = lrc.left; 228 m_OverX = lrc.left;
226 m_OverY = lrc.top; 229 m_OverY = lrc.top;
227 m_GapY = brc2.top - brc1.bottom; 230 m_GapY = brc2.top - brc1.bottom;
228 m_MinSize.cx = m_OverX+m_OverX+m_OverX+brc1.Width()+m_OverX; 231 m_MinSize.cx = m_OverX+m_OverX+m_OverX+brc1.Width()+m_OverX;
229 m_MinSize.cy = m_OverY+(brc1.Height()+m_GapY)*6+(brc1.Height()+m_GapY)*3+m_OverY; 232 m_MinSize.cy = m_OverY+(brc1.Height()+m_GapY)*6+(brc1.Height()+m_GapY)*3+m_OverY;
230 m_MinSize.cx+=wrco.Width()-wrci.Width(); 233 m_MinSize.cx+=wrco.Width()-wrci.Width();
231 m_MinSize.cy+=wrco.Height()-wrci.Height(); 234 m_MinSize.cy+=wrco.Height()-wrci.Height();
232 235
233CWinApp *app = AfxGetApp(); 236CWinApp *app = AfxGetApp();
234 ASSERT(app); 237 ASSERT(app);
235CRect wrc; 238CRect wrc;
236 wrc.top=app->GetProfileInt("Windows","DlgTop",-1); 239 wrc.top=app->GetProfileInt("Windows","DlgTop",-1);
237 wrc.bottom=app->GetProfileInt("Windows","DlgBottom",-1); 240 wrc.bottom=app->GetProfileInt("Windows","DlgBottom",-1);
238 wrc.left=app->GetProfileInt("Windows","DlgLeft",-1); 241 wrc.left=app->GetProfileInt("Windows","DlgLeft",-1);
239 wrc.right=app->GetProfileInt("Windows","DlgRight",-1); 242 wrc.right=app->GetProfileInt("Windows","DlgRight",-1);
240 if((wrc.top!=-1|| wrc.bottom!=-1) && wrc.left!=-1&& wrc.right!=-1) 243 if((wrc.top!=-1|| wrc.bottom!=-1) && wrc.left!=-1&& wrc.right!=-1)
241 MoveWindow(&wrc); 244 MoveWindow(&wrc);
242 245
243 RecalcLayout(-1,-1); 246 RecalcLayout(-1,-1);
244 247
245 m_DragPad = new CDragPad(); 248 m_DragPad = new CDragPad();
246 m_DragPad->m_Daddy=this; 249 m_DragPad->m_Daddy=this;
247 m_DragPad->Create(CDragPad::IDD); 250 m_DragPad->Create(CDragPad::IDD);
248 m_Images.Create(16,16,TRUE,4,1); 251 m_Images.Create(16,16,TRUE,4,1);
249 m_iPending=m_Images.Add(app->LoadIcon(IDI_PENDING)); 252 m_iPending=m_Images.Add(app->LoadIcon(IDI_PENDING));
250 m_iPinging=m_Images.Add(app->LoadIcon(IDI_PINGING)); 253 m_iPinging=m_Images.Add(app->LoadIcon(IDI_PINGING));
251 m_iCompleted=m_Images.Add(app->LoadIcon(IDI_COMPLETED)); 254 m_iCompleted=m_Images.Add(app->LoadIcon(IDI_COMPLETED));
252 m_iUnreachable=m_Images.Add(app->LoadIcon(IDI_UNREACHABLE)); 255 m_iUnreachable=m_Images.Add(app->LoadIcon(IDI_UNREACHABLE));
253 ASSERT(!(m_iPending<0 || m_iPinging<0 || m_iCompleted<0 || m_iUnreachable<0)); 256 ASSERT(!(m_iPending<0 || m_iPinging<0 || m_iCompleted<0 || m_iUnreachable<0));
254 m_HostList.SetImageList(&m_Images,LVSIL_NORMAL); 257 m_HostList.SetImageList(&m_Images,LVSIL_NORMAL);
255 m_HostList.SetImageList(&m_Images,LVSIL_SMALL); 258 m_HostList.SetImageList(&m_Images,LVSIL_SMALL);
256 m_HostList.SetImageList(&m_Images,LVSIL_STATE); 259 m_HostList.SetImageList(&m_Images,LVSIL_STATE);
257 m_HostList.SetTextColor(RGB(255,255,0));// Yellow 260 m_HostList.SetTextColor(RGB(255,255,0));// Yellow
258 m_HostList.SetTextBkColor(RGB(12,167,0));// Green 261 m_HostList.SetTextBkColor(RGB(12,167,0));// Green
259 m_HostList.SetBkColor(RGB(12,167,0)); // Green 262 m_HostList.SetBkColor(RGB(12,167,0)); // Green
260CRect listrc; 263CRect listrc;
261 m_HostList.GetClientRect(&listrc); 264 m_HostList.GetClientRect(&listrc);
262 m_HostList.InsertColumn(0,"Host Name",LVCFMT_LEFT,app->GetProfileInt("Columns","HostName",listrc.Width()-(listrc.Width()*2/16)*4-(listrc.Width()*3/16)),subitemHost); 265 m_HostList.InsertColumn(0,"Host Name",LVCFMT_LEFT,app->GetProfileInt("Columns","HostName",listrc.Width()-(listrc.Width()*2/16)*4-(listrc.Width()*3/16)),subitemHost);
263 m_HostList.InsertColumn(1,"Host IP",LVCFMT_LEFT,app->GetProfileInt("Columns","HostIP",listrc.Width()*3/16),subitemIP); 266 m_HostList.InsertColumn(1,"Host IP",LVCFMT_LEFT,app->GetProfileInt("Columns","HostIP",listrc.Width()*3/16),subitemIP);
264 m_HostList.InsertColumn(2,"Min RTT",LVCFMT_RIGHT,app->GetProfileInt("Columns","MinRTT",listrc.Width()*2/16),subitemMin); 267 m_HostList.InsertColumn(2,"Min RTT",LVCFMT_RIGHT,app->GetProfileInt("Columns","MinRTT",listrc.Width()*2/16),subitemMin);
265 m_HostList.InsertColumn(3,"Avg RTT",LVCFMT_RIGHT,app->GetProfileInt("Columns","AvgRTT",listrc.Width()*2/16),subitemAvg); 268 m_HostList.InsertColumn(3,"Avg RTT",LVCFMT_RIGHT,app->GetProfileInt("Columns","AvgRTT",listrc.Width()*2/16),subitemAvg);
266 m_HostList.InsertColumn(4,"Max RTT",LVCFMT_RIGHT,app->GetProfileInt("Columns","MaxRTT",listrc.Width()*2/16),subitemMax); 269 m_HostList.InsertColumn(4,"Max RTT",LVCFMT_RIGHT,app->GetProfileInt("Columns","MaxRTT",listrc.Width()*2/16),subitemMax);
267 m_HostList.InsertColumn(5,"Pktloss", LVCFMT_RIGHT,app->GetProfileInt("Columns","PktLoss",listrc.Width()*2/16),subitemPacketloss); 270 m_HostList.InsertColumn(5,"Pktloss", LVCFMT_RIGHT,app->GetProfileInt("Columns","PktLoss",listrc.Width()*2/16),subitemPacketloss);
268 271
269 DragAcceptFiles(TRUE); 272 DragAcceptFiles(TRUE);
270 273
271 return TRUE; // return TRUE unless you set the focus to a control 274 return TRUE; // return TRUE unless you set the focus to a control
272} 275}
273 276
274void CDipstickDlg::OnSysCommand(UINT nID, LPARAM lParam) 277void CDipstickDlg::OnSysCommand(UINT nID, LPARAM lParam)
275{ 278{
276 if ((nID & 0xFFF0) == IDM_ABOUTBOX) 279 if ((nID & 0xFFF0) == IDM_ABOUTBOX)
277 { 280 {
278 CAboutDlg dlgAbout; 281 CAboutDlg dlgAbout;
279 dlgAbout.DoModal(); 282 dlgAbout.DoModal();
280 } 283 }
281 else 284 else
282 { 285 {
283 CDialog::OnSysCommand(nID, lParam); 286 CDialog::OnSysCommand(nID, lParam);
284 } 287 }
285} 288}
286 289
287// If you add a minimize button to your dialog, you will need the code below 290// If you add a minimize button to your dialog, you will need the code below
288// to draw the icon. For MFC applications using the document/view model, 291// to draw the icon. For MFC applications using the document/view model,
289// this is automatically done for you by the framework. 292// this is automatically done for you by the framework.
290 293
291void CDipstickDlg::OnPaint() 294void CDipstickDlg::OnPaint()
292{ 295{
293 if (IsIconic()) 296 if (IsIconic())
294 { 297 {
295 CPaintDC dc(this); // device context for painting 298 CPaintDC dc(this); // device context for painting
296 299
297 SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); 300 SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
298 301
299 // Center icon in client rectangle 302 // Center icon in client rectangle
300 int cxIcon = GetSystemMetrics(SM_CXICON); 303 int cxIcon = GetSystemMetrics(SM_CXICON);
301 int cyIcon = GetSystemMetrics(SM_CYICON); 304 int cyIcon = GetSystemMetrics(SM_CYICON);
302 CRect rect; 305 CRect rect;
303 GetClientRect(&rect); 306 GetClientRect(&rect);
304 int x = (rect.Width() - cxIcon + 1) / 2; 307 int x = (rect.Width() - cxIcon + 1) / 2;
305 int y = (rect.Height() - cyIcon + 1) / 2; 308 int y = (rect.Height() - cyIcon + 1) / 2;
306 309
307 // Draw the icon 310 // Draw the icon
308 dc.DrawIcon(x, y, m_hIcon); 311 dc.DrawIcon(x, y, m_hIcon);
309 } 312 }
310 else 313 else
311 { 314 {
312 CPaintDC pDC(this); 315 CPaintDC pDC(this);
313 CDC bmpDC; 316 CDC bmpDC;
314 bmpDC.CreateCompatibleDC(&pDC); 317 bmpDC.CreateCompatibleDC(&pDC);
315 bmpDC.SelectObject(&m_bmpBack); 318 bmpDC.SelectObject(&m_bmpBack);
316 CRect rc; 319 CRect rc;
317 GetClientRect(&rc); 320 GetClientRect(&rc);
318 for(int x=-m_bitmapBack.bmWidth*2/4;x<rc.Width();x+=m_bitmapBack.bmWidth) 321 for(int x=-m_bitmapBack.bmWidth*2/4;x<rc.Width();x+=m_bitmapBack.bmWidth)
319 for(int y=-m_bitmapBack.bmHeight*2/4;y<rc.Height();y+=m_bitmapBack.bmHeight) 322 for(int y=-m_bitmapBack.bmHeight*2/4;y<rc.Height();y+=m_bitmapBack.bmHeight)
320 pDC.BitBlt(x,y,m_bitmapBack.bmWidth,m_bitmapBack.bmHeight,&bmpDC,0,0,SRCCOPY); 323 pDC.BitBlt(x,y,m_bitmapBack.bmWidth,m_bitmapBack.bmHeight,&bmpDC,0,0,SRCCOPY);
321 bmpDC.DeleteDC(); 324 bmpDC.DeleteDC();
322 CDialog::OnPaint(); 325 CDialog::OnPaint();
323 } 326 }
324} 327}
325 328
326// The system calls this to obtain the cursor to display while the user drags 329// The system calls this to obtain the cursor to display while the user drags
327// the minimized window. 330// the minimized window.
328HCURSOR CDipstickDlg::OnQueryDragIcon() 331HCURSOR CDipstickDlg::OnQueryDragIcon()
329{ 332{
330 return (HCURSOR) m_hIcon; 333 return (HCURSOR) m_hIcon;
331} 334}
332 335
333////////////////////////// 336//////////////////////////
334 337
335void CDipstickDlg::OnDestroy() 338void CDipstickDlg::OnDestroy()
336{ 339{
337 CDialog::OnDestroy(); 340 CDialog::OnDestroy();
338 TRACE0("DestroyMain\n"); 341 TRACE0("DestroyMain\n");
339 m_DragPad->DestroyWindow(); 342 m_DragPad->DestroyWindow();
340 delete m_DragPad; 343 delete m_DragPad;
341 m_DragPad=NULL; 344 m_DragPad=NULL;
342 // *** Eventually move the following code to separate function 345 // *** Eventually move the following code to separate function
343POSITION p = m_Hosts.GetHeadPosition(); 346POSITION p = m_Hosts.GetHeadPosition();
344 while(p){ 347 while(p){
345 POSITION pp = p; 348 POSITION pp = p;
346 CPingyHost *host = m_Hosts.GetNext(p); 349 CPingyHost *host = m_Hosts.GetNext(p);
347 ASSERT(host); 350 ASSERT(host);
348 m_Hosts.RemoveAt(pp); 351 m_Hosts.RemoveAt(pp);
349 host->Suicide(); 352 host->Suicide();
350 } 353 }
351 ASSERT(m_Hosts.IsEmpty()); 354 ASSERT(m_Hosts.IsEmpty());
352} 355}
353 356
354void CDipstickDlg::OnOptions() 357void CDipstickDlg::OnOptions()
355{ 358{
356COptionsDlg o(this); 359COptionsDlg o(this);
357 o.m_Pings = m_PingsPerHost; 360 o.m_Pings = m_PingsPerHost;
358 o.m_PingSize = m_PingSize; 361 o.m_PingSize = m_PingSize;
359 o.m_TimeOut = max(1,m_TimeOut/1000); 362 o.m_TimeOut = max(1,m_TimeOut/1000);
360 o.m_Interval = max(1,m_Interval/1000); 363 o.m_Interval = max(1,m_Interval/1000);
361 o.m_MaxThreads = m_MaxThreads; 364 o.m_MaxThreads = m_MaxThreads;
362 o.m_bMSWorkAround = m_bMSWorkAround; 365 o.m_bMSWorkAround = m_bMSWorkAround;
363 o.m_bAutoBest = m_bAutoBest; 366 o.m_bAutoBest = m_bAutoBest;
364 o.m_bAdjust = m_bSmartAdjust; 367 o.m_bAdjust = m_bSmartAdjust;
365 o.m_bAdjustInn = m_bAdjustInnermost; 368 o.m_bAdjustInn = m_bAdjustInnermost;
366 o.m_bIgnorelative = m_bIgnorelative; 369 o.m_bIgnorelative = m_bIgnorelative;
367 if(o.DoModal()==IDOK){ 370 if(o.DoModal()==IDOK){
368 m_PingsPerHost = o.m_Pings; 371 m_PingsPerHost = o.m_Pings;
369 m_PingSize = o.m_PingSize; 372 m_PingSize = o.m_PingSize;
370 m_TimeOut = o.m_TimeOut*1000; 373 m_TimeOut = o.m_TimeOut*1000;
371 m_Interval = o.m_Interval*1000; 374 m_Interval = o.m_Interval*1000;
372 m_MaxThreads = o.m_MaxThreads; 375 m_MaxThreads = o.m_MaxThreads;
373 m_bMSWorkAround = o.m_bMSWorkAround; 376 m_bMSWorkAround = o.m_bMSWorkAround;
374 m_bAutoBest = o.m_bAutoBest; 377 m_bAutoBest = o.m_bAutoBest;
375 m_bSmartAdjust = o.m_bAdjust; 378 m_bSmartAdjust = o.m_bAdjust;
376 m_bAdjustInnermost = o.m_bAdjustInn; 379 m_bAdjustInnermost = o.m_bAdjustInn;
377 m_bIgnorelative = o.m_bIgnorelative; 380 m_bIgnorelative = o.m_bIgnorelative;
378 } 381 }
379} 382}
380 383
381BOOL CDipstickDlg::AddPingyHost(CPingyHost *host) 384BOOL CDipstickDlg::AddPingyHost(CPingyHost *host)
382{ 385{
383 m_Hosts.AddTail(host); 386 m_Hosts.AddTail(host);
384int i = m_HostList.InsertItem(0,host->m_HostName); 387int i = m_HostList.InsertItem(0,host->m_HostName);
385 m_HostList.SetItemData(i,(DWORD)host); 388 m_HostList.SetItemData(i,(DWORD)host);
386 UpdateDragpadTitle(); 389 UpdateDragpadTitle();
387 return UpdatePingyHost(host,i);// *** Do someting if failed. 390 return UpdatePingyHost(host,i);// *** Do someting if failed.
388} 391}
389 392
390BOOL CDipstickDlg::UpdatePingyHost(CPingyHost *host,int index) 393BOOL CDipstickDlg::UpdatePingyHost(CPingyHost *host,int index)
391{ 394{
392 UpdateDragpadTitle(); 395 UpdateDragpadTitle();
393int i = index; 396int i = index;
394 if(i<0){ 397 if(i<0){
395 int is = m_HostList.GetItemCount(); 398 int is = m_HostList.GetItemCount();
396 for(i=0;i<is;i++) 399 for(i=0;i<is;i++)
397 if(m_HostList.GetItemData(i)==(DWORD)host) 400 if(m_HostList.GetItemData(i)==(DWORD)host)
398 break; 401 break;
399 if(!(i<is)) 402 if(!(i<is))
400 return FALSE; 403 return FALSE;
401 } 404 }
402 ASSERT(m_HostList.GetItemData(i)==(DWORD)host); 405 ASSERT(m_HostList.GetItemData(i)==(DWORD)host);
403 m_HostList.SetItemText(i,subitemHost,host->m_HostName.IsEmpty()?"...":host->m_HostName); 406 m_HostList.SetItemText(i,subitemHost,host->m_HostName.IsEmpty()?"...":host->m_HostName);
404 m_HostList.SetItemText(i,subitemIP,host->m_IP?inet_ntoa(*(in_addr*)&host->m_IP):"..."); 407 m_HostList.SetItemText(i,subitemIP,host->m_IP?inet_ntoa(*(in_addr*)&host->m_IP):"...");
405 if(host->m_Pinged && host->m_Packetloss>=0){ 408 if(host->m_Pinged && host->m_Packetloss>=0){
406 CString tmp; 409 CString tmp;
407 if(host->m_Packetloss==100){ 410 if(host->m_Packetloss==100){
408 m_HostList.SetItemText(i,subitemMin,"-"); 411 m_HostList.SetItemText(i,subitemMin,"-");
409 m_HostList.SetItemText(i,subitemAvg,"-"); 412 m_HostList.SetItemText(i,subitemAvg,"-");
410 m_HostList.SetItemText(i,subitemMax,"-"); 413 m_HostList.SetItemText(i,subitemMax,"-");
411 }else{ 414 }else{
412 tmp.Format("%lu",host->m_MinRTT); 415 tmp.Format("%lu",host->m_MinRTT);
413 m_HostList.SetItemText(i,subitemMin,tmp); 416 m_HostList.SetItemText(i,subitemMin,tmp);
414 tmp.Format("%lu",host->m_AvgRTT); 417 tmp.Format("%lu",host->m_AvgRTT);
415 m_HostList.SetItemText(i,subitemAvg,tmp); 418 m_HostList.SetItemText(i,subitemAvg,tmp);
416 tmp.Format("%lu",host->m_MaxRTT); 419 tmp.Format("%lu",host->m_MaxRTT);
417 m_HostList.SetItemText(i,subitemMax,tmp); 420 m_HostList.SetItemText(i,subitemMax,tmp);
418 } 421 }
419 tmp.Format("%d%%",host->m_Packetloss); 422 tmp.Format("%d%%",host->m_Packetloss);
420 m_HostList.SetItemText(i,subitemPacketloss,tmp); 423 m_HostList.SetItemText(i,subitemPacketloss,tmp);
421 }else{ 424 }else{
422 m_HostList.SetItemText(i,subitemMin,"..."); 425 m_HostList.SetItemText(i,subitemMin,"...");
423 m_HostList.SetItemText(i,subitemAvg,"..."); 426 m_HostList.SetItemText(i,subitemAvg,"...");
424 m_HostList.SetItemText(i,subitemMax,"..."); 427 m_HostList.SetItemText(i,subitemMax,"...");
425 m_HostList.SetItemText(i,subitemPacketloss,"..."); 428 m_HostList.SetItemText(i,subitemPacketloss,"...");
426 } 429 }
427 if(host->m_Pinging) 430 if(host->m_Pinging)
428 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iPinging,0,0,0); 431 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iPinging,0,0,0);
429 else{ 432 else{
430 if(host->m_bToPing) 433 if(host->m_bToPing)
431 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iPending,0,0,0); 434 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iPending,0,0,0);
432 else{ 435 else{
433 if(host->m_Pinged){ 436 if(host->m_Pinged){
434 if(host->m_Packetloss==100) 437 if(host->m_Packetloss==100)
435 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iUnreachable,0,0,0); 438 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iUnreachable,0,0,0);
436 else 439 else
437 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iCompleted,0,0,0); 440 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iCompleted,0,0,0);
438 }else 441 }else
439 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iPending,0,0,0); 442 m_HostList.SetItem(i,subitemHost,LVIF_IMAGE,NULL,m_iPending,0,0,0);
440 } 443 }
441 } 444 }
442 m_HostList.SortItems(CompareItems,(DWORD)this); 445 m_HostList.SortItems(CompareItems,(DWORD)this);
443 UpdateControlButtons(); 446 UpdateControlButtons();
444 return TRUE; 447 return TRUE;
445} 448}
446 449
447BOOL CDipstickDlg::RemovePingyHost(CPingyHost *host,int index) 450BOOL CDipstickDlg::RemovePingyHost(CPingyHost *host,int index)
448{ 451{
449 if(host->m_Pinging) 452 if(host->m_Pinging)
450 return FALSE; 453 return FALSE;
451int i = index; 454int i = index;
452 if(i<0){ 455 if(i<0){
453 int is = m_HostList.GetItemCount(); 456 int is = m_HostList.GetItemCount();
454 for(i=0;i<is;i++) 457 for(i=0;i<is;i++)
455 if(m_HostList.GetItemData(i)==(DWORD)host) 458 if(m_HostList.GetItemData(i)==(DWORD)host)
456 break; 459 break;
457 if(!(i<is)) 460 if(!(i<is))
458 return FALSE; 461 return FALSE;
459 } 462 }
460 ASSERT(m_HostList.GetItemData(i)==(DWORD)host); 463 ASSERT(m_HostList.GetItemData(i)==(DWORD)host);
461POSITION p = m_Hosts.Find(host,NULL); 464POSITION p = m_Hosts.Find(host,NULL);
462 if(!p) 465 if(!p)
463 return FALSE; 466 return FALSE;
464 m_HostList.DeleteItem(i); 467 m_HostList.DeleteItem(i);
465 m_Hosts.RemoveAt(p); 468 m_Hosts.RemoveAt(p);
466 host->Suicide(); 469 host->Suicide();
467 UpdateControlButtons(); 470 UpdateControlButtons();
468 UpdateDragpadTitle(); 471 UpdateDragpadTitle();
469 return TRUE; 472 return TRUE;
470} 473}
471 474
472LRESULT CDipstickDlg::OnUrlPing(WPARAM wP, LPARAM lP) 475LRESULT CDipstickDlg::OnUrlPing(WPARAM wP, LPARAM lP)
473{ 476{
474 ASSERT(lP); 477 ASSERT(lP);
475CString *u = (CString*)lP; 478CString *u = (CString*)lP;
476CString hn; 479CString hn;
477CPingyHost *host; 480CPingyHost *host;
478 if(m_bMSWorkAround) 481 if(m_bMSWorkAround)
479 hn = CCrackURL::InnermostURL(*u); 482 hn = CCrackURL::InnermostURL(*u);
480 else 483 else
481 hn = *u; 484 hn = *u;
482 hn = CCrackURL::GetHostName(hn); 485 hn = CCrackURL::GetHostName(hn);
483DWORD ip = inet_addr(hn); 486DWORD ip = inet_addr(hn);
484 if(ip==INADDR_NONE) 487 if(ip==INADDR_NONE)
485 host = new CPingyHost(this,(char*)(LPCTSTR)hn); 488 host = new CPingyHost(this,(char*)(LPCTSTR)hn);
486 else 489 else
487 host = new CPingyHost(this,ip); 490 host = new CPingyHost(this,ip);
488 host->m_URL=*u; 491 host->m_URL=*u;
489 delete u; 492 delete u;
490 AddPingyHost(host); 493 AddPingyHost(host);
491 CheckForPendingRequests(); 494 CheckForPendingRequests();
492 return 0; 495 return 0;
493} 496}
494 497
495LRESULT CDipstickDlg::OnActivityCount(WPARAM wP,LPARAM) 498LRESULT CDipstickDlg::OnActivityCount(WPARAM wP,LPARAM)
496{ 499{
497 if(!wP) 500 if(!wP)
498 return 0; 501 return 0;
499 intcrement = (int)wP; 502 intcrement = (int)wP;
500 m_ActiveThreads+=crement; 503 m_ActiveThreads+=crement;
501 if(m_ActiveThreads<0){ 504 if(m_ActiveThreads<0){
502 TRACE0("C'est n'est pas possible!\n"); 505 TRACE0("C'est n'est pas possible!\n");
503 m_ActiveThreads=0; 506 m_ActiveThreads=0;
504 } 507 }
505 TRACE1("AC: %d\n",m_ActiveThreads); 508 TRACE1("AC: %d\n",m_ActiveThreads);
506 if(m_ActiveThreads){ 509 if(m_ActiveThreads){
507 m_DragPad->m_DragNDropTarget.Play(0,(UINT)-1,(UINT)-1); 510 m_DragPad->m_DragNDropTarget.Play(0,(UINT)-1,(UINT)-1);
508 m_ClearListCtl.EnableWindow(FALSE); 511 m_ClearListCtl.EnableWindow(FALSE);
509 }else{ 512 }else{
510 m_DragPad->m_DragNDropTarget.Stop(); 513 m_DragPad->m_DragNDropTarget.Stop();
511 m_DragPad->m_DragNDropTarget.Seek(0); 514 m_DragPad->m_DragNDropTarget.Seek(0);
512 if(m_HostList.GetItemCount()) 515 if(m_HostList.GetItemCount())
513 m_ClearListCtl.EnableWindow(TRUE); 516 m_ClearListCtl.EnableWindow(TRUE);
514 } 517 }
515 if(crement>0) 518 if(crement>0)
516 return 0; 519 return 0;
517 UpdateDragpadTitle(); 520 UpdateDragpadTitle();
518int items = m_HostList.GetItemCount(); 521int items = m_HostList.GetItemCount();
519 if((!CheckForPendingRequests()) && m_bAutoBest && items && !m_ActiveThreads){ 522 if((!CheckForPendingRequests()) && m_bAutoBest && items && !m_ActiveThreads){
520 // Come up with the best URL.. 523 // Come up with the best URL..
521 m_SortCriteria=sortAvg; 524 m_SortCriteria=sortAvg;
522 m_HostList.SortItems(CompareItems,(DWORD)this); 525 m_HostList.SortItems(CompareItems,(DWORD)this);
523 CPtrArray hs; 526 CPtrArray hs;
524 for(int tmp=0;tmp<items;tmp++){ 527 for(int tmp=0;tmp<items;tmp++){
525 CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp); 528 CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp);
526 ASSERT(!host->m_Pinging); 529 ASSERT(!host->m_Pinging);
527 ASSERT(host->m_Pinged); 530 ASSERT(host->m_Pinged);
528 if(host->m_Packetloss==100 || host->m_URL.IsEmpty()) 531 if(host->m_Packetloss==100 || host->m_URL.IsEmpty())
529 continue; 532 continue;
530 hs.Add(host); 533 hs.Add(host);
531 } 534 }
532 if(hs.GetSize()){ 535 if(hs.GetSize()){
533 int item = 0; 536 int item = 0;
534 if(!::PlaySound((LPCTSTR)IDW_BESTURL,AfxGetApp()->m_hInstance,SND_ASYNC|SND_NODEFAULT|SND_NOSTOP|SND_NOWAIT|SND_RESOURCE)) 537 if(!::PlaySound((LPCTSTR)IDW_BESTURL,AfxGetApp()->m_hInstance,SND_ASYNC|SND_NODEFAULT|SND_NOSTOP|SND_NOWAIT|SND_RESOURCE))
535 MessageBeep(0xFFFFFFFF); 538 MessageBeep(0xFFFFFFFF);
536 for(;;){ 539 for(;;){
537 CPingyHost *host = (CPingyHost*)hs[item]; 540 CPingyHost *host = (CPingyHost*)hs[item];
538 CAutoBestDlg abd; 541 CAutoBestDlg abd;
539 abd.m_bPrev = (item>0); 542 abd.m_bPrev = (item>0);
540 abd.m_bNext = (item<hs.GetUpperBound()); 543 abd.m_bNext = (item<hs.GetUpperBound());
541 abd.m_PktLoss.Format("%d%%",host->m_Packetloss); 544 abd.m_PktLoss.Format("%d%%",host->m_Packetloss);
542 abd.m_RTT.Format("%lu",host->m_AvgRTT); 545 abd.m_RTT.Format("%lu",host->m_AvgRTT);
543 abd.m_URL=host->m_URL; 546 abd.m_URL=host->m_URL;
544 int rv = abd.DoModal(); 547 int rv = abd.DoModal();
545 if(rv==IDOK){ 548 if(rv==IDOK){
546 ShellExecute(::GetDesktopWindow(),"open",host->m_URL,NULL,NULL,SW_SHOWMAXIMIZED); 549 ShellExecute(::GetDesktopWindow(),"open",host->m_URL,NULL,NULL,SW_SHOWMAXIMIZED);
547 CString title, text; 550 CString title, text;
548 VERIFY(title.LoadString(IDS_ABEST_TITLE)); 551 VERIFY(title.LoadString(IDS_ABEST_TITLE));
549 VERIFY(text.LoadString(IDS_ABEST_CLEANUP)); 552 VERIFY(text.LoadString(IDS_ABEST_CLEANUP));
550 if(MessageBox(text,title,MB_YESNO|MB_ICONQUESTION|MB_APPLMODAL)==IDYES) 553 if(MessageBox(text,title,MB_YESNO|MB_ICONQUESTION|MB_APPLMODAL)==IDYES)
551 OnClear(); 554 OnClear();
552 break; 555 break;
553 }else if(rv==IDCANCEL){ 556 }else if(rv==IDCANCEL){
554 break; 557 break;
555 }else if(rv==IDC_PREV){ 558 }else if(rv==IDC_PREV){
556 item--; 559 item--;
557 ASSERT(item>=0); 560 ASSERT(item>=0);
558 }else if(rv==IDC_NEXT){ 561 }else if(rv==IDC_NEXT){
559 item++; 562 item++;
560 ASSERT(item<hs.GetSize()); 563 ASSERT(item<hs.GetSize());
561 }else 564 }else
562 break; 565 break;
563 } 566 }
564 }else{ 567 }else{
565 CString title, text; 568 CString title, text;
566 VERIFY(title.LoadString(IDS_ABEST_TITLE)); 569 VERIFY(title.LoadString(IDS_ABEST_TITLE));
567 VERIFY(text.LoadString(IDS_ABEST_NONEFOUND)); 570 VERIFY(text.LoadString(IDS_ABEST_NONEFOUND));
568 MessageBox(text,title,MB_OK|MB_ICONEXCLAMATION|MB_APPLMODAL); 571 MessageBox(text,title,MB_OK|MB_ICONEXCLAMATION|MB_APPLMODAL);
569 } 572 }
570 } 573 }
571 return 0; 574 return 0;
572} 575}
573 576
574LRESULT CDipstickDlg::OnUpdateHostData(WPARAM,LPARAM lP) 577LRESULT CDipstickDlg::OnUpdateHostData(WPARAM,LPARAM lP)
575{ 578{
576 TRACE0("UpdateHostData\n"); 579 TRACE0("UpdateHostData\n");
577CPingyHost *host = (CPingyHost*)lP; 580CPingyHost *host = (CPingyHost*)lP;
578 ASSERT(host); 581 ASSERT(host);
579 UpdatePingyHost(host); 582 UpdatePingyHost(host);
580 UpdateDragpadTitle(); 583 UpdateDragpadTitle();
581 return 0; 584 return 0;
582} 585}
583 586
584int CALLBACK CDipstickDlg::CompareItems(LPARAM lp1, LPARAM lp2, LPARAM lp) 587int CALLBACK CDipstickDlg::CompareItems(LPARAM lp1, LPARAM lp2, LPARAM lp)
585{ 588{
586CDipstickDlg *dlg = (CDipstickDlg*)lp; 589CDipstickDlg *dlg = (CDipstickDlg*)lp;
587CPingyHost *h1 = (CPingyHost*)lp1; 590CPingyHost *h1 = (CPingyHost*)lp1;
588CPingyHost *h2 = (CPingyHost*)lp2; 591CPingyHost *h2 = (CPingyHost*)lp2;
589 ASSERT(dlg); 592 ASSERT(dlg);
590 ASSERT(h1); 593 ASSERT(h1);
591 ASSERT(h2); 594 ASSERT(h2);
592int criteria = dlg->m_SortCriteria; 595int criteria = dlg->m_SortCriteria;
593 switch(criteria){ 596 switch(criteria){
594 case sortHost: 597 case sortHost:
595 return h1->m_HostName.CompareNoCase(h2->m_HostName); 598 return h1->m_HostName.CompareNoCase(h2->m_HostName);
596 case sortIP: 599 case sortIP:
597 return htonl(h1->m_IP)-htonl(h2->m_IP); 600 return htonl(h1->m_IP)-htonl(h2->m_IP);
598 default: 601 default:
599 if(h1->m_Pinged){ 602 if(h1->m_Pinged){
600 if(!h2->m_Pinged) 603 if(!h2->m_Pinged)
601 return -1; 604 return -1;
602 if(h1->m_Packetloss==100){ 605 if(h1->m_Packetloss==100){
603 if(h2->m_Packetloss!=100) 606 if(h2->m_Packetloss!=100)
604 return 1; 607 return 1;
605 return 0; 608 return 0;
606 }else{ 609 }else{
607 if(h2->m_Packetloss==100) 610 if(h2->m_Packetloss==100)
608 return -1; 611 return -1;
609 } 612 }
610 }else{ 613 }else{
611 if(h2->m_Pinged) 614 if(h2->m_Pinged)
612 return 1; 615 return 1;
613 break; 616 break;
614 } 617 }
615 switch(criteria){ 618 switch(criteria){
616 case sortMin: 619 case sortMin:
617 return h1->m_MinRTT-h2->m_MinRTT; 620 return h1->m_MinRTT-h2->m_MinRTT;
618 case sortAvg: 621 case sortAvg:
619 return h1->m_AvgRTT-h2->m_AvgRTT; 622 return h1->m_AvgRTT-h2->m_AvgRTT;
620 case sortMax: 623 case sortMax:
621 return h1->m_MaxRTT-h2->m_MaxRTT; 624 return h1->m_MaxRTT-h2->m_MaxRTT;
622 case sortLoss: 625 case sortLoss:
623 return h1->m_Packetloss-h2->m_Packetloss; 626 return h1->m_Packetloss-h2->m_Packetloss;
624 } 627 }
625 } 628 }
626 return 0; 629 return 0;
627} 630}
628 631
629void CDipstickDlg::OnColumnclickHostlist(NMHDR* pNMHDR, LRESULT* pResult) 632void CDipstickDlg::OnColumnclickHostlist(NMHDR* pNMHDR, LRESULT* pResult)
630{ 633{
631 NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; 634 NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
632 switch(pNMListView->iSubItem){ 635 switch(pNMListView->iSubItem){
633 case subitemHost: m_SortCriteria=sortHost; break; 636 case subitemHost: m_SortCriteria=sortHost; break;
634 case subitemIP: m_SortCriteria=sortIP; break; 637 case subitemIP: m_SortCriteria=sortIP; break;
635 case subitemMin: m_SortCriteria=sortMin; break; 638 case subitemMin: m_SortCriteria=sortMin; break;
636 case subitemAvg: m_SortCriteria=sortAvg; break; 639 case subitemAvg: m_SortCriteria=sortAvg; break;
637 case subitemMax: m_SortCriteria=sortMax; break; 640 case subitemMax: m_SortCriteria=sortMax; break;
638 case subitemPacketloss: m_SortCriteria=sortLoss; break; 641 case subitemPacketloss: m_SortCriteria=sortLoss; break;
639 } 642 }
640 m_HostList.SortItems(CompareItems,(DWORD)this); 643 m_HostList.SortItems(CompareItems,(DWORD)this);
641 *pResult = 0; 644 *pResult = 0;
642} 645}
643 646
644BOOL CDipstickDlg::PreCreateWindow(CREATESTRUCT& cs) 647BOOL CDipstickDlg::PreCreateWindow(CREATESTRUCT& cs)
645{ 648{
646 cs.style&=~WS_VISIBLE; 649 cs.style&=~WS_VISIBLE;
647 return CDialog::PreCreateWindow(cs); 650 return CDialog::PreCreateWindow(cs);
648} 651}
649 652
650void CDipstickDlg::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos) 653void CDipstickDlg::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
651{ 654{
652 CDialog::OnWindowPosChanging(lpwndpos); 655 CDialog::OnWindowPosChanging(lpwndpos);
653 if(!m_bExiting){ 656 if(!m_bExiting){
654 if(m_bShown){ 657 if(m_bShown){
655 lpwndpos->flags&=~SWP_HIDEWINDOW; 658 lpwndpos->flags&=~SWP_HIDEWINDOW;
656 lpwndpos->flags|=SWP_SHOWWINDOW; 659 lpwndpos->flags|=SWP_SHOWWINDOW;
657 }else{ 660 }else{
658 lpwndpos->flags&=~SWP_SHOWWINDOW; 661 lpwndpos->flags&=~SWP_SHOWWINDOW;
659 lpwndpos->flags|=SWP_HIDEWINDOW; 662 lpwndpos->flags|=SWP_HIDEWINDOW;
660 } 663 }
661 } 664 }
662} 665}
663 666
664void CDipstickDlg::OnDragpadOptions() 667void CDipstickDlg::OnDragpadOptions()
665{ 668{
666 OnOptions(); 669 OnOptions();
667} 670}
668void CDipstickDlg::OnDragpadShowmainwindow() 671void CDipstickDlg::OnDragpadShowmainwindow()
669{ 672{
670 m_DragPad->ToggleMainWindowDisplay(); 673 m_DragPad->ToggleMainWindowDisplay();
671} 674}
672void CDipstickDlg::OnDragpadHelp() 675void CDipstickDlg::OnDragpadHelp()
673{ 676{
674 OnHelp(); 677 OnHelp();
675} 678}
676void CDipstickDlg::OnDragpadAbout() 679void CDipstickDlg::OnDragpadAbout()
677{ 680{
678CAboutDlg dlgAbout; 681CAboutDlg dlgAbout;
679 dlgAbout.DoModal(); 682 dlgAbout.DoModal();
680} 683}
681void CDipstickDlg::OnDragpadExit() 684void CDipstickDlg::OnDragpadExit()
682{ 685{
683 // *** More threading-aware 686 // *** More threading-aware
684 OnOK(); 687 OnOK();
685} 688}
686 689
687int CDipstickDlg::CheckForPendingRequests() 690int CDipstickDlg::CheckForPendingRequests()
688{ 691{
689static BOOL bChecking = FALSE; 692static BOOL bChecking = FALSE;
690 if(bChecking) 693 if(bChecking)
691 return -1; 694 return -1;
692 bChecking = TRUE; 695 bChecking = TRUE;
693 TRACE1("CFPR: AC: %d\n",m_ActiveThreads); 696 TRACE1("CFPR: AC: %d\n",m_ActiveThreads);
694int newRequests = m_MaxThreads-m_ActiveThreads; 697int newRequests = m_MaxThreads-m_ActiveThreads;
695POSITION p = m_Hosts.GetHeadPosition(); 698POSITION p = m_Hosts.GetHeadPosition();
696int rv = 0; 699int rv = 0;
697 while(newRequests>0 && p){ 700 while(newRequests>0 && p){
698 CPingyHost *host = m_Hosts.GetNext(p); 701 CPingyHost *host = m_Hosts.GetNext(p);
699 ASSERT(host); 702 ASSERT(host);
700 if(host->m_Pinging) 703 if(host->m_Pinging)
701 continue; 704 continue;
702 if(!host->m_bToPing) 705 if(!host->m_bToPing)
703 continue; 706 continue;
704 TRACE0("!"); 707 TRACE0("!");
705 host->Ping(); 708 host->Ping();
706 newRequests--; 709 newRequests--;
707 rv++; 710 rv++;
708 } 711 }
709 TRACE0("/CFPR\n"); 712 TRACE0("/CFPR\n");
710 bChecking = FALSE; 713 bChecking = FALSE;
711 return rv; 714 return rv;
712} 715}
713 716
714void CAboutDlg::OnKlevernet() 717void CAboutDlg::OnKlevernet()
715{ 718{
716CString url; 719CString url;
717 url.LoadString(IDS_KLEVERNET_URL); 720 url.LoadString(IDS_KLEVERNET_URL);
718 ShellExecute(::GetDesktopWindow(),"open",url,NULL,NULL,SW_SHOWMAXIMIZED); 721 ShellExecute(::GetDesktopWindow(),"open",url,NULL,NULL,SW_SHOWMAXIMIZED);
719} 722}
720 723
721void CDipstickDlg::OnOK() 724void CDipstickDlg::OnOK()
722{ 725{
723CWinApp *app = AfxGetApp(); 726CWinApp *app = AfxGetApp();
724 ASSERT(app); 727 ASSERT(app);
725 app->WriteProfileInt("Options","IntervalHi",HIWORD(m_Interval)); 728 app->WriteProfileInt("Options","IntervalHi",HIWORD(m_Interval));
726 app->WriteProfileInt("Options","IntervalLo",LOWORD(m_Interval)); 729 app->WriteProfileInt("Options","IntervalLo",LOWORD(m_Interval));
727 app->WriteProfileInt("Options","MaxThreads",m_MaxThreads); 730 app->WriteProfileInt("Options","MaxThreads",m_MaxThreads);
728 app->WriteProfileInt("Options","PingSize",m_PingSize); 731 app->WriteProfileInt("Options","PingSize",m_PingSize);
729 app->WriteProfileInt("Options","PingsPerHost",m_PingsPerHost); 732 app->WriteProfileInt("Options","PingsPerHost",m_PingsPerHost);
730 app->WriteProfileInt("Options","SortBy",m_SortCriteria); 733 app->WriteProfileInt("Options","SortBy",m_SortCriteria);
731 app->WriteProfileInt("Options","TimeOutHi",HIWORD(m_TimeOut)); 734 app->WriteProfileInt("Options","TimeOutHi",HIWORD(m_TimeOut));
732 app->WriteProfileInt("Options","TimeOutLo",LOWORD(m_TimeOut)); 735 app->WriteProfileInt("Options","TimeOutLo",LOWORD(m_TimeOut));
733 app->WriteProfileInt("Options","InnermostURL",m_bMSWorkAround); 736 app->WriteProfileInt("Options","InnermostURL",m_bMSWorkAround);
734 app->WriteProfileInt("Options","AutoBest",m_bAutoBest); 737 app->WriteProfileInt("Options","AutoBest",m_bAutoBest);
735 app->WriteProfileInt("Options","SmartAdjust",m_bSmartAdjust); 738 app->WriteProfileInt("Options","SmartAdjust",m_bSmartAdjust);
736 app->WriteProfileInt("Options","AdjustInnermost",m_bAdjustInnermost); 739 app->WriteProfileInt("Options","AdjustInnermost",m_bAdjustInnermost);
737 app->WriteProfileInt("Options","IgnoreRelative",m_bIgnorelative); 740 app->WriteProfileInt("Options","IgnoreRelative",m_bIgnorelative);
738 app->WriteProfileString("Options","ImportExportPath",m_impexPath); 741 app->WriteProfileString("Options","ImportExportPath",m_impexPath);
739CRect rc; 742CRect rc;
740 GetWindowRect(&rc); 743 GetWindowRect(&rc);
741 app->WriteProfileInt("Windows","DlgTop",rc.top); 744 app->WriteProfileInt("Windows","DlgTop",rc.top);
742 app->WriteProfileInt("Windows","DlgBottom",rc.bottom); 745 app->WriteProfileInt("Windows","DlgBottom",rc.bottom);
743 app->WriteProfileInt("Windows","DlgLeft",rc.left); 746 app->WriteProfileInt("Windows","DlgLeft",rc.left);
744 app->WriteProfileInt("Windows","DlgRight",rc.right); 747 app->WriteProfileInt("Windows","DlgRight",rc.right);
745 m_DragPad->GetWindowRect(&rc); 748 m_DragPad->GetWindowRect(&rc);
746 app->WriteProfileInt("Windows","DragPadTop",rc.top); 749 app->WriteProfileInt("Windows","DragPadTop",rc.top);
747 app->WriteProfileInt("Windows","DragPadLeft",rc.left); 750 app->WriteProfileInt("Windows","DragPadLeft",rc.left);
748 // Columns 751 // Columns
749 app->WriteProfileInt("Columns","HostName",m_HostList.GetColumnWidth(0)); 752 app->WriteProfileInt("Columns","HostName",m_HostList.GetColumnWidth(0));
750 app->WriteProfileInt("Columns","HostIP",m_HostList.GetColumnWidth(1)); 753 app->WriteProfileInt("Columns","HostIP",m_HostList.GetColumnWidth(1));
751 app->WriteProfileInt("Columns","MinRTT",m_HostList.GetColumnWidth(2)); 754 app->WriteProfileInt("Columns","MinRTT",m_HostList.GetColumnWidth(2));
752 app->WriteProfileInt("Columns","AvgRTT",m_HostList.GetColumnWidth(3)); 755 app->WriteProfileInt("Columns","AvgRTT",m_HostList.GetColumnWidth(3));
753 app->WriteProfileInt("Columns","MaxRTT",m_HostList.GetColumnWidth(4)); 756 app->WriteProfileInt("Columns","MaxRTT",m_HostList.GetColumnWidth(4));
754 app->WriteProfileInt("Columns","PktLoss",m_HostList.GetColumnWidth(5)); 757 app->WriteProfileInt("Columns","PktLoss",m_HostList.GetColumnWidth(5));
755 m_bExiting=TRUE; 758 m_bExiting=TRUE;
756 CDialog::OnOK(); 759 CDialog::OnOK();
757} 760}
758 761
759void CDipstickDlg::OnCancel() 762void CDipstickDlg::OnCancel()
760{ 763{
761} 764}
762 765
763void CDipstickDlg::OnManualping() 766void CDipstickDlg::OnManualping()
764{ 767{
765CHostNameDlg hnd(this); 768CHostNameDlg hnd(this);
766 if(hnd.DoModal()==IDOK && !hnd.m_Host.IsEmpty()){ 769 if(hnd.DoModal()==IDOK && !hnd.m_Host.IsEmpty()){
767 CString *host = new CString(hnd.m_Host); 770 CString *host = new CString(hnd.m_Host);
768 ASSERT(host); 771 ASSERT(host);
769 PostMessage(WM_DNP_URLPING,0,(LPARAM)host); 772 PostMessage(WM_DNP_URLPING,0,(LPARAM)host);
770 } 773 }
771} 774}
772 775
773void CDipstickDlg::OnDragpadManualping() 776void CDipstickDlg::OnDragpadManualping()
774{ 777{
775 OnManualping(); 778 OnManualping();
776} 779}
777 780
778void CDipstickDlg::OnDragpadRepingAll() 781void CDipstickDlg::OnDragpadRepingAll()
779{ 782{
780 OnRepingall(); 783 OnRepingall();
781} 784}
782void CDipstickDlg::OnDragpadRemoveAll() 785void CDipstickDlg::OnDragpadRemoveAll()
783{ 786{
784 OnClear(); 787 OnClear();
785} 788}
786 789
787void CDipstickDlg::OnReping() 790void CDipstickDlg::OnReping()
788{ 791{
789 if(!m_HostList.GetSelectedCount()) 792 if(!m_HostList.GetSelectedCount())
790 return; 793 return;
791 intitems = m_HostList.GetItemCount(); 794 intitems = m_HostList.GetItemCount();
792 for(int tmp=0;tmp<items;tmp++){ 795 for(int tmp=0;tmp<items;tmp++){
793 if(!(m_HostList.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED)) 796 if(!(m_HostList.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED))
794 continue; 797 continue;
795 CPingyHost *host = (CPingyHost*) m_HostList.GetItemData(tmp); 798 CPingyHost *host = (CPingyHost*) m_HostList.GetItemData(tmp);
796 ASSERT(host); 799 ASSERT(host);
797 if(host->m_Pinged && !host->m_Pinging) 800 if(host->m_Pinged && !host->m_Pinging)
798 host->m_bToPing=TRUE; 801 host->m_bToPing=TRUE;
799 } 802 }
800 UpdateDragpadTitle(); 803 UpdateDragpadTitle();
801 CheckForPendingRequests(); 804 CheckForPendingRequests();
802} 805}
803 806
804void CDipstickDlg::OnRepingall() 807void CDipstickDlg::OnRepingall()
805{ 808{
806POSITION p = m_Hosts.GetHeadPosition(); 809POSITION p = m_Hosts.GetHeadPosition();
807 while(p){ 810 while(p){
808 CPingyHost *host = m_Hosts.GetNext(p); 811 CPingyHost *host = m_Hosts.GetNext(p);
809 ASSERT(host); 812 ASSERT(host);
810 if(host->m_Pinged && !host->m_Pinging) 813 if(host->m_Pinged && !host->m_Pinging)
811 host->m_bToPing=TRUE; 814 host->m_bToPing=TRUE;
812 } 815 }
813 UpdateDragpadTitle(); 816 UpdateDragpadTitle();
814 CheckForPendingRequests(); 817 CheckForPendingRequests();
815} 818}
816 819
817void CDipstickDlg::OnClear() 820void CDipstickDlg::OnClear()
818{ 821{
819 if(m_ActiveThreads) 822 if(m_ActiveThreads)
820 return; 823 return;
821 m_HostList.DeleteAllItems(); 824 m_HostList.DeleteAllItems();
822 // *** Eventually move the following code to separate function 825 // *** Eventually move the following code to separate function
823POSITION p = m_Hosts.GetHeadPosition(); 826POSITION p = m_Hosts.GetHeadPosition();
824 while(p){ 827 while(p){
825 POSITION pp = p; 828 POSITION pp = p;
826 CPingyHost *host = (CPingyHost*)m_Hosts.GetNext(p); 829 CPingyHost *host = (CPingyHost*)m_Hosts.GetNext(p);
827 ASSERT(host); 830 ASSERT(host);
828 m_Hosts.RemoveAt(pp); 831 m_Hosts.RemoveAt(pp);
829 host->Suicide(); 832 host->Suicide();
830 } 833 }
831 ASSERT(m_Hosts.IsEmpty()); 834 ASSERT(m_Hosts.IsEmpty());
832 UpdateDragpadTitle(); 835 UpdateDragpadTitle();
833} 836}
834 837
835void CDipstickDlg::OnInsertitemHostlist(NMHDR* pNMHDR, LRESULT* pResult) 838void CDipstickDlg::OnInsertitemHostlist(NMHDR* pNMHDR, LRESULT* pResult)
836{ 839{
837NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; 840NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
838 m_RepingCtl.EnableWindow(TRUE); 841 m_RepingCtl.EnableWindow(TRUE);
839 m_RepingAllCtl.EnableWindow(TRUE); 842 m_RepingAllCtl.EnableWindow(TRUE);
840 UpdateDragpadTitle(); 843 UpdateDragpadTitle();
841 *pResult = 0; 844 *pResult = 0;
842} 845}
843 846
844void CDipstickDlg::OnDeleteitemHostlist(NMHDR* pNMHDR, LRESULT* pResult) 847void CDipstickDlg::OnDeleteitemHostlist(NMHDR* pNMHDR, LRESULT* pResult)
845{ 848{
846NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; 849NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
847 if(!m_HostList.GetItemCount()){ 850 if(!m_HostList.GetItemCount()){
848 m_RepingCtl.EnableWindow(FALSE); 851 m_RepingCtl.EnableWindow(FALSE);
849 m_RepingAllCtl.EnableWindow(FALSE); 852 m_RepingAllCtl.EnableWindow(FALSE);
850 m_ClearListCtl.EnableWindow(FALSE); 853 m_ClearListCtl.EnableWindow(FALSE);
851 } 854 }
852 UpdateDragpadTitle(); 855 UpdateDragpadTitle();
853 *pResult = 0; 856 *pResult = 0;
854} 857}
855 858
856void CDipstickDlg::OnDeleteallitemsHostlist(NMHDR* pNMHDR, LRESULT* pResult) 859void CDipstickDlg::OnDeleteallitemsHostlist(NMHDR* pNMHDR, LRESULT* pResult)
857{ 860{
858NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; 861NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
859 m_RepingCtl.EnableWindow(FALSE); 862 m_RepingCtl.EnableWindow(FALSE);
860 m_RepingAllCtl.EnableWindow(FALSE); 863 m_RepingAllCtl.EnableWindow(FALSE);
861 m_ClearListCtl.EnableWindow(FALSE); 864 m_ClearListCtl.EnableWindow(FALSE);
862 UpdateDragpadTitle(); 865 UpdateDragpadTitle();
863 *pResult = 0; 866 *pResult = 0;
864} 867}
865 868
866void CDipstickDlg::OnExit() 869void CDipstickDlg::OnExit()
867{ 870{
868 OnOK(); 871 OnOK();
869} 872}
870 873
871void CDipstickDlg::OnItemchangedHostlist(NMHDR* pNMHDR, LRESULT* pResult) 874void CDipstickDlg::OnItemchangedHostlist(NMHDR* pNMHDR, LRESULT* pResult)
872{ 875{
873NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; 876NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
874 if(pNMListView->uChanged&LVIF_STATE && (pNMListView->uOldState&LVIS_SELECTED)!=(pNMListView->uNewState&LVIS_SELECTED)) 877 if(pNMListView->uChanged&LVIF_STATE && (pNMListView->uOldState&LVIS_SELECTED)!=(pNMListView->uNewState&LVIS_SELECTED))
875 UpdateControlButtons(); 878 UpdateControlButtons();
876 UpdateDragpadTitle(); 879 UpdateDragpadTitle();
877 *pResult = 0; 880 *pResult = 0;
878} 881}
879 882
880void CDipstickDlg::UpdateControlButtons() 883void CDipstickDlg::UpdateControlButtons()
881{ 884{
882int items = m_HostList.GetItemCount(); 885int items = m_HostList.GetItemCount();
883 if(!items){ 886 if(!items){
884 m_ClearListCtl.EnableWindow(FALSE); 887 m_ClearListCtl.EnableWindow(FALSE);
885 m_RemoveCtl.EnableWindow(FALSE); 888 m_RemoveCtl.EnableWindow(FALSE);
886 m_RepingAllCtl.EnableWindow(FALSE); 889 m_RepingAllCtl.EnableWindow(FALSE);
887 m_RepingCtl.EnableWindow(FALSE); 890 m_RepingCtl.EnableWindow(FALSE);
888 return; 891 return;
889 } 892 }
890BOOL cl = m_ActiveThreads?FALSE:TRUE, rm = FALSE, ra = FALSE, rp = FALSE; 893BOOL cl = m_ActiveThreads?FALSE:TRUE, rm = FALSE, ra = FALSE, rp = FALSE;
891 for(int tmp=0;tmp<items;tmp++){ 894 for(int tmp=0;tmp<items;tmp++){
892 CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp); 895 CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp);
893 if(!host->m_Pinging){ 896 if(!host->m_Pinging){
894 ra=TRUE; 897 ra=TRUE;
895 if(m_HostList.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED){ 898 if(m_HostList.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED){
896 rp = TRUE; 899 rp = TRUE;
897 rm = TRUE; 900 rm = TRUE;
898 break; 901 break;
899 } 902 }
900 } 903 }
901 } 904 }
902 m_ClearListCtl.EnableWindow(cl); 905 m_ClearListCtl.EnableWindow(cl);
903 m_RemoveCtl.EnableWindow(rm); 906 m_RemoveCtl.EnableWindow(rm);
904 m_RepingAllCtl.EnableWindow(ra); 907 m_RepingAllCtl.EnableWindow(ra);
905 m_RepingCtl.EnableWindow(rp); 908 m_RepingCtl.EnableWindow(rp);
906} 909}
907 910
908void CDipstickDlg::OnRemove() 911void CDipstickDlg::OnRemove()
909{ 912{
910 if(!m_HostList.GetSelectedCount()) 913 if(!m_HostList.GetSelectedCount())
911 return; 914 return;
912 intitems = m_HostList.GetItemCount(); 915 intitems = m_HostList.GetItemCount();
913 for(int tmp=0;tmp<items;tmp++){ 916 for(int tmp=0;tmp<items;tmp++){
914 if(!(m_HostList.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED)) 917 if(!(m_HostList.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED))
915 continue; 918 continue;
916 CPingyHost *host = (CPingyHost*) m_HostList.GetItemData(tmp); 919 CPingyHost *host = (CPingyHost*) m_HostList.GetItemData(tmp);
917 ASSERT(host); 920 ASSERT(host);
918 if(!host->m_Pinging) 921 if(!host->m_Pinging)
919 RemovePingyHost(host,tmp); 922 RemovePingyHost(host,tmp);
920 } 923 }
921} 924}
922 925
923void CDipstickDlg::OnRclickHostlist(NMHDR* pNMHDR, LRESULT* pResult) 926void CDipstickDlg::OnRclickHostlist(NMHDR* pNMHDR, LRESULT* pResult)
924{ 927{
925 if(!m_HostList.GetSelectedCount()) 928 if(!m_HostList.GetSelectedCount())
926 return; 929 return;
927int items = m_HostList.GetItemCount(); 930int items = m_HostList.GetItemCount();
928int item = -1; 931int item = -1;
929 for(int tmp=0;tmp<items;tmp++){ 932 for(int tmp=0;tmp<items;tmp++){
930 ints = m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED); 933 ints = m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED);
931 if(s&LVIS_FOCUSED){ 934 if(s&LVIS_FOCUSED){
932 item = tmp; 935 item = tmp;
933 break; 936 break;
934 } 937 }
935 if(s&LVIS_SELECTED) 938 if(s&LVIS_SELECTED)
936 item=tmp; 939 item=tmp;
937 } 940 }
938 ASSERT(item>=0); 941 ASSERT(item>=0);
939CPoint p; 942CPoint p;
940 VERIFY(m_HostList.GetItemPosition(item,&p)); 943 VERIFY(m_HostList.GetItemPosition(item,&p));
941CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(item); 944CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(item);
942 ASSERT(host); 945 ASSERT(host);
943 m_HostList.ClientToScreen(&p); 946 m_HostList.ClientToScreen(&p);
944CMenu menus; 947CMenu menus;
945 VERIFY(menus.LoadMenu(IDR_MENU)); 948 VERIFY(menus.LoadMenu(IDR_MENU));
946CMenu *popUp = menus.GetSubMenu(1); 949CMenu *popUp = menus.GetSubMenu(1);
947 ASSERT(popUp); 950 ASSERT(popUp);
948 UpdateControlButtons(); 951 UpdateControlButtons();
949 popUp->EnableMenuItem(ID_HOSTLIST_REPING,MF_BYCOMMAND|(m_RepingCtl.IsWindowEnabled()?MF_ENABLED:MF_GRAYED)); 952 popUp->EnableMenuItem(ID_HOSTLIST_REPING,MF_BYCOMMAND|(m_RepingCtl.IsWindowEnabled()?MF_ENABLED:MF_GRAYED));
950 popUp->EnableMenuItem(ID_HOSTLIST_REMOVE,MF_BYCOMMAND|(m_RemoveCtl.IsWindowEnabled()?MF_ENABLED:MF_GRAYED)); 953 popUp->EnableMenuItem(ID_HOSTLIST_REMOVE,MF_BYCOMMAND|(m_RemoveCtl.IsWindowEnabled()?MF_ENABLED:MF_GRAYED));
951 popUp->EnableMenuItem(ID_HOSTLIST_REMOVEALL,MF_BYCOMMAND|(m_ClearListCtl.IsWindowEnabled()?MF_ENABLED:MF_GRAYED)); 954 popUp->EnableMenuItem(ID_HOSTLIST_REMOVEALL,MF_BYCOMMAND|(m_ClearListCtl.IsWindowEnabled()?MF_ENABLED:MF_GRAYED));
952 popUp->EnableMenuItem(ID_HOSTLIST_REPINGALL,MF_BYCOMMAND|(m_RepingAllCtl.IsWindowEnabled()?MF_ENABLED:MF_GRAYED)); 955 popUp->EnableMenuItem(ID_HOSTLIST_REPINGALL,MF_BYCOMMAND|(m_RepingAllCtl.IsWindowEnabled()?MF_ENABLED:MF_GRAYED));
953 popUp->EnableMenuItem(ID_HOSTLIST_OPENURL,MF_BYCOMMAND|((m_HostList.GetSelectedCount()==1 && !host->m_URL.IsEmpty())?MF_ENABLED:MF_GRAYED)); 956 popUp->EnableMenuItem(ID_HOSTLIST_OPENURL,MF_BYCOMMAND|((m_HostList.GetSelectedCount()==1 && !host->m_URL.IsEmpty())?MF_ENABLED:MF_GRAYED));
954 popUp->EnableMenuItem(ID_HOSTLIST_COPYURL,MF_BYCOMMAND|((m_HostList.GetSelectedCount()==1 && !host->m_URL.IsEmpty())?MF_ENABLED:MF_GRAYED)); 957 popUp->EnableMenuItem(ID_HOSTLIST_COPYURL,MF_BYCOMMAND|((m_HostList.GetSelectedCount()==1 && !host->m_URL.IsEmpty())?MF_ENABLED:MF_GRAYED));
955 popUp->EnableMenuItem(ID_HOSTLIST_PROPERTIES,MF_BYCOMMAND|((m_HostList.GetSelectedCount()==1)?MF_ENABLED:MF_GRAYED)); 958 popUp->EnableMenuItem(ID_HOSTLIST_PROPERTIES,MF_BYCOMMAND|((m_HostList.GetSelectedCount()==1)?MF_ENABLED:MF_GRAYED));
956 popUp->EnableMenuItem(ID_HOSTLIST_PASTEURL,MF_BYCOMMAND|(IsPasteableClipboard()?MF_ENABLED:MF_GRAYED)); 959 popUp->EnableMenuItem(ID_HOSTLIST_PASTEURL,MF_BYCOMMAND|(IsPasteableClipboard()?MF_ENABLED:MF_GRAYED));
957 popUp->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON|TPM_LEFTBUTTON,p.x,p.y,this); 960 popUp->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON|TPM_LEFTBUTTON,p.x,p.y,this);
958 *pResult = 0; 961 *pResult = 0;
959} 962}
960 963
961void CDipstickDlg::OnHostListReping() 964void CDipstickDlg::OnHostListReping()
962{ 965{
963 OnReping(); 966 OnReping();
964} 967}
965void CDipstickDlg::OnHostListRemove() 968void CDipstickDlg::OnHostListRemove()
966{ 969{
967 OnRemove(); 970 OnRemove();
968} 971}
969void CDipstickDlg::OnHostListRepingAll() 972void CDipstickDlg::OnHostListRepingAll()
970{ 973{
971 OnRepingall(); 974 OnRepingall();
972} 975}
973void CDipstickDlg::OnHostListRemoveAll() 976void CDipstickDlg::OnHostListRemoveAll()
974{ 977{
975 OnClear(); 978 OnClear();
976} 979}
977void CDipstickDlg::OnHostListOpenURL() 980void CDipstickDlg::OnHostListOpenURL()
978{ 981{
979 if(m_HostList.GetSelectedCount()!=1) 982 if(m_HostList.GetSelectedCount()!=1)
980 return; 983 return;
981int items = m_HostList.GetItemCount(); 984int items = m_HostList.GetItemCount();
982 for(int tmp=0;tmp<items;tmp++){ 985 for(int tmp=0;tmp<items;tmp++){
983 if((m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED))&LVIS_SELECTED) 986 if((m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED))&LVIS_SELECTED)
984 break; 987 break;
985 } 988 }
986 ASSERT(tmp<items); 989 ASSERT(tmp<items);
987CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp); 990CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp);
988 ASSERT(host); 991 ASSERT(host);
989 if(!host->m_URL.IsEmpty()) 992 if(!host->m_URL.IsEmpty())
990 ShellExecute(::GetDesktopWindow(),NULL,host->m_URL,NULL,NULL,SW_SHOWMAXIMIZED); 993 ShellExecute(::GetDesktopWindow(),NULL,host->m_URL,NULL,NULL,SW_SHOWMAXIMIZED);
991} 994}
992 995
993void CDipstickDlg::OnHostListProperties() 996void CDipstickDlg::OnHostListProperties()
994{ 997{
995 if(m_HostList.GetSelectedCount()!=1) 998 if(m_HostList.GetSelectedCount()!=1)
996 return; 999 return;
997int items = m_HostList.GetItemCount(); 1000int items = m_HostList.GetItemCount();
998 for(int tmp=0;tmp<items;tmp++){ 1001 for(int tmp=0;tmp<items;tmp++){
999 if((m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED))&LVIS_SELECTED) 1002 if((m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED))&LVIS_SELECTED)
1000 break; 1003 break;
1001 } 1004 }
1002 ASSERT(tmp<items); 1005 ASSERT(tmp<items);
1003CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp); 1006CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp);
1004 ASSERT(host); 1007 ASSERT(host);
1005CHostProperties hp(this); 1008CHostProperties hp(this);
1006 hp.SetHost(host); 1009 hp.SetHost(host);
1007 hp.DoModal(); 1010 hp.DoModal();
1008} 1011}
1009 1012
1010void CDipstickDlg::OnDblclkHostlist(NMHDR* pNMHDR, LRESULT* pResult) 1013void CDipstickDlg::OnDblclkHostlist(NMHDR* pNMHDR, LRESULT* pResult)
1011{ 1014{
1012 OnHostListOpenURL(); 1015 OnHostListOpenURL();
1013 *pResult = 0; 1016 *pResult = 0;
1014} 1017}
1015 1018
1016void CDipstickDlg::OnClose() 1019void CDipstickDlg::OnClose()
1017{ 1020{
1018 m_bShown=FALSE; 1021 m_bShown=FALSE;
1019 ShowWindow(SW_HIDE); 1022 ShowWindow(SW_HIDE);
1020} 1023}
1021 1024
1022BOOL CAboutDlg::OnInitDialog() 1025BOOL CAboutDlg::OnInitDialog()
1023{ 1026{
1024 CDialog::OnInitDialog(); 1027 CDialog::OnInitDialog();
1025 return TRUE; 1028 return TRUE;
1026} 1029}
1027 1030
1028void CDipstickDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) 1031void CDipstickDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
1029{ 1032{
1030 CDialog::OnGetMinMaxInfo(lpMMI); 1033 CDialog::OnGetMinMaxInfo(lpMMI);
1031 if(m_MinSize.cx>0 && m_MinSize.cy>0){ 1034 if(m_MinSize.cx>0 && m_MinSize.cy>0){
1032 lpMMI->ptMinTrackSize.x = m_MinSize.cx; 1035 lpMMI->ptMinTrackSize.x = m_MinSize.cx;
1033 lpMMI->ptMinTrackSize.y = m_MinSize.cy; 1036 lpMMI->ptMinTrackSize.y = m_MinSize.cy;
1034 } 1037 }
1035} 1038}
1036 1039
1037void CDipstickDlg::OnSize(UINT nType, int cx, int cy) 1040void CDipstickDlg::OnSize(UINT nType, int cx, int cy)
1038{ 1041{
1039 CDialog::OnSize(nType, cx, cy); 1042 CDialog::OnSize(nType, cx, cy);
1040 if(nType==SIZE_RESTORED) 1043 if(nType==SIZE_RESTORED)
1041 RecalcLayout(cx,cy); 1044 RecalcLayout(cx,cy);
1042} 1045}
1043 1046
1044void CDipstickDlg::RecalcLayout(int,int) 1047void CDipstickDlg::RecalcLayout(int,int)
1045{ 1048{
1046CRect wrc; 1049CRect wrc;
1047 GetClientRect(&wrc); 1050 GetClientRect(&wrc);
1048CRect brc; 1051CRect brc;
1049 m_ManualPingCtl.GetWindowRect(&brc); 1052 m_ManualPingCtl.GetWindowRect(&brc);
1050 m_HostList.SetWindowPos(NULL,m_OverX,m_OverY,wrc.Width()-m_OverX*3-brc.Width(),wrc.Height()-m_OverY*2,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER); 1053 m_HostList.SetWindowPos(NULL,m_OverX,m_OverY,wrc.Width()-m_OverX*3-brc.Width(),wrc.Height()-m_OverY*2,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER);
1051int xb = wrc.Width()-m_OverX-brc.Width(); 1054int xb = wrc.Width()-m_OverX-brc.Width();
1052int cyb = brc.Height()+m_GapY; 1055int cyb = brc.Height()+m_GapY;
1053 m_ManualPingCtl.SetWindowPos(NULL,xb,m_OverY,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS); 1056 m_ManualPingCtl.SetWindowPos(NULL,xb,m_OverY,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
1054 m_RepingCtl.SetWindowPos(NULL,xb,m_OverY+cyb,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS); 1057 m_RepingCtl.SetWindowPos(NULL,xb,m_OverY+cyb,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
1055 m_RepingAllCtl.SetWindowPos(NULL,xb,m_OverY+cyb*2,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS); 1058 m_RepingAllCtl.SetWindowPos(NULL,xb,m_OverY+cyb*2,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
1056 m_RemoveCtl.SetWindowPos(NULL,xb,m_OverY+cyb*3,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS); 1059 m_RemoveCtl.SetWindowPos(NULL,xb,m_OverY+cyb*3,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
1057 m_ClearListCtl.SetWindowPos(NULL,xb,m_OverY+cyb*4,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS); 1060 m_ClearListCtl.SetWindowPos(NULL,xb,m_OverY+cyb*4,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
1058 m_AdvancedCtl.SetWindowPos(NULL,xb,m_OverY+cyb*5,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS); 1061 m_AdvancedCtl.SetWindowPos(NULL,xb,m_OverY+cyb*5,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
1059 m_ExitCtl.SetWindowPos(NULL,xb,wrc.Height()-m_OverY-brc.Height(),0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS); 1062 m_ExitCtl.SetWindowPos(NULL,xb,wrc.Height()-m_OverY-brc.Height(),0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
1060 m_OptionsCtl.SetWindowPos(NULL,xb,wrc.Height()-m_OverY-cyb-brc.Height(),0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS); 1063 m_OptionsCtl.SetWindowPos(NULL,xb,wrc.Height()-m_OverY-cyb-brc.Height(),0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
1061 m_HelpCtl.SetWindowPos(NULL,xb,wrc.Height()-m_OverY-cyb*2-brc.Height(),0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS); 1064 m_HelpCtl.SetWindowPos(NULL,xb,wrc.Height()-m_OverY-cyb*2-brc.Height(),0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
1062} 1065}
1063 1066
1064void CDipstickDlg::OnHelp() 1067void CDipstickDlg::OnHelp()
1065{ 1068{
1066 WinHelp(0,HELP_FINDER); 1069 WinHelp(0,HELP_FINDER);
1067} 1070}
1068 1071
1069void CDipstickDlg::UpdateDragpadTitle() 1072void CDipstickDlg::UpdateDragpadTitle()
1070{ 1073{
1071int ic = m_HostList.GetItemCount(); 1074int ic = m_HostList.GetItemCount();
1072CString title; 1075CString title;
1073 if(!ic){ 1076 if(!ic){
1074 VERIFY(title.LoadString(IDS_DRAGPAD_TITLE)); 1077 VERIFY(title.LoadString(IDS_DRAGPAD_TITLE));
1075 }else{ 1078 }else{
1076 int ip = 0; 1079 int ip = 0;
1077 POSITION p = m_Hosts.GetHeadPosition(); 1080 POSITION p = m_Hosts.GetHeadPosition();
1078 while(p){ 1081 while(p){
1079 CPingyHost *host = m_Hosts.GetNext(p); 1082 CPingyHost *host = m_Hosts.GetNext(p);
1080 ASSERT(host); 1083 ASSERT(host);
1081 if(!(host->m_Pinging || host->m_bToPing)) 1084 if(!(host->m_Pinging || host->m_bToPing))
1082 ip++; 1085 ip++;
1083 } 1086 }
1084 title.Format(IDS_DRAGPAD_URLS,ip,ic); 1087 title.Format(IDS_DRAGPAD_URLS,ip,ic);
1085 } 1088 }
1086 if(m_DragPad) 1089 if(m_DragPad)
1087 m_DragPad->SetWindowText(title); 1090 m_DragPad->SetWindowText(title);
1088} 1091}
1089 1092
1090void CDipstickDlg::OnBegindragHostlist(NMHDR* pNMHDR, LRESULT* pResult) 1093void CDipstickDlg::OnBegindragHostlist(NMHDR* pNMHDR, LRESULT* pResult)
1091{ 1094{
1092 NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; 1095 NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
1093 1096
1094 if(pNMListView->iItem>=0){ 1097 if(pNMListView->iItem>=0){
1095 CPingyHost *host = (CPingyHost*) m_HostList.GetItemData(pNMListView->iItem); 1098 CPingyHost *host = (CPingyHost*) m_HostList.GetItemData(pNMListView->iItem);
1096 ASSERT(host); 1099 ASSERT(host);
1097 if(!host->m_URL.IsEmpty()){ 1100 if(!host->m_URL.IsEmpty()){
1098 CURLSource us(host->m_URL); 1101 CURLSource us(host->m_URL);
1099 us.DoDragDrop(DROPEFFECT_COPY|DROPEFFECT_LINK); 1102 us.DoDragDrop(DROPEFFECT_COPY|DROPEFFECT_LINK);
1100 } 1103 }
1101 } 1104 }
1102 1105
1103 *pResult = 0; 1106 *pResult = 0;
1104} 1107}
1105 1108
1106void CDipstickDlg::OnPasteurl() 1109void CDipstickDlg::OnPasteurl()
1107{ 1110{
1108COleDataObject odo; 1111COleDataObject odo;
1109 if(!odo.AttachClipboard()) 1112 if(!odo.AttachClipboard())
1110 return; 1113 return;
1111 CollectURLs(&odo,FALSE); 1114 CollectURLs(&odo,FALSE);
1112} 1115}
1113 1116
1114BOOL CDipstickDlg::IsPasteableClipboard() 1117BOOL CDipstickDlg::IsPasteableClipboard()
1115{ 1118{
1116COleDataObject odo; 1119COleDataObject odo;
1117 if(!odo.AttachClipboard()) 1120 if(!odo.AttachClipboard())
1118 return FALSE; 1121 return FALSE;
1119 if(CollectURLs(&odo,TRUE)) 1122 if(CollectURLs(&odo,TRUE))
1120 return TRUE; 1123 return TRUE;
1121 return FALSE; 1124 return FALSE;
1122} 1125}
1123 1126
1124BOOL CDipstickDlg::CollectURLs(COleDataObject* pDO,BOOL bTestOnly) 1127BOOL CDipstickDlg::CollectURLs(COleDataObject* pDO,BOOL bTestOnly)
1125{ 1128{
1126 UINTcfURL = RegisterClipboardFormat("UniformResourceLocator"); 1129 UINTcfURL = RegisterClipboardFormat("UniformResourceLocator");
1127 UINTcfHTML = RegisterClipboardFormat("HTML Format"); 1130 UINTcfHTML = RegisterClipboardFormat("HTML Format");
1128 UINTcfNIF = RegisterClipboardFormat("Netscape Image Format"); 1131 UINTcfNIF = RegisterClipboardFormat("Netscape Image Format");
1129 if(pDO->IsDataAvailable(cfURL)){ 1132 if(pDO->IsDataAvailable(cfURL)){
1130 if(!bTestOnly){ 1133 if(!bTestOnly){
1131 HGLOBAL hg = pDO->GetGlobalData(cfURL); 1134 HGLOBAL hg = pDO->GetGlobalData(cfURL);
1132 ASSERT(hg); 1135 ASSERT(hg);
1133 LPVOID lpv = GlobalLock(hg); 1136 LPVOID lpv = GlobalLock(hg);
1134 ASSERT(lpv); 1137 ASSERT(lpv);
1135 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)lpv)); 1138 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)lpv));
1136 GlobalUnlock(hg); 1139 GlobalUnlock(hg);
1137 GlobalFree(hg); 1140 GlobalFree(hg);
1138 } 1141 }
1139 return TRUE; 1142 return TRUE;
1140 } 1143 }
1141 if(pDO->IsDataAvailable(cfHTML)){ 1144 if(pDO->IsDataAvailable(cfHTML)){
1142 HGLOBAL hg = pDO->GetGlobalData(cfHTML); 1145 HGLOBAL hg = pDO->GetGlobalData(cfHTML);
1143 ASSERT(hg); 1146 ASSERT(hg);
1144 LPCTSTR lps = (LPCTSTR)GlobalLock(hg); 1147 LPCTSTR lps = (LPCTSTR)GlobalLock(hg);
1145 ASSERT(lps); 1148 ASSERT(lps);
1146 BOOL rv = FALSE; 1149 BOOL rv = FALSE;
1147 do{ 1150 do{
1148 static LPCTSTR v10 = "Version:1.0\r\n"; 1151 static LPCTSTR v10 = "Version:1.0\r\n";
1149 if(memcmp(v10,lps,strlen(v10))) 1152 if(memcmp(v10,lps,strlen(v10)))
1150 break; 1153 break;
1151 static LPCTSTR strStartSelection = "StartSelection:"; 1154 static LPCTSTR strStartSelection = "StartSelection:";
1152 static LPCTSTR strEndSelection = "EndSelection:"; 1155 static LPCTSTR strEndSelection = "EndSelection:";
1153 static LPCTSTR strSourceURL = "SourceURL:"; 1156 static LPCTSTR strSourceURL = "SourceURL:";
1154 LPTSTR subs = strstr(lps,strStartSelection); 1157 LPTSTR subs = strstr(lps,strStartSelection);
1155 if(!subs) 1158 if(!subs)
1156 break; 1159 break;
1157 LONG startSelection = atol(&subs[strlen(strStartSelection)]); 1160 LONG startSelection = atol(&subs[strlen(strStartSelection)]);
1158 if(!startSelection) 1161 if(!startSelection)
1159 break; 1162 break;
1160 if(!(subs=strstr(lps,strEndSelection))) 1163 if(!(subs=strstr(lps,strEndSelection)))
1161 break; 1164 break;
1162 LONG endSelection = atol(&subs[strlen(strEndSelection)]); 1165 LONG endSelection = atol(&subs[strlen(strEndSelection)]);
1163 if(!endSelection) 1166 if(!endSelection)
1164 break; 1167 break;
1165 if(!(subs=strstr(lps,strSourceURL))) 1168 if(!(subs=strstr(lps,strSourceURL)))
1166 break; 1169 break;
1167 subs = &subs[strlen(strSourceURL)]; 1170 subs = &subs[strlen(strSourceURL)];
1168 LPTSTR eol = strchr(subs,'\r'); 1171 LPTSTR eol = strchr(subs,'\r');
1169 if(!eol) 1172 if(!eol)
1170 break; 1173 break;
1171 (*eol)=0; 1174 (*eol)=0;
1172 CString sourceURL = subs; 1175 CString sourceURL = subs;
1173 if(!sourceURL.GetLength()) 1176 if(!sourceURL.GetLength())
1174 break; 1177 break;
1175 TRACE0("SourceURL = "+sourceURL+"\n"); 1178 TRACE0("SourceURL = "+sourceURL+"\n");
1176 _xferHTML* xf = new _xferHTML; 1179 _xferHTML* xf = new _xferHTML;
1177 VERIFY(xf->src.Crack(sourceURL)); 1180 VERIFY(xf->src.Crack(sourceURL));
1178 LPTSTR htmlBuff = xf->html.GetBuffer(endSelection-startSelection+2); 1181 LPTSTR htmlBuff = xf->html.GetBuffer(endSelection-startSelection+2);
1179 ASSERT(htmlBuff); 1182 ASSERT(htmlBuff);
1180 memmove(htmlBuff,&lps[startSelection],endSelection-startSelection+1); 1183 memmove(htmlBuff,&lps[startSelection],endSelection-startSelection+1);
1181 htmlBuff[endSelection-startSelection+1]=0; 1184 htmlBuff[endSelection-startSelection+1]=0;
1182 xf->html.ReleaseBuffer(); 1185 xf->html.ReleaseBuffer();
1183 if(bTestOnly){ 1186 if(bTestOnly){
1184 rv = m_reHTMLURL.Match(xf->html); 1187 rv = m_reHTMLURL.Match(xf->html);
1185 delete xf; 1188 delete xf;
1186 }else{ 1189 }else{
1187 PostMessage(WM_DNP_HTML,0,(LPARAM)xf); 1190 PostMessage(WM_DNP_HTML,0,(LPARAM)xf);
1191 rv = TRUE;
1188 } 1192 }
1189 }while(FALSE); 1193 }while(FALSE);
1190 GlobalUnlock(hg); 1194 GlobalUnlock(hg);
1191 GlobalFree(hg); 1195 GlobalFree(hg);
1192 return rv; 1196 return rv;
1193 } 1197 }
1194 if(pDO->IsDataAvailable(cfNIF)){ 1198 if(pDO->IsDataAvailable(cfNIF)){
1195 if(!bTestOnly){ 1199 if(!bTestOnly){
1196 HGLOBAL hg = pDO->GetGlobalData(cfNIF); 1200 HGLOBAL hg = pDO->GetGlobalData(cfNIF);
1197 ASSERT(hg); 1201 ASSERT(hg);
1198 LPVOID lpv = GlobalLock(hg); 1202 LPVOID lpv = GlobalLock(hg);
1199 ASSERT(lpv); 1203 ASSERT(lpv);
1200 struct _nif{ 1204 struct _nif{
1201 BYTE data[0x20]; 1205 BYTE data[0x20];
1202 DWORD m_offDescr; 1206 DWORD m_offDescr;
1203 DWORD m_offURL; 1207 DWORD m_offURL;
1204 DWORD m_offToImage; 1208 DWORD m_offToImage;
1205 } *nif = (_nif*)lpv; 1209 } *nif = (_nif*)lpv;
1206 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)&nif->data[nif->m_offURL])); 1210 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)&nif->data[nif->m_offURL]));
1207 GlobalUnlock(hg); 1211 GlobalUnlock(hg);
1208 GlobalFree(hg); 1212 GlobalFree(hg);
1209 } 1213 }
1210 return TRUE; 1214 return TRUE;
1211 } 1215 }
1212 if(pDO->IsDataAvailable(CF_TEXT)){ 1216 if(pDO->IsDataAvailable(CF_TEXT)){
1213 if(!bTestOnly){ 1217 BOOL rv = FALSE;
1214 HGLOBAL hg = pDO->GetGlobalData(CF_TEXT); 1218 HGLOBAL hg = pDO->GetGlobalData(CF_TEXT);
1215 ASSERT(hg); 1219 ASSERT(hg);
1216 LPVOID lpv = GlobalLock(hg); 1220 LPVOID lpv = GlobalLock(hg);
1217 ASSERT(lpv); 1221 ASSERT(lpv);
1218 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)lpv)); 1222 if(bTestOnly){
1219 GlobalUnlock(hg); 1223 rv = m_reURL.Match((LPCSTR)lpv);
1220 GlobalFree(hg); 1224 }else{
1225 CString sel = (LPCSTR)lpv;
1226 if(m_reURL.Match(sel)) {
1227 rv = TRUE;
1228 CString tmp = m_reURL.GetMatch(CRegEx::matchPostMatch);
1229 if(m_reURL.Match(tmp)) {
1230 PostMessage(WM_DNP_URLSPING,0,(LPARAM)new CString((LPCSTR)lpv));
1231 }else{
1232 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)lpv));
1233 }
1234 }
1221 } 1235 }
1222 return TRUE; 1236 GlobalUnlock(hg);
1237 GlobalFree(hg);
1238 return rv;
1223 } 1239 }
1224 return FALSE; 1240 return FALSE;
1225} 1241}
1226 1242
1227LRESULT CDipstickDlg::OnHTMLTransfer(WPARAM wP, LPARAM lP) 1243LRESULT CDipstickDlg::OnHTMLTransfer(WPARAM wP, LPARAM lP)
1228{ 1244{
1229_xferHTML* xf = (_xferHTML*)lP; 1245_xferHTML* xf = (_xferHTML*)lP;
1230CSelectURLsDlg su; 1246CSelectURLsDlg su;
1231 su.m_bAdjust = m_bSmartAdjust; 1247 su.m_bAdjust = m_bSmartAdjust;
1232 su.m_bAdjustInnermost = m_bAdjustInnermost; 1248 su.m_bAdjustInnermost = m_bAdjustInnermost;
1233 BeginWaitCursor(); 1249 BeginWaitCursor();
1234 while(m_reHTMLURL.Match(xf->html)){ 1250 while(m_reHTMLURL.Match(xf->html)){
1235 CString url = m_reHTMLURL.GetMatch(1); 1251 CString url = m_reHTMLURL.GetMatch(1);
1236 xf->html = m_reHTMLURL.GetMatch(CRegEx::matchPostMatch); 1252 xf->html = m_reHTMLURL.GetMatch(CRegEx::matchPostMatch);
1237 if(CCrackURL::GetHostName(url)==url){ 1253 if(CCrackURL::GetHostName(url)==url){
1238 if(m_bIgnorelative) 1254 if(m_bIgnorelative)
1239 continue; 1255 continue;
1240 CCrackURL cracked; 1256 CCrackURL cracked;
1241 VERIFY(cracked.Crack(url)); 1257 VERIFY(cracked.Crack(url));
1242 cracked.Adjust(xf->src); 1258 cracked.Adjust(xf->src);
1243 url = cracked.Build(); 1259 url = cracked.Build();
1244 } 1260 }
1245 if(!su.m_URLs.Find(url)) 1261 if(!su.m_URLs.Find(url))
1246 VERIFY(su.m_URLs.AddTail(url)); 1262 VERIFY(su.m_URLs.AddTail(url));
1247 } 1263 }
1248 EndWaitCursor(); 1264 EndWaitCursor();
1249 delete xf; 1265 delete xf;
1250 if(su.DoModal()==IDOK){ 1266 if(su.DoModal()==IDOK){
1251 POSITION p = su.m_URLs.GetHeadPosition(); 1267 POSITION p = su.m_URLs.GetHeadPosition();
1252 while(p){ 1268 while(p){
1253 CString url = su.m_URLs.GetNext(p); 1269 CString url = su.m_URLs.GetNext(p);
1254 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString(url)); 1270 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString(url));
1255 } 1271 }
1256 } 1272 }
1257 return 0; 1273 return 0;
1258} 1274}
1259 1275
1276LRESULT CDipstickDlg::OnURLSPing(WPARAM wP,LPARAM lP)
1277{
1278CString *sel = (CString*)lP;
1279TRACE1("URLS: %s\n",(LPCTSTR)*sel);
1280CSelectURLsDlg su;
1281 su.m_bAdjust = m_bSmartAdjust;
1282 su.m_bAdjustInnermost = m_bAdjustInnermost;
1283 BeginWaitCursor();
1284 while(m_reURL.Match(*sel)){
1285 CString url = m_reURL.GetMatch(CRegEx::matchMatch);
1286 (*sel) = m_reURL.GetMatch(CRegEx::matchPostMatch);
1287 if(!su.m_URLs.Find(url))
1288 VERIFY(su.m_URLs.AddTail(url));
1289 }
1290 EndWaitCursor();
1291 delete sel;
1292 if(su.DoModal()==IDOK){
1293 POSITION p = su.m_URLs.GetHeadPosition();
1294 while(p){
1295 CString url = su.m_URLs.GetNext(p);
1296 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString(url));
1297 }
1298 }
1299 return 0;
1300}
1301
1260UINT CPingyHost::PingProc(LPVOID pParam) 1302UINT CPingyHost::PingProc(LPVOID pParam)
1261{ 1303{
1262CPingyHost* pThis = (CPingyHost*)pParam; 1304CPingyHost* pThis = (CPingyHost*)pParam;
1263 ASSERT(pThis->m_Daddy); 1305 ASSERT(pThis->m_Daddy);
1264 return pThis->DoPing(); 1306 return pThis->DoPing();
1265} 1307}
1266 1308
1267UINT CPingyHost::DoPing() 1309UINT CPingyHost::DoPing()
1268{ 1310{
1269CSingleLock slock(&m_mutex); 1311CSingleLock slock(&m_mutex);
1270 if(!slock.Lock(2000)){ 1312 if(!slock.Lock(2000)){
1271 m_Status.LoadString(IDS_PS_FAILEDTOLOCK); 1313 m_Status.LoadString(IDS_PS_FAILEDTOLOCK);
1272 return 1; 1314 return 1;
1273 } 1315 }
1274 m_Pinging = TRUE; 1316 m_Pinging = TRUE;
1275 m_bToPing = FALSE; 1317 m_bToPing = FALSE;
1276 VERIFY(m_Daddy->m_eveStartup.SetEvent()); 1318 VERIFY(m_Daddy->m_eveStartup.SetEvent());
1277 m_Daddy->PostMessage(WM_DNP_UPDATEHOSTDATA,0,(LPARAM)this); 1319 m_Daddy->PostMessage(WM_DNP_UPDATEHOSTDATA,0,(LPARAM)this);
1278in_addr ip; 1320in_addr ip;
1279UINT packets, lost; 1321UINT packets, lost;
1280 packets=lost=0; 1322 packets=lost=0;
1281CICMP* pICMP = NULL; 1323CICMP* pICMP = NULL;
1282UINT dataSize = m_Daddy->m_PingSize; 1324UINT dataSize = m_Daddy->m_PingSize;
1283 intploss = 100; 1325 intploss = 100;
1284 do{ 1326 do{
1285 if(m_HostName.IsEmpty()){ 1327 if(m_HostName.IsEmpty()){
1286 ip.s_addr = m_IP; 1328 ip.s_addr = m_IP;
1287 hostent *he = gethostbyaddr((char*)&ip,4,PF_INET); 1329 hostent *he = gethostbyaddr((char*)&ip,4,PF_INET);
1288 if(!he) 1330 if(!he)
1289 m_HostName.Empty(); 1331 m_HostName.Empty();
1290 else 1332 else
1291 m_HostName = he->h_name; 1333 m_HostName = he->h_name;
1292 }else{ 1334 }else{
1293 hostent *he = gethostbyname(m_HostName); 1335 hostent *he = gethostbyname(m_HostName);
1294 if(!he){ 1336 if(!he){
1295 m_Status.LoadString(IDS_PS_FAILEDTORESOLVE); 1337 m_Status.LoadString(IDS_PS_FAILEDTORESOLVE);
1296 m_IP = 0; 1338 m_IP = 0;
1297 break; 1339 break;
1298 } 1340 }
1299 memmove(&ip.s_addr,he->h_addr,sizeof(ip.s_addr)); 1341 memmove(&ip.s_addr,he->h_addr,sizeof(ip.s_addr));
1300 m_IP = ip.s_addr; 1342 m_IP = ip.s_addr;
1301 } 1343 }
1302 pICMP = CICMP::CreateICMP(); 1344 pICMP = CICMP::CreateICMP();
1303 if(!(pICMP && pICMP->Initialize())){ 1345 if(!(pICMP && pICMP->Initialize())){
1304 m_Status.LoadString(IDS_PS_UNABLETOICMP); 1346 m_Status.LoadString(IDS_PS_UNABLETOICMP);
1305 break; 1347 break;
1306 } 1348 }
1307 m_Daddy->PostMessage(WM_DNP_UPDATEHOSTDATA,0,(LPARAM)this); 1349 m_Daddy->PostMessage(WM_DNP_UPDATEHOSTDATA,0,(LPARAM)this);
1308 ULONG sum, num, pmin, pmax; 1350 ULONG sum, num, pmin, pmax;
1309 sum = num = 0; 1351 sum = num = 0;
1310 pmin = 0xFFFFFFFF; 1352 pmin = 0xFFFFFFFF;
1311 pmax = 0; 1353 pmax = 0;
1312 UINT seq; 1354 UINT seq;
1313 for(seq = 0;seq<m_Daddy->m_PingsPerHost;seq++){ 1355 for(seq = 0;seq<m_Daddy->m_PingsPerHost;seq++){
1314 INT status; 1356 INT status;
1315 LONG rtt = pICMP->Ping(ip,dataSize,m_Daddy->m_TimeOut,&status); 1357 LONG rtt = pICMP->Ping(ip,dataSize,m_Daddy->m_TimeOut,&status);
1316 UINT stString = 0; 1358 UINT stString = 0;
1317 switch(status){ 1359 switch(status){
1318 case CICMP::ipSuccess: 1360 case CICMP::ipSuccess:
1319 sum+=rtt; num++; 1361 sum+=rtt; num++;
1320 if(rtt<pmin) 1362 if(rtt<pmin)
1321 pmin=rtt; 1363 pmin=rtt;
1322 if(rtt>pmax) 1364 if(rtt>pmax)
1323 pmax=rtt; 1365 pmax=rtt;
1324 break; 1366 break;
1325 case CICMP::ipBuffTooSmall: stString = IDS_PS_INTERNALERROR; 1367 case CICMP::ipBuffTooSmall: stString = IDS_PS_INTERNALERROR;
1326 break; 1368 break;
1327 case CICMP::ipDestNetUnreachable: stString = IDS_PS_NETUNREACHABLE; 1369 case CICMP::ipDestNetUnreachable: stString = IDS_PS_NETUNREACHABLE;
1328 break; 1370 break;
1329 case CICMP::ipDestHostUnreachable: stString = IDS_PS_HOSTUNREACHABLE; 1371 case CICMP::ipDestHostUnreachable: stString = IDS_PS_HOSTUNREACHABLE;
1330 break; 1372 break;
1331 case CICMP::ipDestProtUnreachable: stString = IDS_PS_PROTUNREACHABLE; 1373 case CICMP::ipDestProtUnreachable: stString = IDS_PS_PROTUNREACHABLE;
1332 break; 1374 break;
1333 case CICMP::ipDestPortUnreachable: stString = IDS_PS_PORTUNREACHABLE; 1375 case CICMP::ipDestPortUnreachable: stString = IDS_PS_PORTUNREACHABLE;
1334 break; 1376 break;
1335 case CICMP::ipNoResources: stString = IDS_PS_NORESOURCES; 1377 case CICMP::ipNoResources: stString = IDS_PS_NORESOURCES;
1336 break; 1378 break;
1337 case CICMP::ipBadOption: stString = IDS_PS_INTERNALERROR; 1379 case CICMP::ipBadOption: stString = IDS_PS_INTERNALERROR;
1338 break; 1380 break;
1339 case CICMP::ipHWError: stString = IDS_PS_HWERROR; 1381 case CICMP::ipHWError: stString = IDS_PS_HWERROR;
1340 break; 1382 break;
1341 case CICMP::ipPacketTooBig: stString = IDS_PS_BIGPACKET; 1383 case CICMP::ipPacketTooBig: stString = IDS_PS_BIGPACKET;
1342 break; 1384 break;
1343 case CICMP::ipTimeOut: stString = IDS_PS_TIMEOUT; 1385 case CICMP::ipTimeOut: stString = IDS_PS_TIMEOUT;
1344 break; 1386 break;
1345 case CICMP::ipBadRequest: stString = IDS_PS_INTERNALERROR; 1387 case CICMP::ipBadRequest: stString = IDS_PS_INTERNALERROR;
1346 break; 1388 break;
1347 case CICMP::ipBadRoute: stString = IDS_PS_BADROUTE; 1389 case CICMP::ipBadRoute: stString = IDS_PS_BADROUTE;
1348 break; 1390 break;
1349 case CICMP::ipTTLExpiredInTransit: stString = IDS_PS_TTLEXPTRANSIT; 1391 case CICMP::ipTTLExpiredInTransit: stString = IDS_PS_TTLEXPTRANSIT;
1350 break; 1392 break;
1351 case CICMP::ipTTLExpiredInReasm: stString = IDS_PS_TTLEXPREASM; 1393 case CICMP::ipTTLExpiredInReasm: stString = IDS_PS_TTLEXPREASM;
1352 break; 1394 break;
1353 case CICMP::ipParamProblem: stString = IDS_PS_IPARAMP; 1395 case CICMP::ipParamProblem: stString = IDS_PS_IPARAMP;
1354 break; 1396 break;
1355 case CICMP::ipSourceQuench: stString = IDS_PS_SOURCEQUENCH; 1397 case CICMP::ipSourceQuench: stString = IDS_PS_SOURCEQUENCH;
1356 break; 1398 break;
1357 case CICMP::ipOptionTooBig: stString = IDS_PS_BIGOPTION; 1399 case CICMP::ipOptionTooBig: stString = IDS_PS_BIGOPTION;
1358 break; 1400 break;
1359 case CICMP::ipBadDest: stString = IDS_PS_BADDEST; 1401 case CICMP::ipBadDest: stString = IDS_PS_BADDEST;
1360 break; 1402 break;
1361 default: 1403 default:
1362 stString = IDS_PS_UNKNOWNERROR; 1404 stString = IDS_PS_UNKNOWNERROR;
1363 break; 1405 break;
1364 } 1406 }
1365 if(stString) 1407 if(stString)
1366 m_Status.LoadString(stString); 1408 m_Status.LoadString(stString);
1367 packets++; 1409 packets++;
1368 if(rtt<0) 1410 if(rtt<0)
1369 lost++; 1411 lost++;
1370 Sleep(m_Daddy->m_Interval); 1412 Sleep(m_Daddy->m_Interval);
1371 } 1413 }
1372 if(packets==lost || !packets){ 1414 if(packets==lost || !packets){
1373 ploss=100; 1415 ploss=100;
1374 }else{ 1416 }else{
1375 ploss = lost*100/packets; 1417 ploss = lost*100/packets;
1376 m_MinRTT = pmin; 1418 m_MinRTT = pmin;
1377 m_MaxRTT = pmax; 1419 m_MaxRTT = pmax;
1378 if(sum){ 1420 if(sum){
1379 ASSERT(num); 1421 ASSERT(num);
1380 m_AvgRTT = sum/num; 1422 m_AvgRTT = sum/num;
1381 }else{ 1423 }else{
1382 m_AvgRTT = 0; 1424 m_AvgRTT = 0;
1383 } 1425 }
1384 } 1426 }
1385 }while(FALSE); 1427 }while(FALSE);
1386 m_Packetloss=ploss; 1428 m_Packetloss=ploss;
1387 m_Pinged=TRUE; 1429 m_Pinged=TRUE;
1388 m_Pinging=FALSE; 1430 m_Pinging=FALSE;
1389 if(pICMP){ 1431 if(pICMP){
1390 pICMP->Deinitialize(); 1432 pICMP->Deinitialize();
1391 delete pICMP; 1433 delete pICMP;
1392 } 1434 }
1393 m_Daddy->PostMessage(WM_DNP_UPDATEHOSTDATA,0,(LPARAM)this); 1435 m_Daddy->PostMessage(WM_DNP_UPDATEHOSTDATA,0,(LPARAM)this);
1394 m_Daddy->PostMessage(WM_DNP_ACTIVITYCOUNT,(WPARAM)-1); 1436 m_Daddy->PostMessage(WM_DNP_ACTIVITYCOUNT,(WPARAM)-1);
1395 return 0; 1437 return 0;
1396} 1438}
1397 1439
1398void CPingyHost::Ping() 1440void CPingyHost::Ping()
1399{ 1441{
1400 ASSERT(m_Daddy); 1442 ASSERT(m_Daddy);
1401 m_Daddy->m_eveStartup.ResetEvent(); 1443 m_Daddy->m_eveStartup.ResetEvent();
1402 if(!AfxBeginThread(CPingyHost::PingProc,this)){ 1444 if(!AfxBeginThread(CPingyHost::PingProc,this)){
1403 ASSERT(FALSE); 1445 ASSERT(FALSE);
1404 }else{ 1446 }else{
1405 CSingleLock sl(&m_Daddy->m_eveStartup); 1447 CSingleLock sl(&m_Daddy->m_eveStartup);
1406 sl.Lock(); 1448 sl.Lock();
1407 m_Daddy->SendMessage(WM_DNP_ACTIVITYCOUNT,(WPARAM)1);// *** AWFUL! Shouldn't be here! 1449 m_Daddy->SendMessage(WM_DNP_ACTIVITYCOUNT,(WPARAM)1);// *** AWFUL! Shouldn't be here!
1408 } 1450 }
1409} 1451}
1410 1452
1411void CDipstickDlg::OnHostlistCopyurl() 1453void CDipstickDlg::OnHostlistCopyurl()
1412{ 1454{
1413 if(m_HostList.GetSelectedCount()!=1) 1455 if(m_HostList.GetSelectedCount()!=1)
1414 return; 1456 return;
1415int items = m_HostList.GetItemCount(); 1457int items = m_HostList.GetItemCount();
1416 for(int tmp=0;tmp<items;tmp++){ 1458 for(int tmp=0;tmp<items;tmp++){
1417 if((m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED))&LVIS_SELECTED) 1459 if((m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED))&LVIS_SELECTED)
1418 break; 1460 break;
1419 } 1461 }
1420 ASSERT(tmp<items); 1462 ASSERT(tmp<items);
1421CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp); 1463CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp);
1422 ASSERT(host); 1464 ASSERT(host);
1423 if(!host->m_URL.IsEmpty()){ 1465 if(!host->m_URL.IsEmpty()){
1424 CURLSource *us = new CURLSource(host->m_URL); 1466 CURLSource *us = new CURLSource(host->m_URL);
1425 us->SetClipboard(); 1467 us->SetClipboard();
1426 us->FlushClipboard(); 1468 us->FlushClipboard();
1427 } 1469 }
1428} 1470}
1429 1471
1430BOOL CDipstickDlg::OnHelpInfo(HELPINFO* pHelpInfo) 1472BOOL CDipstickDlg::OnHelpInfo(HELPINFO* pHelpInfo)
1431{ 1473{
1432 WinHelp(IDD|0x20000l); 1474 WinHelp(IDD|0x20000l);
1433 return TRUE; 1475 return TRUE;
1434} 1476}
1435 1477
1436void CDipstickDlg::OnDropFiles(HDROP hDropInfo) 1478void CDipstickDlg::OnDropFiles(HDROP hDropInfo)
1437{ 1479{
1438 // *** Import only 1st file, but maybe we should fall into prompt mode if multiple files are dropped. 1480 // *** Import only 1st file, but maybe we should fall into prompt mode if multiple files are dropped.
1439CString fileName; 1481CString fileName;
1440int bufferSize = DragQueryFile(hDropInfo,0,NULL,0); 1482int bufferSize = DragQueryFile(hDropInfo,0,NULL,0);
1441 DragQueryFile(hDropInfo,0,fileName.GetBuffer(bufferSize+2),bufferSize+1); 1483 DragQueryFile(hDropInfo,0,fileName.GetBuffer(bufferSize+2),bufferSize+1);
1442 fileName.ReleaseBuffer(); 1484 fileName.ReleaseBuffer();
1443 if(fileName.IsEmpty()) 1485 if(fileName.IsEmpty())
1444 CDialog::OnDropFiles(hDropInfo); 1486 CDialog::OnDropFiles(hDropInfo);
1445 else 1487 else
1446 ImportLocations(fileName); 1488 ImportLocations(fileName);
1447} 1489}
1448 1490
1449BOOL CDipstickDlg::ImportLocations(LPCTSTR file) 1491BOOL CDipstickDlg::ImportLocations(LPCTSTR file)
1450{ 1492{
1451CString fileLine; 1493CString fileLine;
1452CString q; 1494CString q;
1453 try{ 1495 try{
1454 CStdioFile f(file,CFile::modeRead|CFile::typeText|CFile::shareDenyWrite); 1496 CStdioFile f(file,CFile::modeRead|CFile::typeText|CFile::shareDenyWrite);
1455 // *** Cleanup locations.. 1497 // *** Cleanup locations..
1456 while(f.ReadString(fileLine)){ 1498 while(f.ReadString(fileLine)){
1457 if(fileLine.IsEmpty()) 1499 if(fileLine.IsEmpty())
1458 continue; 1500 continue;
1459 if(fileLine[0]=='\"' || fileLine[0]=='\''){ 1501 if(fileLine[0]=='\"' || fileLine[0]=='\''){
1460 TCHAR q = fileLine[0]; 1502 TCHAR q = fileLine[0];
1461 fileLine=fileLine.Mid(1); 1503 fileLine=fileLine.Mid(1);
1462 for(int tmp=0;tmp<fileLine.GetLength();tmp++){ 1504 for(int tmp=0;tmp<fileLine.GetLength();tmp++){
1463 if(fileLine[tmp]!=q) 1505 if(fileLine[tmp]!=q)
1464 continue; 1506 continue;
1465 if(!tmp){ 1507 if(!tmp){
1466 fileLine.Empty(); 1508 fileLine.Empty();
1467 break; 1509 break;
1468 } 1510 }
1469 fileLine=fileLine.Left(tmp); 1511 fileLine=fileLine.Left(tmp);
1470 break; 1512 break;
1471 } 1513 }
1472 }else{ 1514 }else{
1473 int co = fileLine.Find(','); 1515 int co = fileLine.Find(',');
1474 if(co>=0) 1516 if(co>=0)
1475 fileLine=fileLine.Left(co); 1517 fileLine=fileLine.Left(co);
1476 } 1518 }
1477 if(fileLine.IsEmpty()) 1519 if(fileLine.IsEmpty())
1478 continue; 1520 continue;
1479 if(!fileLine.CompareNoCase("url")) 1521 if(!fileLine.CompareNoCase("url"))
1480 continue; 1522 continue;
1481 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString(fileLine)); 1523 PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString(fileLine));
1482 } 1524 }
1483 }catch(CException* e){ 1525 }catch(CException* e){
1484 e->Delete(); 1526 e->Delete();
1485 TRACE0("Failed to import URLList file\n"); 1527 TRACE0("Failed to import URLList file\n");
1486 return FALSE; 1528 return FALSE;
1487 } 1529 }
1488 return TRUE; 1530 return TRUE;
1489} 1531}
1490 1532
1491void CDipstickDlg::OnAdvanced() 1533void CDipstickDlg::OnAdvanced()
1492{ 1534{
1493CRect rc; 1535CRect rc;
1494 m_AdvancedCtl.GetClientRect(rc); 1536 m_AdvancedCtl.GetClientRect(rc);
1495 m_AdvancedCtl.ClientToScreen(rc); 1537 m_AdvancedCtl.ClientToScreen(rc);
1496CMenu menus; 1538CMenu menus;
1497 VERIFY(menus.LoadMenu(IDR_MENU)); 1539 VERIFY(menus.LoadMenu(IDR_MENU));
1498CMenu *popUp = menus.GetSubMenu(2); 1540CMenu *popUp = menus.GetSubMenu(2);
1499 ASSERT(popUp); 1541 ASSERT(popUp);
1500 popUp->EnableMenuItem(ID_ADVANCED_EXPORTLIST,MF_BYCOMMAND|(m_HostList.GetItemCount()?MF_ENABLED:MF_GRAYED)); 1542 popUp->EnableMenuItem(ID_ADVANCED_EXPORTLIST,MF_BYCOMMAND|(m_HostList.GetItemCount()?MF_ENABLED:MF_GRAYED));
1501 popUp->TrackPopupMenu(TPM_CENTERALIGN|TPM_RIGHTBUTTON|TPM_LEFTBUTTON,(rc.left+rc.right)/2,rc.top,this); 1543 popUp->TrackPopupMenu(TPM_CENTERALIGN|TPM_RIGHTBUTTON|TPM_LEFTBUTTON,(rc.left+rc.right)/2,rc.top,this);
1502} 1544}
1503 1545
1504void CDipstickDlg::OnAdvancedExportlist() 1546void CDipstickDlg::OnAdvancedExportlist()
1505{ 1547{
1506CString filter; 1548CString filter;
1507 filter.LoadString(IDS_CSVFILTER); 1549 filter.LoadString(IDS_CSVFILTER);
1508CFileDialog cfd(FALSE,".csv",NULL,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_PATHMUSTEXIST,filter,this); 1550CFileDialog cfd(FALSE,".csv",NULL,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_PATHMUSTEXIST,filter,this);
1509 if(!m_impexPath.IsEmpty()) 1551 if(!m_impexPath.IsEmpty())
1510 SetCurrentDirectory(m_impexPath); 1552 SetCurrentDirectory(m_impexPath);
1511 if(cfd.DoModal()==IDOK){ 1553 if(cfd.DoModal()==IDOK){
1512 GetCurrentDirectory(2048,m_impexPath.GetBuffer(2048)); 1554 GetCurrentDirectory(2048,m_impexPath.GetBuffer(2048));
1513 m_impexPath.ReleaseBuffer(); 1555 m_impexPath.ReleaseBuffer();
1514 ExportLocations(cfd.GetPathName()); 1556 ExportLocations(cfd.GetPathName());
1515 } 1557 }
1516} 1558}
1517 1559
1518void CDipstickDlg::OnAdvancedImportlist() 1560void CDipstickDlg::OnAdvancedImportlist()
1519{ 1561{
1520CString filter; 1562CString filter;
1521 filter.LoadString(IDS_CSVFILTER); 1563 filter.LoadString(IDS_CSVFILTER);
1522CFileDialog cfd(TRUE,".csv",NULL,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST,filter,this); 1564CFileDialog cfd(TRUE,".csv",NULL,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST,filter,this);
1523 if(!m_impexPath.IsEmpty()) 1565 if(!m_impexPath.IsEmpty())
1524 SetCurrentDirectory(m_impexPath); 1566 SetCurrentDirectory(m_impexPath);
1525 if(cfd.DoModal()==IDOK){ 1567 if(cfd.DoModal()==IDOK){
1526 GetCurrentDirectory(2048,m_impexPath.GetBuffer(2048)); 1568 GetCurrentDirectory(2048,m_impexPath.GetBuffer(2048));
1527 m_impexPath.ReleaseBuffer(); 1569 m_impexPath.ReleaseBuffer();
1528 ImportLocations(cfd.GetPathName()); 1570 ImportLocations(cfd.GetPathName());
1529 } 1571 }
1530} 1572}
1531 1573
1532BOOL CDipstickDlg::ExportLocations(LPCTSTR file) 1574BOOL CDipstickDlg::ExportLocations(LPCTSTR file)
1533{ 1575{
1534 try{ 1576 try{
1535 CStdioFile f(file,CFile::modeCreate|CFile::modeWrite|CFile::typeText); 1577 CStdioFile f(file,CFile::modeCreate|CFile::modeWrite|CFile::typeText);
1536 f.WriteString("URL,Host Name,IP Address, Min RTT,Avg RTT,Max RTT,Pktloss\n"); 1578 f.WriteString("URL,Host Name,IP Address, Min RTT,Avg RTT,Max RTT,Pktloss\n");
1537 POSITION p = m_Hosts.GetHeadPosition(); 1579 POSITION p = m_Hosts.GetHeadPosition();
1538 while(p){ 1580 while(p){
1539 CPingyHost *host = m_Hosts.GetNext(p); 1581 CPingyHost *host = m_Hosts.GetNext(p);
1540 ASSERT(host); 1582 ASSERT(host);
1541 CString ph; 1583 CString ph;
1542 ph.Format("\"%s\",%s,%s,%lu,%lu,%lu,%d%%\n",host->m_URL,host->m_HostName,inet_ntoa(*(in_addr*)&host->m_IP), 1584 ph.Format("\"%s\",%s,%s,%lu,%lu,%lu,%d%%\n",host->m_URL,host->m_HostName,inet_ntoa(*(in_addr*)&host->m_IP),
1543 host->m_MinRTT,host->m_AvgRTT,host->m_MaxRTT,host->m_Packetloss 1585 host->m_MinRTT,host->m_AvgRTT,host->m_MaxRTT,host->m_Packetloss
1544 ); 1586 );
1545 f.WriteString(ph); 1587 f.WriteString(ph);
1546 } 1588 }
1547 f.Close(); 1589 f.Close();
1548 }catch(CException* e){ 1590 }catch(CException* e){
1549 TRACE0("Failed to export URLList\n"); 1591 TRACE0("Failed to export URLList\n");
1550 e->Delete(); 1592 e->Delete();
1551 return FALSE; 1593 return FALSE;
1552 } 1594 }
1553 return TRUE; 1595 return TRUE;
1554} 1596}
1555 1597
1556void CDipstickDlg::OnDragpadAdvancedExportlist() 1598void CDipstickDlg::OnDragpadAdvancedExportlist()
1557{ 1599{
1558 OnAdvancedExportlist(); 1600 OnAdvancedExportlist();
1559} 1601}
1560 1602
1561void CDipstickDlg::OnDragpadAdvancedImportlist() 1603void CDipstickDlg::OnDragpadAdvancedImportlist()
1562{ 1604{
1563 OnAdvancedImportlist(); 1605 OnAdvancedImportlist();
1564} 1606}
1565 1607
1566void CPingyHost::Suicide() 1608void CPingyHost::Suicide()
1567{ 1609{
1568CSingleLock sl(&m_mutex); 1610CSingleLock sl(&m_mutex);
1569 if(sl.Lock(10)){ 1611 if(sl.Lock(10)){
1570 sl.Unlock(); 1612 sl.Unlock();
1571 delete this; 1613 delete this;
1572 }else{ 1614 }else{
1573 if(!AfxBeginThread(CPingyHost::SuicideProc,this)) 1615 if(!AfxBeginThread(CPingyHost::SuicideProc,this))
1574 ASSERT(FALSE); 1616 ASSERT(FALSE);
1575 } 1617 }
1576} 1618}
1577 1619
1578UINT CPingyHost::SuicideProc(LPVOID pParam) 1620UINT CPingyHost::SuicideProc(LPVOID pParam)
1579{ 1621{
1580CPingyHost* pThis = (CPingyHost*)pParam; 1622CPingyHost* pThis = (CPingyHost*)pParam;
1581CSingleLock sl(&pThis->m_mutex); 1623CSingleLock sl(&pThis->m_mutex);
1582 sl.Lock(); 1624 sl.Lock();
1583 VERIFY(sl.Unlock()); 1625 VERIFY(sl.Unlock());
1584 delete pThis; 1626 delete pThis;
1585 return 0; 1627 return 0;
1586} 1628} \ No newline at end of file
diff --git a/DipstickDlg.h b/DipstickDlg.h
index ce9ed22..47c3e01 100644
--- a/DipstickDlg.h
+++ b/DipstickDlg.h
@@ -1,184 +1,186 @@
1// DipstickDlg.h : header file 1// DipstickDlg.h : header file
2// 2//
3 3
4class CDipstickDlg; 4class CDipstickDlg;
5 struct CPingyHost{ 5 struct CPingyHost{
6 CPingyHost(CDipstickDlg* daddy) : m_IP(0), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){} 6 CPingyHost(CDipstickDlg* daddy) : m_IP(0), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){}
7 CPingyHost(CDipstickDlg* daddy,LPTSTR hostname) : m_HostName(hostname), m_IP(0), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){} 7 CPingyHost(CDipstickDlg* daddy,LPTSTR hostname) : m_HostName(hostname), m_IP(0), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){}
8 CPingyHost(CDipstickDlg* daddy,LPTSTR hostname,DWORD ip) : m_HostName(hostname), m_IP(ip), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){} 8 CPingyHost(CDipstickDlg* daddy,LPTSTR hostname,DWORD ip) : m_HostName(hostname), m_IP(ip), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){}
9 CPingyHost(CDipstickDlg* daddy,DWORD ip) : m_IP(ip), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){} 9 CPingyHost(CDipstickDlg* daddy,DWORD ip) : m_IP(ip), m_MinRTT(0), m_AvgRTT(0), m_MaxRTT(0), m_Pinged(FALSE), m_Pinging(FALSE), m_Packetloss(-1), m_bToPing(TRUE), m_Daddy(daddy){}
10public: 10public:
11 static UINT SuicideProc(LPVOID pParam); 11 static UINT SuicideProc(LPVOID pParam);
12 void Suicide(); 12 void Suicide();
13 void Ping(); 13 void Ping();
14 UINT DoPing(); 14 UINT DoPing();
15 static UINT PingProc(LPVOID); 15 static UINT PingProc(LPVOID);
16 CDipstickDlg* m_Daddy; 16 CDipstickDlg* m_Daddy;
17 CMutex m_mutex; 17 CMutex m_mutex;
18 CString m_Descr; 18 CString m_Descr;
19 CString m_URL; 19 CString m_URL;
20 BOOL m_bToPing; 20 BOOL m_bToPing;
21 BOOL m_Pinging; 21 BOOL m_Pinging;
22 CStringm_HostName; 22 CStringm_HostName;
23 CString m_Status; 23 CString m_Status;
24 DWORD m_IP; 24 DWORD m_IP;
25 ULONG m_MinRTT; 25 ULONG m_MinRTT;
26 ULONG m_AvgRTT; 26 ULONG m_AvgRTT;
27 ULONG m_MaxRTT; 27 ULONG m_MaxRTT;
28 BOOL m_Pinged; 28 BOOL m_Pinged;
29 int m_Packetloss; 29 int m_Packetloss;
30}; 30};
31 31
32 typedef CList<CPingyHost*,CPingyHost*>CHostList; 32 typedef CList<CPingyHost*,CPingyHost*>CHostList;
33 33
34///////////////////////////////////////////////////////////////////////////// 34/////////////////////////////////////////////////////////////////////////////
35// CDipstickDlg dialog 35// CDipstickDlg dialog
36 36
37class CDragPad; 37class CDragPad;
38class CDipstickDlg : public CDialog 38class CDipstickDlg : public CDialog
39{ 39{
40// Construction 40// Construction
41 struct _xferHTML{ 41 struct _xferHTML{
42 CString html; 42 CString html;
43 CCrackURL src; 43 CCrackURL src;
44 }; 44 };
45public: 45public:
46 LRESULT OnURLSPing(WPARAM wP,LPARAM lP);
47 CRegEx m_reURL;
46 BOOL ExportLocations(LPCTSTR file); 48 BOOL ExportLocations(LPCTSTR file);
47 CString m_impexPath; 49 CString m_impexPath;
48 BOOL ImportLocations(LPCTSTR file); 50 BOOL ImportLocations(LPCTSTR file);
49 BOOL m_bIgnorelative; 51 BOOL m_bIgnorelative;
50 CEvent m_eveStartup; 52 CEvent m_eveStartup;
51 UINT volatile m_ActiveThreads; 53 UINT volatile m_ActiveThreads;
52 BOOL m_bAdjustInnermost; 54 BOOL m_bAdjustInnermost;
53 BOOL m_bSmartAdjust; 55 BOOL m_bSmartAdjust;
54 BOOL CollectURLs(COleDataObject* pDO,BOOL bTestOnly=FALSE); 56 BOOL CollectURLs(COleDataObject* pDO,BOOL bTestOnly=FALSE);
55 BOOL IsPasteableClipboard(); 57 BOOL IsPasteableClipboard();
56 void UpdateDragpadTitle(); 58 void UpdateDragpadTitle();
57 BOOL m_bAutoBest; 59 BOOL m_bAutoBest;
58 void RecalcLayout(int cx,int cy); 60 void RecalcLayout(int cx,int cy);
59 CSize m_MinSize; 61 CSize m_MinSize;
60 UINT m_GapY; 62 UINT m_GapY;
61 UINT m_OverY; 63 UINT m_OverY;
62 UINT m_OverX; 64 UINT m_OverX;
63 BOOL m_bMSWorkAround; 65 BOOL m_bMSWorkAround;
64 CRegEx m_reCrackHost; 66 CRegEx m_reCrackHost;
65 CRegEx m_reNestedURL; 67 CRegEx m_reNestedURL;
66 CRegEx m_reHTMLURL; // 1 - URL 68 CRegEx m_reHTMLURL; // 1 - URL
67 CRegEx m_reCrackURL; //3 - schema, 4 - host, 5 - path, 7 - query string 69 CRegEx m_reCrackURL; //3 - schema, 4 - host, 5 - path, 7 - query string
68 BITMAP m_bitmapBack; 70 BITMAP m_bitmapBack;
69 CBitmap m_bmpBack; 71 CBitmap m_bmpBack;
70 int m_iUnreachable; 72 int m_iUnreachable;
71 int m_iCompleted; 73 int m_iCompleted;
72 int m_iPinging; 74 int m_iPinging;
73 int m_iPending; 75 int m_iPending;
74 CImageList m_Images; 76 CImageList m_Images;
75 void UpdateControlButtons(); 77 void UpdateControlButtons();
76 BOOL m_bExiting; 78 BOOL m_bExiting;
77 int CheckForPendingRequests(); 79 int CheckForPendingRequests();
78 UINT m_MaxThreads; 80 UINT m_MaxThreads;
79 BOOL m_bShown; 81 BOOL m_bShown;
80 enum{ 82 enum{
81 sortHost, sortIP, sortMin, sortAvg, sortMax, sortLoss 83 sortHost, sortIP, sortMin, sortAvg, sortMax, sortLoss
82 }; 84 };
83 int m_SortCriteria; 85 int m_SortCriteria;
84 static int CALLBACK CompareItems(LPARAM lp1, LPARAM lp2, LPARAM lp); 86 static int CALLBACK CompareItems(LPARAM lp1, LPARAM lp2, LPARAM lp);
85 DWORD m_Interval; 87 DWORD m_Interval;
86 BOOL RemovePingyHost(CPingyHost *host,int index=-1); 88 BOOL RemovePingyHost(CPingyHost *host,int index=-1);
87 BOOL UpdatePingyHost(CPingyHost *host,int index=-1); 89 BOOL UpdatePingyHost(CPingyHost *host,int index=-1);
88 BOOL AddPingyHost(CPingyHost *host); 90 BOOL AddPingyHost(CPingyHost *host);
89 CHostList m_Hosts; 91 CHostList m_Hosts;
90 enum{ 92 enum{
91 subitemHost = 0, subitemIP, subitemMin,subitemAvg,subitemMax, subitemPacketloss 93 subitemHost = 0, subitemIP, subitemMin,subitemAvg,subitemMax, subitemPacketloss
92 }; 94 };
93 DWORD m_TimeOut; 95 DWORD m_TimeOut;
94 UINT m_PingSize; 96 UINT m_PingSize;
95 UINT m_PingsPerHost; 97 UINT m_PingsPerHost;
96 CDragPad * m_DragPad; 98 CDragPad * m_DragPad;
97 ~CDipstickDlg(); 99 ~CDipstickDlg();
98 CDipstickDlg(CWnd* pParent = NULL);// standard constructor 100 CDipstickDlg(CWnd* pParent = NULL);// standard constructor
99 101
100// Dialog Data 102// Dialog Data
101 //{{AFX_DATA(CDipstickDlg) 103 //{{AFX_DATA(CDipstickDlg)
102 enum { IDD = IDD_DIPSTICK_DIALOG }; 104 enum { IDD = IDD_DIPSTICK_DIALOG };
103 CButtonm_AdvancedCtl; 105 CButtonm_AdvancedCtl;
104 CButtonm_HelpCtl; 106 CButtonm_HelpCtl;
105 CButtonm_ExitCtl; 107 CButtonm_ExitCtl;
106 CButtonm_OptionsCtl; 108 CButtonm_OptionsCtl;
107 CButtonm_ManualPingCtl; 109 CButtonm_ManualPingCtl;
108 CButtonm_RemoveCtl; 110 CButtonm_RemoveCtl;
109 CButtonm_RepingAllCtl; 111 CButtonm_RepingAllCtl;
110 CButtonm_RepingCtl; 112 CButtonm_RepingCtl;
111 CButtonm_ClearListCtl; 113 CButtonm_ClearListCtl;
112 CListCtrlm_HostList; 114 CListCtrlm_HostList;
113 //}}AFX_DATA 115 //}}AFX_DATA
114 116
115 // ClassWizard generated virtual function overrides 117 // ClassWizard generated virtual function overrides
116 //{{AFX_VIRTUAL(CDipstickDlg) 118 //{{AFX_VIRTUAL(CDipstickDlg)
117 protected: 119 protected:
118 virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support 120 virtual void DoDataExchange(CDataExchange* pDX);// DDX/DDV support
119 virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 121 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
120 //}}AFX_VIRTUAL 122 //}}AFX_VIRTUAL
121 123
122// Implementation 124// Implementation
123protected: 125protected:
124 HICON m_hIcon; 126 HICON m_hIcon;
125 127
126 // Generated message map functions 128 // Generated message map functions
127 //{{AFX_MSG(CDipstickDlg) 129 //{{AFX_MSG(CDipstickDlg)
128 virtual BOOL OnInitDialog(); 130 virtual BOOL OnInitDialog();
129 afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 131 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
130 afx_msg void OnPaint(); 132 afx_msg void OnPaint();
131 afx_msg HCURSOR OnQueryDragIcon(); 133 afx_msg HCURSOR OnQueryDragIcon();
132 afx_msg void OnDestroy(); 134 afx_msg void OnDestroy();
133 afx_msg void OnOptions(); 135 afx_msg void OnOptions();
134 afx_msg LRESULT OnUrlPing(WPARAM,LPARAM); 136 afx_msg LRESULT OnUrlPing(WPARAM,LPARAM);
135 afx_msg LRESULT OnActivityCount(WPARAM,LPARAM); 137 afx_msg LRESULT OnActivityCount(WPARAM,LPARAM);
136 afx_msg LRESULT OnUpdateHostData(WPARAM,LPARAM); 138 afx_msg LRESULT OnUpdateHostData(WPARAM,LPARAM);
137 afx_msg LRESULT OnHTMLTransfer(WPARAM,LPARAM); 139 afx_msg LRESULT OnHTMLTransfer(WPARAM,LPARAM);
138 afx_msg void OnColumnclickHostlist(NMHDR* pNMHDR, LRESULT* pResult); 140 afx_msg void OnColumnclickHostlist(NMHDR* pNMHDR, LRESULT* pResult);
139 afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos); 141 afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
140 afx_msg void OnDragpadOptions(); 142 afx_msg void OnDragpadOptions();
141 afx_msg void OnDragpadShowmainwindow(); 143 afx_msg void OnDragpadShowmainwindow();
142 afx_msg void OnDragpadHelp(); 144 afx_msg void OnDragpadHelp();
143 afx_msg void OnDragpadAbout(); 145 afx_msg void OnDragpadAbout();
144 afx_msg void OnDragpadExit(); 146 afx_msg void OnDragpadExit();
145 virtual void OnOK(); 147 virtual void OnOK();
146 virtual void OnCancel(); 148 virtual void OnCancel();
147 afx_msg void OnManualping(); 149 afx_msg void OnManualping();
148 afx_msg void OnDragpadManualping(); 150 afx_msg void OnDragpadManualping();
149 afx_msg void OnDragpadRepingAll(); 151 afx_msg void OnDragpadRepingAll();
150 afx_msg void OnDragpadRemoveAll(); 152 afx_msg void OnDragpadRemoveAll();
151 afx_msg void OnReping(); 153 afx_msg void OnReping();
152 afx_msg void OnRepingall(); 154 afx_msg void OnRepingall();
153 afx_msg void OnClear(); 155 afx_msg void OnClear();
154 afx_msg void OnInsertitemHostlist(NMHDR* pNMHDR, LRESULT* pResult); 156 afx_msg void OnInsertitemHostlist(NMHDR* pNMHDR, LRESULT* pResult);
155 afx_msg void OnDeleteitemHostlist(NMHDR* pNMHDR, LRESULT* pResult); 157 afx_msg void OnDeleteitemHostlist(NMHDR* pNMHDR, LRESULT* pResult);
156 afx_msg void OnDeleteallitemsHostlist(NMHDR* pNMHDR, LRESULT* pResult); 158 afx_msg void OnDeleteallitemsHostlist(NMHDR* pNMHDR, LRESULT* pResult);
157 afx_msg void OnExit(); 159 afx_msg void OnExit();
158 afx_msg void OnItemchangedHostlist(NMHDR* pNMHDR, LRESULT* pResult); 160 afx_msg void OnItemchangedHostlist(NMHDR* pNMHDR, LRESULT* pResult);
159 afx_msg void OnRemove(); 161 afx_msg void OnRemove();
160 afx_msg void OnRclickHostlist(NMHDR* pNMHDR, LRESULT* pResult); 162 afx_msg void OnRclickHostlist(NMHDR* pNMHDR, LRESULT* pResult);
161 afx_msg void OnHostListReping(); 163 afx_msg void OnHostListReping();
162 afx_msg void OnHostListRemove(); 164 afx_msg void OnHostListRemove();
163 afx_msg void OnHostListRepingAll(); 165 afx_msg void OnHostListRepingAll();
164 afx_msg void OnHostListRemoveAll(); 166 afx_msg void OnHostListRemoveAll();
165 afx_msg void OnHostListOpenURL(); 167 afx_msg void OnHostListOpenURL();
166 afx_msg void OnHostListProperties(); 168 afx_msg void OnHostListProperties();
167 afx_msg void OnDblclkHostlist(NMHDR* pNMHDR, LRESULT* pResult); 169 afx_msg void OnDblclkHostlist(NMHDR* pNMHDR, LRESULT* pResult);
168 afx_msg void OnClose(); 170 afx_msg void OnClose();
169 afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); 171 afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
170 afx_msg void OnSize(UINT nType, int cx, int cy); 172 afx_msg void OnSize(UINT nType, int cx, int cy);
171 afx_msg void OnHelp(); 173 afx_msg void OnHelp();
172 afx_msg void OnBegindragHostlist(NMHDR* pNMHDR, LRESULT* pResult); 174 afx_msg void OnBegindragHostlist(NMHDR* pNMHDR, LRESULT* pResult);
173 afx_msg void OnPasteurl(); 175 afx_msg void OnPasteurl();
174 afx_msg void OnHostlistCopyurl(); 176 afx_msg void OnHostlistCopyurl();
175 afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo); 177 afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
176 afx_msg void OnDropFiles(HDROP hDropInfo); 178 afx_msg void OnDropFiles(HDROP hDropInfo);
177 afx_msg void OnAdvanced(); 179 afx_msg void OnAdvanced();
178 afx_msg void OnAdvancedExportlist(); 180 afx_msg void OnAdvancedExportlist();
179 afx_msg void OnAdvancedImportlist(); 181 afx_msg void OnAdvancedImportlist();
180 afx_msg void OnDragpadAdvancedExportlist(); 182 afx_msg void OnDragpadAdvancedExportlist();
181 afx_msg void OnDragpadAdvancedImportlist(); 183 afx_msg void OnDragpadAdvancedImportlist();
182 //}}AFX_MSG 184 //}}AFX_MSG
183 DECLARE_MESSAGE_MAP() 185 DECLARE_MESSAGE_MAP()
184}; 186};
diff --git a/dipstick.rc b/dipstick.rc
index 55f9fde..8797946 100644
--- a/dipstick.rc
+++ b/dipstick.rc
@@ -1,567 +1,567 @@
1//Microsoft Developer Studio generated resource script. 1//Microsoft Developer Studio generated resource script.
2// 2//
3#include "resource.h" 3#include "resource.h"
4 4
5#define APSTUDIO_READONLY_SYMBOLS 5#define APSTUDIO_READONLY_SYMBOLS
6///////////////////////////////////////////////////////////////////////////// 6/////////////////////////////////////////////////////////////////////////////
7// 7//
8// Generated from the TEXTINCLUDE 2 resource. 8// Generated from the TEXTINCLUDE 2 resource.
9// 9//
10#include "afxres.h" 10#include "afxres.h"
11 11
12///////////////////////////////////////////////////////////////////////////// 12/////////////////////////////////////////////////////////////////////////////
13#undef APSTUDIO_READONLY_SYMBOLS 13#undef APSTUDIO_READONLY_SYMBOLS
14 14
15///////////////////////////////////////////////////////////////////////////// 15/////////////////////////////////////////////////////////////////////////////
16// English (U.S.) resources 16// English (U.S.) resources
17 17
18#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 18#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19#ifdef _WIN32 19#ifdef _WIN32
20LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 20LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21#pragma code_page(1252) 21#pragma code_page(1252)
22#endif //_WIN32 22#endif //_WIN32
23 23
24#ifdef APSTUDIO_INVOKED 24#ifdef APSTUDIO_INVOKED
25///////////////////////////////////////////////////////////////////////////// 25/////////////////////////////////////////////////////////////////////////////
26// 26//
27// TEXTINCLUDE 27// TEXTINCLUDE
28// 28//
29 29
301 TEXTINCLUDE DISCARDABLE 301 TEXTINCLUDE DISCARDABLE
31BEGIN 31BEGIN
32 "resource.h\0" 32 "resource.h\0"
33END 33END
34 34
352 TEXTINCLUDE DISCARDABLE 352 TEXTINCLUDE DISCARDABLE
36BEGIN 36BEGIN
37 "#include ""afxres.h""\r\n" 37 "#include ""afxres.h""\r\n"
38 "\0" 38 "\0"
39END 39END
40 40
413 TEXTINCLUDE DISCARDABLE 413 TEXTINCLUDE DISCARDABLE
42BEGIN 42BEGIN
43 "#define _AFX_NO_SPLITTER_RESOURCES\r\n" 43 "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
44 "#define _AFX_NO_OLE_RESOURCES\r\n" 44 "#define _AFX_NO_OLE_RESOURCES\r\n"
45 "#define _AFX_NO_TRACKER_RESOURCES\r\n" 45 "#define _AFX_NO_TRACKER_RESOURCES\r\n"
46 "#define _AFX_NO_PROPERTY_RESOURCES\r\n" 46 "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
47 "\r\n" 47 "\r\n"
48 "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" 48 "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
49 "#ifdef _WIN32\r\n" 49 "#ifdef _WIN32\r\n"
50 "LANGUAGE 9, 1\r\n" 50 "LANGUAGE 9, 1\r\n"
51 "#pragma code_page(1252)\r\n" 51 "#pragma code_page(1252)\r\n"
52 "#endif\r\n" 52 "#endif\r\n"
53 "#include ""res\\Dipstick.rc2"" // non-Microsoft Visual C++ edited resources\r\n" 53 "#include ""res\\Dipstick.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
54 "#include ""afxres.rc"" // Standard components\r\n" 54 "#include ""afxres.rc"" // Standard components\r\n"
55 "#endif\0" 55 "#endif\0"
56END 56END
57 57
58#endif // APSTUDIO_INVOKED 58#endif // APSTUDIO_INVOKED
59 59
60 60
61///////////////////////////////////////////////////////////////////////////// 61/////////////////////////////////////////////////////////////////////////////
62// 62//
63// Icon 63// Icon
64// 64//
65 65
66// Icon with lowest ID value placed first to ensure application icon 66// Icon with lowest ID value placed first to ensure application icon
67// remains consistent on all systems. 67// remains consistent on all systems.
68IDR_MAINFRAME ICON DISCARDABLE "res\\Dipstick.ico" 68IDR_MAINFRAME ICON DISCARDABLE "res\\Dipstick.ico"
69IDI_PINGING ICON DISCARDABLE "res\\pinging.ico" 69IDI_PINGING ICON DISCARDABLE "res\\pinging.ico"
70IDI_PENDING ICON DISCARDABLE "res\\pending.ico" 70IDI_PENDING ICON DISCARDABLE "res\\pending.ico"
71IDI_COMPLETED ICON DISCARDABLE "res\\complete.ico" 71IDI_COMPLETED ICON DISCARDABLE "res\\complete.ico"
72IDI_UNREACHABLE ICON DISCARDABLE "res\\unreach.ico" 72IDI_UNREACHABLE ICON DISCARDABLE "res\\unreach.ico"
73 73
74///////////////////////////////////////////////////////////////////////////// 74/////////////////////////////////////////////////////////////////////////////
75// 75//
76// Dialog 76// Dialog
77// 77//
78 78
79IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 213, 61 79IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 213, 61
80STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU 80STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
81CAPTION "About Dipstick" 81CAPTION "About Dipstick"
82FONT 8, "MS Sans Serif" 82FONT 8, "MS Sans Serif"
83BEGIN 83BEGIN
84 ICON IDR_MAINFRAME,IDC_STATIC,11,17,21,20 84 ICON IDR_MAINFRAME,IDC_STATIC,11,17,21,20
85 LTEXT "Dipstick, Version 3.0",IDC_STATIC,40,7,89,8, 85 LTEXT "Dipstick, Version 3.1-trunk",IDC_STATIC,40,7,89,8,SS_NOPREFIX
86 SS_NOPREFIX 86 LTEXT "Copyright © 1996-2005 Klever Group",IDC_STATIC,40,25,
87 LTEXT "Copyright © 1996-2004 Klever Group", 87 166,8
88 IDC_STATIC,40,25,166,8
89 DEFPUSHBUTTON "OK",IDOK,174,7,32,14,WS_GROUP 88 DEFPUSHBUTTON "OK",IDOK,174,7,32,14,WS_GROUP
90 PUSHBUTTON "http://www.klever.net/",IDC_KLEVERNET,40,40,91,14 89 PUSHBUTTON "http://www.klever.net/",IDC_KLEVERNET,40,40,91,14
91END 90END
92 91
93IDD_DIPSTICK_DIALOG DIALOGEX 0, 0, 419, 152 92IDD_DIPSTICK_DIALOG DIALOGEX 0, 0, 419, 152
94STYLE DS_3DLOOK | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME 93STYLE DS_3DLOOK | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
95EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP | 94EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP |
96 WS_EX_APPWINDOW 95 WS_EX_APPWINDOW
97CAPTION " Dipstick 3.0" 96CAPTION " Dipstick 3.1-trunk"
98FONT 8, "MS Sans Serif", 0, 0, 0x1 97FONT 8, "MS Sans Serif", 0, 0, 0x1
99BEGIN 98BEGIN
100 CONTROL "List1",IDC_HOSTLIST,"SysListView32",LVS_REPORT | 99 CONTROL "List1",IDC_HOSTLIST,"SysListView32",LVS_REPORT |
101 LVS_SORTASCENDING | LVS_AUTOARRANGE | WS_BORDER | 100 LVS_SORTASCENDING | LVS_AUTOARRANGE | WS_BORDER |
102 WS_TABSTOP,8,8,349,136,WS_EX_CLIENTEDGE 101 WS_TABSTOP,8,8,349,136,WS_EX_CLIENTEDGE
103 PUSHBUTTON "&Manual Ping",IDC_MANUALPING,361,8,50,14 102 PUSHBUTTON "&Manual Ping",IDC_MANUALPING,361,8,50,14
104 PUSHBUTTON "&Reping",IDC_REPING,361,23,50,14,WS_DISABLED 103 PUSHBUTTON "&Reping",IDC_REPING,361,23,50,14,WS_DISABLED
105 PUSHBUTTON "Reping &All",IDC_REPINGALL,361,38,50,14,WS_DISABLED 104 PUSHBUTTON "Reping &All",IDC_REPINGALL,361,38,50,14,WS_DISABLED
106 PUSHBUTTON "R&emove",IDC_REMOVE,361,53,50,14,WS_DISABLED 105 PUSHBUTTON "R&emove",IDC_REMOVE,361,53,50,14,WS_DISABLED
107 PUSHBUTTON "Remove A&ll",IDC_CLEAR,361,68,50,14,WS_DISABLED 106 PUSHBUTTON "Remove A&ll",IDC_CLEAR,361,68,50,14,WS_DISABLED
108 PUSHBUTTON "&Help",ID_HELP,361,99,50,14 107 PUSHBUTTON "&Help",ID_HELP,361,99,50,14
109 PUSHBUTTON "&Options",IDC_OPTIONS,361,114,50,14 108 PUSHBUTTON "&Options",IDC_OPTIONS,361,114,50,14
110 PUSHBUTTON "E&xit Dipstick",IDC_EXIT,361,129,50,14 109 PUSHBUTTON "E&xit Dipstick",IDC_EXIT,361,129,50,14
111 PUSHBUTTON "",IDCANCEL,411,2,6,6,NOT WS_VISIBLE | WS_DISABLED 110 PUSHBUTTON "",IDCANCEL,411,2,6,6,NOT WS_VISIBLE | WS_DISABLED
112 PUSHBUTTON "Ad&vanced",IDC_ADVANCED,361,83,50,11 111 PUSHBUTTON "Ad&vanced",IDC_ADVANCED,361,83,50,11
113END 112END
114 113
115IDD_DRAGPAD DIALOGEX 0, 0, 53, 33 114IDD_DRAGPAD DIALOGEX 0, 0, 53, 33
116STYLE DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION 115STYLE DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION
117EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP 116EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP
118CAPTION " Drag URL here" 117CAPTION " Drag URL here"
119FONT 8, "MS Sans Serif", 0, 0, 0x1 118FONT 8, "MS Sans Serif", 0, 0, 0x1
120BEGIN 119BEGIN
121 CONTROL "Animate1",IDC_DNDTARGET,"SysAnimate32",WS_TABSTOP,0,0, 120 CONTROL "Animate1",IDC_DNDTARGET,"SysAnimate32",WS_TABSTOP,0,0,
122 53,33 121 53,33
123 PUSHBUTTON "",IDCANCEL,49,0,6,6,NOT WS_VISIBLE | WS_DISABLED 122 PUSHBUTTON "",IDCANCEL,49,0,6,6,NOT WS_VISIBLE | WS_DISABLED
124 DEFPUSHBUTTON "",IDOK,47,27,6,6,NOT WS_VISIBLE | WS_DISABLED 123 DEFPUSHBUTTON "",IDOK,47,27,6,6,NOT WS_VISIBLE | WS_DISABLED
125END 124END
126 125
127IDD_OPTIONS DIALOGEX 0, 0, 179, 154 126IDD_OPTIONS DIALOGEX 0, 0, 179, 154
128STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION 127STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION
129EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP 128EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP
130CAPTION "Dipstick Options" 129CAPTION "Dipstick Options"
131FONT 8, "MS Sans Serif", 0, 0, 0x1 130FONT 8, "MS Sans Serif", 0, 0, 0x1
132BEGIN 131BEGIN
133 LTEXT "Number of pings per &host",IDC_STATIC,50,9,122,10 132 LTEXT "Number of pings per &host",IDC_STATIC,50,9,122,10
134 EDITTEXT IDC_NPINGS,7,7,35,14,ES_AUTOHSCROLL 133 EDITTEXT IDC_NPINGS,7,7,35,14,ES_AUTOHSCROLL
135 CONTROL "Spin1",IDC_SPINPINGS,"msctls_updown32",UDS_WRAP | 134 CONTROL "Spin1",IDC_SPINPINGS,"msctls_updown32",UDS_WRAP |
136 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | 135 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
137 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,7,11,14 136 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,7,11,14
138 LTEXT "&Maximum number of threads",IDC_STATIC,50,23,122,10 137 LTEXT "&Maximum number of threads",IDC_STATIC,50,23,122,10
139 EDITTEXT IDC_MAXPINGS,7,21,35,14,ES_AUTOHSCROLL 138 EDITTEXT IDC_MAXPINGS,7,21,35,14,ES_AUTOHSCROLL
140 CONTROL "Spin1",IDC_SPINMAXPINGS,"msctls_updown32",UDS_WRAP | 139 CONTROL "Spin1",IDC_SPINMAXPINGS,"msctls_updown32",UDS_WRAP |
141 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | 140 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
142 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,21,11,14 141 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,21,11,14
143 LTEXT "Ping &timeout",IDC_STATIC,50,37,122,10 142 LTEXT "Ping &timeout",IDC_STATIC,50,37,122,10
144 EDITTEXT IDC_TIMEOUT,7,35,35,14,ES_AUTOHSCROLL 143 EDITTEXT IDC_TIMEOUT,7,35,35,14,ES_AUTOHSCROLL
145 CONTROL "Spin1",IDC_SPINTIMEOUT,"msctls_updown32",UDS_WRAP | 144 CONTROL "Spin1",IDC_SPINTIMEOUT,"msctls_updown32",UDS_WRAP |
146 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | 145 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
147 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,35,11,14 146 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,35,11,14
148 LTEXT "&Interval between pings",IDC_STATIC,50,51,122,10 147 LTEXT "&Interval between pings",IDC_STATIC,50,51,122,10
149 EDITTEXT IDC_INTERVAL,7,49,35,14,ES_AUTOHSCROLL 148 EDITTEXT IDC_INTERVAL,7,49,35,14,ES_AUTOHSCROLL
150 CONTROL "Spin1",IDC_SPINTERVAL,"msctls_updown32",UDS_WRAP | 149 CONTROL "Spin1",IDC_SPINTERVAL,"msctls_updown32",UDS_WRAP |
151 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | 150 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
152 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,49,11,14 151 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,49,11,14
153 LTEXT "Ping &size",IDC_STATIC,50,65,122,10 152 LTEXT "Ping &size",IDC_STATIC,50,65,122,10
154 EDITTEXT IDC_PACKETSIZE,7,63,35,14,ES_AUTOHSCROLL 153 EDITTEXT IDC_PACKETSIZE,7,63,35,14,ES_AUTOHSCROLL
155 CONTROL "Spin1",IDC_SPINSIZE,"msctls_updown32",UDS_WRAP | 154 CONTROL "Spin1",IDC_SPINSIZE,"msctls_updown32",UDS_WRAP |
156 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | 155 UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
157 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,63,11,14 156 UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,63,11,14
158 CONTROL "Test i&nnermost URL",IDC_MSWORKAROUND,"Button", 157 CONTROL "Test i&nnermost URL",IDC_MSWORKAROUND,"Button",
159 BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,7,80,165,8 158 BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,7,80,165,8
160 DEFPUSHBUTTON "OK",IDOK,31,133,50,14 159 DEFPUSHBUTTON "OK",IDOK,31,133,50,14
161 PUSHBUTTON "Cancel",IDCANCEL,97,133,50,14 160 PUSHBUTTON "Cancel",IDCANCEL,97,133,50,14
162 CONTROL "Come up with the &best URL",IDC_AUTOBEST,"Button", 161 CONTROL "Come up with the &best URL",IDC_AUTOBEST,"Button",
163 BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,16,90,156,8 162 BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,16,90,156,8
164 CONTROL "When selecting URLs, enable smart adjust", 163 CONTROL "When selecting URLs, enable smart adjust",
165 IDC_SMARTADJUST,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | 164 IDC_SMARTADJUST,"Button",BS_AUTOCHECKBOX | BS_NOTIFY |
166 WS_TABSTOP,7,100,165,8 165 WS_TABSTOP,7,100,165,8
167 CONTROL "When smart-adjusting, use innermost URL",IDC_ADJUSTINN, 166 CONTROL "When smart-adjusting, use innermost URL",IDC_ADJUSTINN,
168 "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,16,110, 167 "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,16,110,
169 156,8 168 156,8
170 CONTROL "Ignore relative URLs when dragging selection.", 169 CONTROL "Ignore relative URLs when dragging selection.",
171 IDC_IGNORELA,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | 170 IDC_IGNORELA,"Button",BS_AUTOCHECKBOX | BS_NOTIFY |
172 WS_TABSTOP,7,120,165,8 171 WS_TABSTOP,7,120,165,8
173END 172END
174 173
175IDD_MANUALHOST DIALOGEX 0, 0, 187, 54 174IDD_MANUALHOST DIALOGEX 0, 0, 187, 54
176STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION 175STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION
177EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE 176EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
178CAPTION " Manually Test Host" 177CAPTION " Manually Test Host"
179FONT 8, "MS Sans Serif", 0, 0, 0x1 178FONT 8, "MS Sans Serif", 0, 0, 0x1
180BEGIN 179BEGIN
181 LTEXT "Enter &URL, host name or ip address:",IDC_STATIC,7,7, 180 LTEXT "Enter &URL, host name or ip address:",IDC_STATIC,7,7,
182 129,8 181 129,8
183 EDITTEXT IDC_HOST,7,16,173,14,ES_LOWERCASE | ES_AUTOHSCROLL 182 EDITTEXT IDC_HOST,7,16,173,14,ES_LOWERCASE | ES_AUTOHSCROLL
184 DEFPUSHBUTTON "OK",IDOK,35,33,50,14 183 DEFPUSHBUTTON "OK",IDOK,35,33,50,14
185 PUSHBUTTON "Cancel",IDCANCEL,101,33,50,14 184 PUSHBUTTON "Cancel",IDCANCEL,101,33,50,14
186END 185END
187 186
188IDD_PROPS DIALOGEX 0, 0, 209, 99 187IDD_PROPS DIALOGEX 0, 0, 209, 99
189STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION 188STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION
190EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE 189EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
191CAPTION " Properties" 190CAPTION " Properties"
192FONT 8, "MS Sans Serif", 0, 0, 0x1 191FONT 8, "MS Sans Serif", 0, 0, 0x1
193BEGIN 192BEGIN
194 DEFPUSHBUTTON "OK",IDOK,152,78,50,14 193 DEFPUSHBUTTON "OK",IDOK,152,78,50,14
195 LTEXT "URL:",IDC_URLCAPTION,7,7,18,8,SS_NOTIFY 194 LTEXT "URL:",IDC_URLCAPTION,7,7,18,8,SS_NOTIFY
196 LTEXT "..",IDC_URL,60,7,142,8,SS_NOPREFIX | SS_NOTIFY 195 LTEXT "..",IDC_URL,60,7,142,8,SS_NOPREFIX | SS_NOTIFY
197 LTEXT "Host name:",IDC_HOSTCAPTION,7,17,37,8,SS_NOTIFY 196 LTEXT "Host name:",IDC_HOSTCAPTION,7,17,37,8,SS_NOTIFY
198 LTEXT "..",IDC_HOST,60,17,142,8,SS_NOPREFIX | SS_NOTIFY 197 LTEXT "..",IDC_HOST,60,17,142,8,SS_NOPREFIX | SS_NOTIFY
199 LTEXT "IP:",IDC_IPCAPTION,7,27,10,8,SS_NOTIFY 198 LTEXT "IP:",IDC_IPCAPTION,7,27,10,8,SS_NOTIFY
200 LTEXT "..",IDC_IP,60,27,142,8,SS_NOTIFY 199 LTEXT "..",IDC_IP,60,27,142,8,SS_NOTIFY
201 LTEXT "Ping times (min/avg/max):",IDC_TIMESCAPTION,7,37,53,17, 200 LTEXT "Ping times (min/avg/max):",IDC_TIMESCAPTION,7,37,53,17,
202 SS_NOTIFY 201 SS_NOTIFY
203 LTEXT "../../..",IDC_TIMES,60,45,66,8,SS_NOTIFY 202 LTEXT "../../..",IDC_TIMES,60,45,66,8,SS_NOTIFY
204 LTEXT "Packet loss:",IDC_LOSSCAPTION,7,56,40,8,SS_NOTIFY 203 LTEXT "Packet loss:",IDC_LOSSCAPTION,7,56,40,8,SS_NOTIFY
205 LTEXT "..",IDC_LOSS,60,56,66,8,SS_NOPREFIX | SS_NOTIFY 204 LTEXT "..",IDC_LOSS,60,56,66,8,SS_NOPREFIX | SS_NOTIFY
206 LTEXT "Status:",IDC_STATUSCAPTION,7,66,23,8,SS_NOTIFY 205 LTEXT "Status:",IDC_STATUSCAPTION,7,66,23,8,SS_NOTIFY
207 LTEXT "..",IDC_STATUS,60,66,142,8,SS_NOPREFIX | SS_NOTIFY 206 LTEXT "..",IDC_STATUS,60,66,142,8,SS_NOPREFIX | SS_NOTIFY
208 PUSHBUTTON "&Open URL",IDC_OPENURL,7,78,50,14 207 PUSHBUTTON "&Open URL",IDC_OPENURL,7,78,50,14
209 ICON IDR_MAINFRAME,IDC_STATE,166,42,18,20,SS_NOTIFY | 208 ICON IDR_MAINFRAME,IDC_STATE,166,42,18,20,SS_NOTIFY |
210 SS_CENTERIMAGE | SS_REALSIZEIMAGE 209 SS_CENTERIMAGE | SS_REALSIZEIMAGE
211 PUSHBUTTON "&Copy URL",IDC_COPYURL,60,78,50,14 210 PUSHBUTTON "&Copy URL",IDC_COPYURL,60,78,50,14
212END 211END
213 212
214IDD_AUTOBEST DIALOGEX 0, 0, 287, 82 213IDD_AUTOBEST DIALOGEX 0, 0, 287, 82
215STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP | 214STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP |
216 WS_CAPTION 215 WS_CAPTION
217EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE 216EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
218CAPTION " Dipstick - report" 217CAPTION " Dipstick - report"
219FONT 8, "MS Sans Serif", 0, 0, 0x1 218FONT 8, "MS Sans Serif", 0, 0, 0x1
220BEGIN 219BEGIN
221 DEFPUSHBUTTON "Open this URL",IDOK,110,47,68,14 220 DEFPUSHBUTTON "Open this URL",IDOK,110,47,68,14
222 PUSHBUTTON "&Next Location",IDC_NEXT,188,47,68,14 221 PUSHBUTTON "&Next Location",IDC_NEXT,188,47,68,14
223 PUSHBUTTON "&Previous Location",IDC_PREV,32,47,68,14 222 PUSHBUTTON "&Previous Location",IDC_PREV,32,47,68,14
224 CTEXT "..",IDC_URL,7,7,273,14,SS_NOPREFIX,WS_EX_DLGMODALFRAME | 223 CTEXT "..",IDC_URL,7,7,273,14,SS_NOPREFIX,WS_EX_DLGMODALFRAME |
225 WS_EX_CLIENTEDGE 224 WS_EX_CLIENTEDGE
226 LTEXT "Average Response Time, milliseconds:",IDC_STATIC,7,25, 225 LTEXT "Average Response Time, milliseconds:",IDC_STATIC,7,25,
227 136,8 226 136,8
228 LTEXT "..",IDC_RTT,143,25,68,8 227 LTEXT "..",IDC_RTT,143,25,68,8
229 LTEXT "Packet Loss:",IDC_STATIC,7,36,136,8 228 LTEXT "Packet Loss:",IDC_STATIC,7,36,136,8
230 LTEXT "..",IDC_PKTLOSS,143,36,68,8 229 LTEXT "..",IDC_PKTLOSS,143,36,68,8
231 PUSHBUTTON "Cancel",IDCANCEL,118,63,50,12 230 PUSHBUTTON "Cancel",IDCANCEL,118,63,50,12
232 CONTROL "Animate1",IDC_DROPSOURCE,"SysAnimate32",ACS_CENTER | 231 CONTROL "Animate1",IDC_DROPSOURCE,"SysAnimate32",ACS_CENTER |
233 ACS_AUTOPLAY,257,23,23,22,WS_EX_DLGMODALFRAME | 232 ACS_AUTOPLAY,257,23,23,22,WS_EX_DLGMODALFRAME |
234 WS_EX_STATICEDGE 233 WS_EX_STATICEDGE
235 PUSHBUTTON "&Copy URL",IDC_COPYURL,211,23,39,22,BS_CENTER | 234 PUSHBUTTON "&Copy URL",IDC_COPYURL,211,23,39,22,BS_CENTER |
236 BS_VCENTER | BS_MULTILINE 235 BS_VCENTER | BS_MULTILINE
237END 236END
238 237
239IDD_URLS DIALOGEX 0, 0, 176, 192 238IDD_URLS DIALOGEX 0, 0, 176, 192
240STYLE DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_MAXIMIZEBOX | WS_POPUP | 239STYLE DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_MAXIMIZEBOX | WS_POPUP |
241 WS_CAPTION | WS_SYSMENU | WS_THICKFRAME 240 WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
242EXSTYLE WS_EX_CLIENTEDGE 241EXSTYLE WS_EX_CLIENTEDGE
243CAPTION " Select URLs of interest" 242CAPTION " Select URLs of interest"
244FONT 8, "MS Sans Serif", 0, 0, 0x1 243FONT 8, "MS Sans Serif", 0, 0, 0x1
245BEGIN 244BEGIN
246 LISTBOX IDC_URLS,7,7,162,146,LBS_SORT | LBS_NOINTEGRALHEIGHT | 245 LISTBOX IDC_URLS,7,7,162,146,LBS_SORT | LBS_NOINTEGRALHEIGHT |
247 LBS_EXTENDEDSEL | NOT WS_BORDER | WS_VSCROLL | 246 LBS_EXTENDEDSEL | NOT WS_BORDER | WS_VSCROLL |
248 WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE 247 WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE
249 DEFPUSHBUTTON "OK",IDOK,7,155,50,14 248 DEFPUSHBUTTON "OK",IDOK,7,155,50,14
250 PUSHBUTTON "Cancel",IDCANCEL,7,171,50,14 249 PUSHBUTTON "Cancel",IDCANCEL,7,171,50,14
251 CONTROL "&Smart adjust selection",IDC_DOADJUST,"Button", 250 CONTROL "&Smart adjust selection",IDC_DOADJUST,"Button",
252 BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,63,157,106,10 251 BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,63,157,106,10
253 CONTROL "Adjust by &innermost URL",IDC_ADJUSTINN,"Button", 252 CONTROL "Adjust by &innermost URL",IDC_ADJUSTINN,"Button",
254 BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,63, 253 BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,63,
255 175,106,10 254 175,106,10
256END 255END
257 256
258 257
259#ifndef _MAC 258#ifndef _MAC
260///////////////////////////////////////////////////////////////////////////// 259/////////////////////////////////////////////////////////////////////////////
261// 260//
262// Version 261// Version
263// 262//
264 263
265VS_VERSION_INFO VERSIONINFO 264VS_VERSION_INFO VERSIONINFO
266 FILEVERSION 3,0,0,0 265 FILEVERSION 3,1,0,0
267 PRODUCTVERSION 3,0,0,0 266 PRODUCTVERSION 3,1,0,0
268 FILEFLAGSMASK 0x3fL 267 FILEFLAGSMASK 0x3fL
269#ifdef _DEBUG 268#ifdef _DEBUG
270 FILEFLAGS 0x9L 269 FILEFLAGS 0x9L
271#else 270#else
272 FILEFLAGS 0x8L 271 FILEFLAGS 0x8L
273#endif 272#endif
274 FILEOS 0x4L 273 FILEOS 0x4L
275 FILETYPE 0x1L 274 FILETYPE 0x1L
276 FILESUBTYPE 0x0L 275 FILESUBTYPE 0x0L
277BEGIN 276BEGIN
278 BLOCK "StringFileInfo" 277 BLOCK "StringFileInfo"
279 BEGIN 278 BEGIN
280 BLOCK "040904b0" 279 BLOCK "040904b0"
281 BEGIN 280 BEGIN
282 VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0" 281 VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0"
283 VALUE "FileDescription", "Dipstick, mirror locator\0" 282 VALUE "FileDescription", "Dipstick, mirror locator\0"
284 VALUE "FileVersion", "3, 0, 0, 0\0" 283 VALUE "FileVersion", "3, 1, 0, 0\0"
285 VALUE "InternalName", "DIPSTICK\0" 284 VALUE "InternalName", "DIPSTICK\0"
286 VALUE "LegalCopyright", "Copyright © 1996-2004 Klever Group (http://www.klever.net/)\0" 285 VALUE "LegalCopyright", "Copyright © 1996-2005 Klever Group (http://www.klever.net/)\0"
287 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0" 286 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
288 VALUE "OriginalFilename", "DIPSTICK.EXE\0" 287 VALUE "OriginalFilename", "DIPSTICK.EXE\0"
289 VALUE "ProductName", "Dipstick\0" 288 VALUE "ProductName", "Dipstick\0"
290 VALUE "ProductVersion", "3, 0, 0, 0\0" 289 VALUE "ProductVersion", "3, 1, 0, 0\0"
291 END 290 END
292 END 291 END
293 BLOCK "VarFileInfo" 292 BLOCK "VarFileInfo"
294 BEGIN 293 BEGIN
295 VALUE "Translation", 0x409, 1200 294 VALUE "Translation", 0x409, 1200
296 END 295 END
297END 296END
298 297
299#endif // !_MAC 298#endif // !_MAC
300 299
301 300
302///////////////////////////////////////////////////////////////////////////// 301/////////////////////////////////////////////////////////////////////////////
303// 302//
304// DESIGNINFO 303// DESIGNINFO
305// 304//
306 305
307#ifdef APSTUDIO_INVOKED 306#ifdef APSTUDIO_INVOKED
308GUIDELINES DESIGNINFO DISCARDABLE 307GUIDELINES DESIGNINFO DISCARDABLE
309BEGIN 308BEGIN
310 IDD_ABOUTBOX, DIALOG 309 IDD_ABOUTBOX, DIALOG
311 BEGIN 310 BEGIN
312 LEFTMARGIN, 7 311 LEFTMARGIN, 7
313 RIGHTMARGIN, 206 312 RIGHTMARGIN, 206
314 VERTGUIDE, 40 313 VERTGUIDE, 40
315 TOPMARGIN, 7 314 TOPMARGIN, 7
316 BOTTOMMARGIN, 54 315 BOTTOMMARGIN, 54
317 END 316 END
318 317
319 IDD_DIPSTICK_DIALOG, DIALOG 318 IDD_DIPSTICK_DIALOG, DIALOG
320 BEGIN 319 BEGIN
321 VERTGUIDE, 8 320 VERTGUIDE, 8
322 VERTGUIDE, 411 321 VERTGUIDE, 411
323 HORZGUIDE, 8 322 HORZGUIDE, 8
324 HORZGUIDE, 144 323 HORZGUIDE, 144
325 END 324 END
326 325
327 IDD_OPTIONS, DIALOG 326 IDD_OPTIONS, DIALOG
328 BEGIN 327 BEGIN
329 LEFTMARGIN, 7 328 LEFTMARGIN, 7
330 RIGHTMARGIN, 172 329 RIGHTMARGIN, 172
331 VERTGUIDE, 16 330 VERTGUIDE, 16
332 VERTGUIDE, 50 331 VERTGUIDE, 50
333 TOPMARGIN, 7 332 TOPMARGIN, 7
334 BOTTOMMARGIN, 147 333 BOTTOMMARGIN, 147
335 END 334 END
336 335
337 IDD_MANUALHOST, DIALOG 336 IDD_MANUALHOST, DIALOG
338 BEGIN 337 BEGIN
339 LEFTMARGIN, 7 338 LEFTMARGIN, 7
340 RIGHTMARGIN, 180 339 RIGHTMARGIN, 180
341 TOPMARGIN, 7 340 TOPMARGIN, 7
342 BOTTOMMARGIN, 47 341 BOTTOMMARGIN, 47
343 END 342 END
344 343
345 IDD_PROPS, DIALOG 344 IDD_PROPS, DIALOG
346 BEGIN 345 BEGIN
347 LEFTMARGIN, 7 346 LEFTMARGIN, 7
348 RIGHTMARGIN, 202 347 RIGHTMARGIN, 202
349 VERTGUIDE, 60 348 VERTGUIDE, 60
350 TOPMARGIN, 7 349 TOPMARGIN, 7
351 BOTTOMMARGIN, 92 350 BOTTOMMARGIN, 92
352 END 351 END
353 352
354 IDD_AUTOBEST, DIALOG 353 IDD_AUTOBEST, DIALOG
355 BEGIN 354 BEGIN
356 LEFTMARGIN, 7 355 LEFTMARGIN, 7
357 RIGHTMARGIN, 280 356 RIGHTMARGIN, 280
358 VERTGUIDE, 143 357 VERTGUIDE, 143
359 VERTGUIDE, 211 358 VERTGUIDE, 211
360 TOPMARGIN, 7 359 TOPMARGIN, 7
361 BOTTOMMARGIN, 75 360 BOTTOMMARGIN, 75
362 HORZGUIDE, 25 361 HORZGUIDE, 25
363 HORZGUIDE, 44 362 HORZGUIDE, 44
364 END 363 END
365 364
366 IDD_URLS, DIALOG 365 IDD_URLS, DIALOG
367 BEGIN 366 BEGIN
368 LEFTMARGIN, 7 367 LEFTMARGIN, 7
369 RIGHTMARGIN, 169 368 RIGHTMARGIN, 169
370 TOPMARGIN, 7 369 TOPMARGIN, 7
371 BOTTOMMARGIN, 185 370 BOTTOMMARGIN, 185
372 END 371 END
373END 372END
374#endif // APSTUDIO_INVOKED 373#endif // APSTUDIO_INVOKED
375 374
376 375
377///////////////////////////////////////////////////////////////////////////// 376/////////////////////////////////////////////////////////////////////////////
378// 377//
379// AVI 378// AVI
380// 379//
381 380
382IDR_DNDAVI AVI DISCARDABLE "res\\kdnd.avi" 381IDR_DNDAVI AVI DISCARDABLE "res\\kdnd.avi"
383IDR_DRAGAVI AVI DISCARDABLE "res\\kdragurl.avi" 382IDR_DRAGAVI AVI DISCARDABLE "res\\kdragurl.avi"
384 383
385///////////////////////////////////////////////////////////////////////////// 384/////////////////////////////////////////////////////////////////////////////
386// 385//
387// Menu 386// Menu
388// 387//
389 388
390IDR_MENU MENU DISCARDABLE 389IDR_MENU MENU DISCARDABLE
391BEGIN 390BEGIN
392 POPUP "Drag pad" 391 POPUP "Drag pad"
393 BEGIN 392 BEGIN
394 MENUITEM "&Manual Ping", ID_DRAGPAD_MANUALPING 393 MENUITEM "&Manual Ping", ID_DRAGPAD_MANUALPING
395 MENUITEM "&Paste URL(s)", ID_DRAGPAD_PASTEURL 394 MENUITEM "&Paste URL(s)", ID_DRAGPAD_PASTEURL
396 MENUITEM "Reping &All", ID_DRAGPAD_REPINGALL 395 MENUITEM "Reping &All", ID_DRAGPAD_REPINGALL
397 MENUITEM "Remove A&ll", ID_DRAGPAD_REMOVEALL 396 MENUITEM "Remove A&ll", ID_DRAGPAD_REMOVEALL
398 MENUITEM SEPARATOR 397 MENUITEM SEPARATOR
399 MENUITEM "&Options", ID_DRAGPAD_OPTIONS 398 MENUITEM "&Options", ID_DRAGPAD_OPTIONS
400 MENUITEM "&Show main window", ID_DRAGPAD_SHOWMAINWINDOW 399 MENUITEM "&Show main window", ID_DRAGPAD_SHOWMAINWINDOW
401 POPUP "Ad&vanced" 400 POPUP "Ad&vanced"
402 BEGIN 401 BEGIN
403 MENUITEM "&Export List", ID_DRAGPAD_ADVANCED_EXPORTLIST 402 MENUITEM "&Export List", ID_DRAGPAD_ADVANCED_EXPORTLIST
404 403
405 MENUITEM "&Import List", ID_DRAGPAD_ADVANCED_IMPORTLIST 404 MENUITEM "&Import List", ID_DRAGPAD_ADVANCED_IMPORTLIST
406 405
407 END 406 END
408 MENUITEM SEPARATOR 407 MENUITEM SEPARATOR
409 MENUITEM "&Help", ID_DRAGPAD_HELP 408 MENUITEM "&Help", ID_DRAGPAD_HELP
410 MENUITEM "A&bout Dipstick", ID_DRAGPAD_ABOUT 409 MENUITEM "A&bout Dipstick", ID_DRAGPAD_ABOUT
411 MENUITEM "E&xit Dipstick", ID_DRAGPAD_EXIT 410 MENUITEM "E&xit Dipstick", ID_DRAGPAD_EXIT
412 END 411 END
413 POPUP "Host List" 412 POPUP "Host List"
414 BEGIN 413 BEGIN
415 MENUITEM "&Reping", ID_HOSTLIST_REPING 414 MENUITEM "&Reping", ID_HOSTLIST_REPING
416 MENUITEM "R&emove", ID_HOSTLIST_REMOVE 415 MENUITEM "R&emove", ID_HOSTLIST_REMOVE
417 MENUITEM "Open URL", ID_HOSTLIST_OPENURL 416 MENUITEM "Open URL", ID_HOSTLIST_OPENURL
418 MENUITEM "&Copy URL", ID_HOSTLIST_COPYURL 417 MENUITEM "&Copy URL", ID_HOSTLIST_COPYURL
419 MENUITEM SEPARATOR 418 MENUITEM SEPARATOR
420 MENUITEM "Reping &All", ID_HOSTLIST_REPINGALL 419 MENUITEM "Reping &All", ID_HOSTLIST_REPINGALL
421 MENUITEM "Remove A&ll", ID_HOSTLIST_REMOVEALL 420 MENUITEM "Remove A&ll", ID_HOSTLIST_REMOVEALL
422 MENUITEM SEPARATOR 421 MENUITEM SEPARATOR
423 MENUITEM "&Paste URL(s)", ID_HOSTLIST_PASTEURL 422 MENUITEM "&Paste URL(s)", ID_HOSTLIST_PASTEURL
424 MENUITEM "&Properties", ID_HOSTLIST_PROPERTIES 423 MENUITEM "&Properties", ID_HOSTLIST_PROPERTIES
425 END 424 END
426 POPUP "Advanced" 425 POPUP "Advanced"
427 BEGIN 426 BEGIN
428 MENUITEM "&Export List", ID_ADVANCED_EXPORTLIST 427 MENUITEM "&Export List", ID_ADVANCED_EXPORTLIST
429 MENUITEM "&Import List", ID_ADVANCED_IMPORTLIST 428 MENUITEM "&Import List", ID_ADVANCED_IMPORTLIST
430 END 429 END
431END 430END
432 431
433 432
434///////////////////////////////////////////////////////////////////////////// 433/////////////////////////////////////////////////////////////////////////////
435// 434//
436// Bitmap 435// Bitmap
437// 436//
438 437
439IDB_DIABACK BITMAP DISCARDABLE "shared-data/klever-background.bmp" 438IDB_DIABACK BITMAP DISCARDABLE "shared-data/klever-background.bmp"
440 439
441///////////////////////////////////////////////////////////////////////////// 440/////////////////////////////////////////////////////////////////////////////
442// 441//
443// WAVE 442// WAVE
444// 443//
445 444
446IDW_BESTURL WAVE DISCARDABLE "res\\best.wav" 445IDW_BESTURL WAVE DISCARDABLE "res\\best.wav"
447 446
448///////////////////////////////////////////////////////////////////////////// 447/////////////////////////////////////////////////////////////////////////////
449// 448//
450// String Table 449// String Table
451// 450//
452 451
453STRINGTABLE DISCARDABLE 452STRINGTABLE DISCARDABLE
454BEGIN 453BEGIN
455 IDS_ABOUTBOX "&About Dipstick.." 454 IDS_ABOUTBOX "&About Dipstick.."
456 IDS_PS_FAILEDTOLOCK "Failed to gain access to internal resources. Please, report to Klever." 455 IDS_PS_FAILEDTOLOCK "Failed to gain access to internal resources. Please, report to Klever."
457 IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed." 456 IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed."
458 IDS_CSVEXT ".csv" 457 IDS_CSVEXT ".csv"
459 IDS_HN_BADURL "Bad URL" 458 IDS_HN_BADURL "Bad URL"
460 IDS_ABEST_CLEANUP "Remove all locations from list?" 459 IDS_ABEST_CLEANUP "Remove all locations from list?"
461 IDS_ABEST_NONEFOUND "No reachable locations were found." 460 IDS_ABEST_NONEFOUND "No reachable locations were found."
462 IDS_ABEST_TITLE " Dipstick - report" 461 IDS_ABEST_TITLE " Dipstick - report"
463 IDS_DRAGPAD_TITLE " Dipstick 3.0" 462 IDS_DRAGPAD_TITLE " Dipstick 3.1-trunk"
464 IDS_DRAGPAD_URLS " %d/%d URL(s)" 463 IDS_DRAGPAD_URLS " %d/%d URL(s)"
465 IDS_REGEX_HTMLURL "<A[^[:alpha:]][^>]*href[[:space:]]*=[[:space:]]*""?([^[:space:]>""]+)""?[^>]*>" 464 IDS_REGEX_HTMLURL "<A[^[:alpha:]][^>]*href[[:space:]]*=[[:space:]]*""?([^[:space:]>""]+)""?[^>]*>"
466END 465END
467 466
468STRINGTABLE DISCARDABLE 467STRINGTABLE DISCARDABLE
469BEGIN 468BEGIN
470 IDS_KLEVERNET_URL "http://www.klever.net/" 469 IDS_KLEVERNET_URL "http://www.klever.net/"
471 IDS_PS_INTERNALERROR "Internal Error. Please report to Klever." 470 IDS_PS_INTERNALERROR "Internal Error. Please report to Klever."
472 IDS_PS_NETUNREACHABLE "Destination network unreachable" 471 IDS_PS_NETUNREACHABLE "Destination network unreachable"
473 IDS_PS_HOSTUNREACHABLE "Destination host unreachable" 472 IDS_PS_HOSTUNREACHABLE "Destination host unreachable"
474 IDS_PS_PROTUNREACHABLE "Destination protocol unreachable" 473 IDS_PS_PROTUNREACHABLE "Destination protocol unreachable"
475 IDS_PS_PORTUNREACHABLE "Destination port unreachable" 474 IDS_PS_PORTUNREACHABLE "Destination port unreachable"
476 IDS_PS_NORESOURCES "No resources" 475 IDS_PS_NORESOURCES "No resources"
477 IDS_PS_HWERROR "Hardware error" 476 IDS_PS_HWERROR "Hardware error"
478 IDS_PS_BIGPACKET "Packet size is too big" 477 IDS_PS_BIGPACKET "Packet size is too big"
479END 478END
480 479
481STRINGTABLE DISCARDABLE 480STRINGTABLE DISCARDABLE
482BEGIN 481BEGIN
483 IDC_DNDTARGET "Dipstick 3.0, click the right mouse button to display main window, left mouse button for menu" 482 IDC_DNDTARGET "Dipstick 3.1-trunk, click the right mouse button to display main window, left mouse button for menu"
484 IDC_HOST "Host name as specified or resolved by Dipstick" 483 IDC_HOST "Host name as specified or resolved by Dipstick"
485END 484END
486 485
487STRINGTABLE DISCARDABLE 486STRINGTABLE DISCARDABLE
488BEGIN 487BEGIN
489 IDC_URLCAPTION "Universal Resource Locator (URL) associated with this location" 488 IDC_URLCAPTION "Universal Resource Locator (URL) associated with this location"
490 IDC_URL "Universal Resource Locator (URL) associated with this location" 489 IDC_URL "Universal Resource Locator (URL) associated with this location"
491 IDC_HOSTCAPTION "Host name as specified or resolved by Dipstick" 490 IDC_HOSTCAPTION "Host name as specified or resolved by Dipstick"
492 IDC_IPCAPTION "Host's IP address as specified or resolved by Dipstick" 491 IDC_IPCAPTION "Host's IP address as specified or resolved by Dipstick"
493 IDC_TIMESCAPTION "Minmum, maximum and average round trip time in milliseconds. The less the better." 492 IDC_TIMESCAPTION "Minmum, maximum and average round trip time in milliseconds. The less the better."
494 IDC_TIMES "Minmum, maximum and average round trip time in milliseconds. The less the better." 493 IDC_TIMES "Minmum, maximum and average round trip time in milliseconds. The less the better."
495 IDC_LOSSCAPTION "IP packets loss" 494 IDC_LOSSCAPTION "IP packets loss"
496 IDC_LOSS "IP packets loss" 495 IDC_LOSS "IP packets loss"
497 IDC_STATUSCAPTION "Last error occured during attempt to ping this location" 496 IDC_STATUSCAPTION "Last error occured during attempt to ping this location"
498 IDC_STATUS "Last error occured during attempt to ping this location" 497 IDC_STATUS "Last error occured during attempt to ping this location"
499 IDC_OPENURL "Open URL in your default browser" 498 IDC_OPENURL "Open URL in your default browser"
500END 499END
501 500
502STRINGTABLE DISCARDABLE 501STRINGTABLE DISCARDABLE
503BEGIN 502BEGIN
504 IDS_PS_TIMEOUT "Request timed out" 503 IDS_PS_TIMEOUT "Request timed out"
505 IDS_PS_BADROUTE "Bad route" 504 IDS_PS_BADROUTE "Bad route"
506 IDS_PS_TTLEXPTRANSIT "TTL expired in transit" 505 IDS_PS_TTLEXPTRANSIT "TTL expired in transit"
507 IDS_PS_TTLEXPREASM "TTL expired during reassembly" 506 IDS_PS_TTLEXPREASM "TTL expired during reassembly"
508 IDS_PS_IPARAMP "IP parameter problem" 507 IDS_PS_IPARAMP "IP parameter problem"
509 IDS_PS_SOURCEQUENCH "Source quench received" 508 IDS_PS_SOURCEQUENCH "Source quench received"
510 IDS_PS_BIGOPTION "Option is too big" 509 IDS_PS_BIGOPTION "Option is too big"
511 IDS_PS_BADDEST "Bad destination" 510 IDS_PS_BADDEST "Bad destination"
512 IDS_PS_UNKNOWNERROR "Unknown error" 511 IDS_PS_UNKNOWNERROR "Unknown error"
513 IDS_REGISTRYKEY "Klever Group" 512 IDS_REGISTRYKEY "Klever Group"
514 IDS_FMT_TIMES "%lu/%lu/%lu" 513 IDS_FMT_TIMES "%lu/%lu/%lu"
515 IDS_FMT_LOSS "%d%%" 514 IDS_FMT_LOSS "%d%%"
516 IDS_TIP_UNREACHABLE "This location seems to be unreachable" 515 IDS_TIP_UNREACHABLE "This location seems to be unreachable"
517 IDS_PS_FAILEDTORESOLVE "Unable to resolve host IP" 516 IDS_PS_FAILEDTORESOLVE "Unable to resolve host IP"
518END 517END
519 518
520STRINGTABLE DISCARDABLE 519STRINGTABLE DISCARDABLE
521BEGIN 520BEGIN
522 IDS_PS_UNABLETOICMP "Unable to initialize ICMP services" 521 IDS_PS_UNABLETOICMP "Unable to initialize ICMP services"
523 IDS_TIP_PENDING "This location is waiting for it's turn to get pinged" 522 IDS_TIP_PENDING "This location is waiting for it's turn to get pinged"
524 IDS_TIP_COMPLETE "Pinging of this location has been completed" 523 IDS_TIP_COMPLETE "Pinging of this location has been completed"
525 IDS_TIP_PROPSOK "Click OK if you're done with looking and want to dismiss this window" 524 IDS_TIP_PROPSOK "Click OK if you're done with looking and want to dismiss this window"
526 IDS_TIP_INTERVAL "Interval between ping requests in seconds" 525 IDS_TIP_INTERVAL "Interval between ping requests in seconds"
527 IDS_TIP_OPTIONSOK "Click OK to make changes permanent" 526 IDS_TIP_OPTIONSOK "Click OK to make changes permanent"
528 IDS_TIP_OPTIONSCANCEL "Click CANCEL to leave dialog without making any changes" 527 IDS_TIP_OPTIONSCANCEL "Click CANCEL to leave dialog without making any changes"
529 IDS_TIP_PINGING "This location is being pinged at the moment.." 528 IDS_TIP_PINGING "This location is being pinged at the moment.."
530END 529END
531 530
532STRINGTABLE DISCARDABLE 531STRINGTABLE DISCARDABLE
533BEGIN 532BEGIN
534 IDC_MSWORKAROUND "In case of REDIRed URL - test the innermost one" 533 IDC_MSWORKAROUND "In case of REDIRed URL - test the innermost one"
535END 534END
536 535
537STRINGTABLE DISCARDABLE 536STRINGTABLE DISCARDABLE
538BEGIN 537BEGIN
539 IDS_CSVFILTER "Comma Separated Values (*.csv)|*.csv|All Files (*.*)|*.*||" 538 IDS_CSVFILTER "Comma Separated Values (*.csv)|*.csv|All Files (*.*)|*.*||"
539 IDS_REGEX_URL "([a-zA-Z]+://)?[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]*)+(/[^ \t\r\n\\f]*)?"
540END 540END
541 541
542#endif // English (U.S.) resources 542#endif // English (U.S.) resources
543///////////////////////////////////////////////////////////////////////////// 543/////////////////////////////////////////////////////////////////////////////
544 544
545 545
546 546
547#ifndef APSTUDIO_INVOKED 547#ifndef APSTUDIO_INVOKED
548///////////////////////////////////////////////////////////////////////////// 548/////////////////////////////////////////////////////////////////////////////
549// 549//
550// Generated from the TEXTINCLUDE 3 resource. 550// Generated from the TEXTINCLUDE 3 resource.
551// 551//
552#define _AFX_NO_SPLITTER_RESOURCES 552#define _AFX_NO_SPLITTER_RESOURCES
553#define _AFX_NO_OLE_RESOURCES 553#define _AFX_NO_OLE_RESOURCES
554#define _AFX_NO_TRACKER_RESOURCES 554#define _AFX_NO_TRACKER_RESOURCES
555#define _AFX_NO_PROPERTY_RESOURCES 555#define _AFX_NO_PROPERTY_RESOURCES
556 556
557#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 557#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
558#ifdef _WIN32 558#ifdef _WIN32
559LANGUAGE 9, 1 559LANGUAGE 9, 1
560#pragma code_page(1252) 560#pragma code_page(1252)
561#endif 561#endif
562#include "res\Dipstick.rc2" // non-Microsoft Visual C++ edited resources 562#include "res\Dipstick.rc2" // non-Microsoft Visual C++ edited resources
563#include "afxres.rc" // Standard components 563#include "afxres.rc" // Standard components
564#endif 564#endif
565///////////////////////////////////////////////////////////////////////////// 565/////////////////////////////////////////////////////////////////////////////
566#endif // not APSTUDIO_INVOKED 566#endif // not APSTUDIO_INVOKED
567 567
diff --git a/help/dipstick.rtf b/help/dipstick.rtf
index c91b3f4..839d331 100644
--- a/help/dipstick.rtf
+++ b/help/dipstick.rtf
@@ -1,139 +1,141 @@
1{\rtf1\ansi 1{\rtf1\ansi
2@{\footnote 2@{\footnote
3THIS FILE WAS AUTOMATICALLY GENERATED FROM XML DOCUMENT. 3THIS FILE WAS AUTOMATICALLY GENERATED FROM XML DOCUMENT.
4DO NOT MODIFY THIS FILE DIRECTLY. EDIT XML DOCUMENT INSTEAD 4DO NOT MODIFY THIS FILE DIRECTLY. EDIT XML DOCUMENT INSTEAD
5} 5}
6{\fonttbl{\f0\froman Times New Roman;}{\f1\fswiss Arial;}{\f3\froman Symbol;}}{\colortbl; 6{\fonttbl{\f0\froman Times New Roman;}{\f1\fswiss Arial;}{\f3\froman Symbol;}}{\colortbl;
7 \red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0; 7 \red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;
8 \red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; 8 \red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
9 \red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128; 9 \red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;
10 \red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;} 10 \red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
11 11
12\pard\plain\keepn 12\pard\plain\keepn
13#{\footnote About} 13#{\footnote About}
14${\footnote About Dipstick} 14${\footnote About Dipstick}
15K{\footnote about} 15K{\footnote about}
16{ \f1\fs18\b\sb120 About {\b Dipstick}} 16{ \f1\fs18\b\sb120 About {\b Dipstick}}
17\par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b Dipstick} is our award-winning freeware that allows you to evaluate {\i mirror sites} to figure out which one has currently the least traffic. 17\par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b Dipstick} is our award-winning freeware that allows you to evaluate {\i mirror sites} to figure out which one has currently the least traffic.
18\par\sa120\sb120\qj\pard \f1\fs18\sb120 18\par\sa120\sb120\qj\pard \f1\fs18\sb120
19\par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b {\i Enjoy!}} 19\par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b {\i Enjoy!}}
20{ 20{
21\par\pard\plain\sb360\sa120 \f1\fs16 Copyright (c) 1996-2004 {\uldb\cf0 Klever Group (http://www.klever.net/)}{\v %!ExecFile("http://www.klever.net/")} 21\par\pard\plain\sb360\sa120 \f1\fs16 Copyright (c) 1996-2005 {\uldb\cf0 Klever Group (http://www.klever.net/)}{\v %!ExecFile("http://www.klever.net/")}
22\par\qj\sb120\sa120Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 22\par\qj\sb120\sa120Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
23\par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 23\par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
24\par \sa360 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24\par \sa360 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25} 25}
26\par \sa0\sb120\ql \f1\fs16 Author: {\b\uldb\cf11 Michael Krelin ({\i hacker@klever.net})}{\v %!ExecFile("mailto:hacker@klever.net")} 26\par \sa0\sb120\ql \f1\fs16 Author: {\b\uldb\cf11 Michael Krelin ({\i hacker@klever.net})}{\v %!ExecFile("mailto:hacker@klever.net")}
27\par \sa0\sb0 Fan mail send to {\i\uldb gefilte@klever.net}{\v %!ExecFile("mailto:gefilte@klever.net")} 27\par \sa0\sb0 Fan mail send to {\i\uldb gefilte@klever.net}{\v %!ExecFile("mailto:gefilte@klever.net")}
28\page 28\page
29 29
30\pard\plain\keepn 30\pard\plain\keepn
31#{\footnote News} 31#{\footnote News}
32${\footnote What's new} 32${\footnote What's new}
33{ \f1\fs18\b\sb120 What's New} 33{ \f1\fs18\b\sb120 What's New}
34\par\pard\plain\f1\fs24\qc\cf2\b 3.1 - July 26th, 2005
35\par\pard\plain\fi0\li0\f1\fs18 \bullet Ability to parse multiple URLs from plaintext selection
34\par\pard\plain\f1\fs24\qc\cf2\b 3.0 - July 11th, 2004 36\par\pard\plain\f1\fs24\qc\cf2\b 3.0 - July 11th, 2004
35\par\pard\plain\fi0\li0\f1\fs18 \bullet Change of {\uldb license}{\v About} and opening the source. 37\par\pard\plain\fi0\li0\f1\fs18 \bullet Change of {\uldb license}{\v About} and opening the source.
36\par\pard\plain\fi0\li0\f1\fs18 \bullet Minor cosmetic changes 38\par\pard\plain\fi0\li0\f1\fs18 \bullet Minor cosmetic changes
37\par\pard\plain\f1\fs24\qc\cf2\b 2.52 - June 3rd, 1998 39\par\pard\plain\f1\fs24\qc\cf2\b 2.52 - June 3rd, 1998
38\par\pard\plain\fi0\li0\f1\fs18 \bullet Now works properly with Winsock 2 for Windows95. Also may start working with non-Microsoft TCP/IP stacks. 40\par\pard\plain\fi0\li0\f1\fs18 \bullet Now works properly with Winsock 2 for Windows95. Also may start working with non-Microsoft TCP/IP stacks.
39\par\pard\plain\fi0\li0\f1\fs18 \bullet Fixed bug that caused GPF when removing all URLs after testing is over and you picked the URL of your choice. 41\par\pard\plain\fi0\li0\f1\fs18 \bullet Fixed bug that caused GPF when removing all URLs after testing is over and you picked the URL of your choice.
40\par\pard\plain\f1\fs24\qc\cf2\b 2.5 - December 30th, 1997 42\par\pard\plain\f1\fs24\qc\cf2\b 2.5 - December 30th, 1997
41\par\pard\plain\fi0\li0\f1\fs18 \bullet Ability to export/import sets of URLs. 43\par\pard\plain\fi0\li0\f1\fs18 \bullet Ability to export/import sets of URLs.
42\par\pard\plain\fi0\li0\f1\fs18 \bullet Copy URL menu command in the Main Window and button in the Best URL window. 44\par\pard\plain\fi0\li0\f1\fs18 \bullet Copy URL menu command in the Main Window and button in the Best URL window.
43\par\pard\plain\fi0\li0\f1\fs18 \bullet Multiple URLs dragging or pasting. Works only for MSIE4 browser. 45\par\pard\plain\fi0\li0\f1\fs18 \bullet Multiple URLs dragging or pasting. Works only for MSIE4 browser.
44\par\pard\plain\fi0\li0\f1\fs18 \bullet Annoying ToolTips removed. 46\par\pard\plain\fi0\li0\f1\fs18 \bullet Annoying ToolTips removed.
45\par\pard\plain\f1\fs24\qc\cf2\b 2.00 - July 1st, 1997 47\par\pard\plain\f1\fs24\qc\cf2\b 2.00 - July 1st, 1997
46\par\pard\plain\fi0\li0\f1\fs18 \bullet Drag'n'drop source added to the Best URL window. 48\par\pard\plain\fi0\li0\f1\fs18 \bullet Drag'n'drop source added to the Best URL window.
47\par\pard\plain\fi0\li0\f1\fs18 \bullet Completed/Total URLs counter added to {\b Dipstick} drag pad. 49\par\pard\plain\fi0\li0\f1\fs18 \bullet Completed/Total URLs counter added to {\b Dipstick} drag pad.
48\par\pard\plain\fi0\li0\f1\fs18 \bullet You may now drag'n'drop URLs from main {\b Dipstick} dialog window. 50\par\pard\plain\fi0\li0\f1\fs18 \bullet You may now drag'n'drop URLs from main {\b Dipstick} dialog window.
49\par\pard\plain\fi0\li0\f1\fs18 \bullet Added ability to paste URLs into {\b Dipstick} instead of dropping. 51\par\pard\plain\fi0\li0\f1\fs18 \bullet Added ability to paste URLs into {\b Dipstick} instead of dropping.
50\par\pard\plain\fi0\li0\f1\fs18 \bullet New install program now lets you install {\b Dipstick} to the location of your choice. 52\par\pard\plain\fi0\li0\f1\fs18 \bullet New install program now lets you install {\b Dipstick} to the location of your choice.
51\par\pard\plain\f1\fs24\qc\cf2\b 1.01 - March 13th, 1997 53\par\pard\plain\f1\fs24\qc\cf2\b 1.01 - March 13th, 1997
52\par\pard\plain\fi0\li0\f1\fs18 \bullet Resizable main {\b Dipstick} dialog window. 54\par\pard\plain\fi0\li0\f1\fs18 \bullet Resizable main {\b Dipstick} dialog window.
53\par\pard\plain\fi0\li0\f1\fs18 \bullet Come up with the best URL automatically. 55\par\pard\plain\fi0\li0\f1\fs18 \bullet Come up with the best URL automatically.
54\par\pard\plain\fi0\li0\f1\fs18 \bullet Workaround for redir.dll 56\par\pard\plain\fi0\li0\f1\fs18 \bullet Workaround for redir.dll
55\par\pard\plain\fi0\li0\f1\fs18 \bullet No more {\b\cf6 MSIE} 3.0 requirement. 57\par\pard\plain\fi0\li0\f1\fs18 \bullet No more {\b\cf6 MSIE} 3.0 requirement.
56\par\pard\plain\fi0\li0\f1\fs18 \bullet Remembers window positions and size as well as columns widths. 58\par\pard\plain\fi0\li0\f1\fs18 \bullet Remembers window positions and size as well as columns widths.
57\par\pard\plain\fi0\li0\f1\fs18 \bullet When manually adding locations - you may specify the URL, not host name as it was before (I still wonder how it came to my mind) 59\par\pard\plain\fi0\li0\f1\fs18 \bullet When manually adding locations - you may specify the URL, not host name as it was before (I still wonder how it came to my mind)
58\page 60\page
59 61
60\pard\plain\keepn 62\pard\plain\keepn
61#{\footnote Using} 63#{\footnote Using}
62${\footnote Using Dipstick} 64${\footnote Using Dipstick}
63{ \f1\fs18\b\sb120 Using {\b Dipstick}} 65{ \f1\fs18\b\sb120 Using {\b Dipstick}}
64\par\sa120\sb120\qj\pard \f1\fs18\sb120 To use {\b Dipstick}, please follow these steps:\pard 66\par\sa120\sb120\qj\pard \f1\fs18\sb120 To use {\b Dipstick}, please follow these steps:\pard
65\par \fi0\li0 \bullet Load the page that contains links into your {\b\cf6 MSIE} or {\b\cf6 Netscape} browser. 67\par \fi0\li0 \bullet Load the page that contains links into your {\b\cf6 MSIE} or {\b\cf6 Netscape} browser.
66\par \fi0\li0 \bullet Drag'n'drop desired links to {\b Dipstick} window. 68\par \fi0\li0 \bullet Drag'n'drop desired links to {\b Dipstick} window.
67\par \fi0\li0 \bullet {#{\footnote UsingManual}}(Optional) you can also manually add as many links as you want by selecting {\b Manual Ping} option. You can enter {\i url}, {\i hostname} or {\i IP address} there. 69\par \fi0\li0 \bullet {#{\footnote UsingManual}}(Optional) you can also manually add as many links as you want by selecting {\b Manual Ping} option. You can enter {\i url}, {\i hostname} or {\i IP address} there.
68\par \fi0\li0 \bullet You will see rain going thought {\b Dipstick} window. After the rain stops, {\b Dipstick} will show you results either by suggesting the best URL or by sorting results in a table (which can be viewed by clicking on {\b Dipstick} window). 70\par \fi0\li0 \bullet You will see rain going thought {\b Dipstick} window. After the rain stops, {\b Dipstick} will show you results either by suggesting the best URL or by sorting results in a table (which can be viewed by clicking on {\b Dipstick} window).
69\par \fi0\li0 \bullet After you are done, you can reping all selected URLs by clicking {\uldb {\b Reping All}}{\v MainWindowRA} button in {\b Dipstick} window.\pard 71\par \fi0\li0 \bullet After you are done, you can reping all selected URLs by clicking {\uldb {\b Reping All}}{\v MainWindowRA} button in {\b Dipstick} window.\pard
70\par\sa120\sb120\qj\f1\fs16 Small note for newbies (all others, please do not get mad): To drag'n'drop the URL, you need to move your mouse to the link on the web page, press and hold the select (usually - left) mouse button, and drag the mouse (with the selected URL to {\b Dipstick} window and then release mouse button. 72\par\sa120\sb120\qj\f1\fs16 Small note for newbies (all others, please do not get mad): To drag'n'drop the URL, you need to move your mouse to the link on the web page, press and hold the select (usually - left) mouse button, and drag the mouse (with the selected URL to {\b Dipstick} window and then release mouse button.
71\page 73\page
72 74
73\pard\plain\keepn 75\pard\plain\keepn
74#{\footnote MainWindow} 76#{\footnote MainWindow}
75${\footnote Main Window} 77${\footnote Main Window}
76{ \f1\fs18\b\sb120 Main Window} 78{ \f1\fs18\b\sb120 Main Window}
77\par\sa120\sb120\qj\pard \f1\fs18\sb120 The main window consists of -\pard 79\par\sa120\sb120\qj\pard \f1\fs18\sb120 The main window consists of -\pard
78\par \fi0\li0 \bullet {\b Brilliant ListView with the following columns:} 80\par \fi0\li0 \bullet {\b Brilliant ListView with the following columns:}
79\par \fi0\li0 \bullet Host Name - host name as it was specified in the URL or resolved from IP address. 81\par \fi0\li0 \bullet Host Name - host name as it was specified in the URL or resolved from IP address.
80\par \fi0\li0 \bullet Host IP address - host IP address as it was specified in the URL or resolved from host name. 82\par \fi0\li0 \bullet Host IP address - host IP address as it was specified in the URL or resolved from host name.
81\par \fi0\li0 \bullet Min RTT - Minimum Round Trip Time. {\b Dipstick} sends a few echo requests to remote host and calculates minimum, maximum, and average Round Trip Times. The less the better. 83\par \fi0\li0 \bullet Min RTT - Minimum Round Trip Time. {\b Dipstick} sends a few echo requests to remote host and calculates minimum, maximum, and average Round Trip Times. The less the better.
82\par \fi0\li0 \bullet Avg RTT - Average Round Trip Time. About the same meaning as in Min RTT, but this is the average one. The less the better. By default locations are sorted by Avg RTT. 84\par \fi0\li0 \bullet Avg RTT - Average Round Trip Time. About the same meaning as in Min RTT, but this is the average one. The less the better. By default locations are sorted by Avg RTT.
83\par \fi0\li0 \bullet Max RTT - Maximum Round Trip Time. About the same meaning as in Min RTT and Avg RTT, but this is maximum one. The less the better. 85\par \fi0\li0 \bullet Max RTT - Maximum Round Trip Time. About the same meaning as in Min RTT and Avg RTT, but this is maximum one. The less the better.
84\par \fi0\li0 \bullet Pktloss - Percentage of the requests lost somewhere in the net. The less the better. 86\par \fi0\li0 \bullet Pktloss - Percentage of the requests lost somewhere in the net. The less the better.
85\par \fi0\li0 \bullet {\b Buttons:} 87\par \fi0\li0 \bullet {\b Buttons:}
86\par \fi0\li0 \bullet {#{\footnote MainWindowMP}}Manual Ping - lets you add location manually (usually you just drag'n'drop locations into {\b Dipstick} window. 88\par \fi0\li0 \bullet {#{\footnote MainWindowMP}}Manual Ping - lets you add location manually (usually you just drag'n'drop locations into {\b Dipstick} window.
87\par \fi0\li0 \bullet Reping - Test selected location again. 89\par \fi0\li0 \bullet Reping - Test selected location again.
88\par \fi0\li0 \bullet {#{\footnote MainWindowRA}}Reping All - Test again all locations in the list. 90\par \fi0\li0 \bullet {#{\footnote MainWindowRA}}Reping All - Test again all locations in the list.
89\par \fi0\li0 \bullet Remove - Remove selected location from the list. 91\par \fi0\li0 \bullet Remove - Remove selected location from the list.
90\par \fi0\li0 \bullet Remove All - Remove all locations from the list. 92\par \fi0\li0 \bullet Remove All - Remove all locations from the list.
91\par \fi0\li0 \bullet Help - I think you have a clue on what this button does. 93\par \fi0\li0 \bullet Help - I think you have a clue on what this button does.
92\par \fi0\li0 \bullet Options - Set {\b Dipstick} options 94\par \fi0\li0 \bullet Options - Set {\b Dipstick} options
93\par \fi0\li0 \bullet Exit Dipstick - Close {\b Dipstick} program\pard 95\par \fi0\li0 \bullet Exit Dipstick - Close {\b Dipstick} program\pard
94\page 96\page
95 97
96\pard\plain\keepn 98\pard\plain\keepn
97#{\footnote Options} 99#{\footnote Options}
98${\footnote Dipstick Options} 100${\footnote Dipstick Options}
99{ \f1\fs18\b\sb120 {\b Dipstick} Opions} 101{ \f1\fs18\b\sb120 {\b Dipstick} Opions}
100\par\sa120\sb120\qj\pard \f1\fs18\sb120 Options are:\pard 102\par\sa120\sb120\qj\pard \f1\fs18\sb120 Options are:\pard
101\par \fi0\li0 \bullet {#{\footnote OptionsPPH}}{\b Number of pings per host} - number of echo requests to send for each location. 103\par \fi0\li0 \bullet {#{\footnote OptionsPPH}}{\b Number of pings per host} - number of echo requests to send for each location.
102\par \fi0\li0 \bullet {\b Maximum number of threads} - number of locations to process at the same time. adjust this if you have unusually fast or slow connection and/or computer. 104\par \fi0\li0 \bullet {\b Maximum number of threads} - number of locations to process at the same time. adjust this if you have unusually fast or slow connection and/or computer.
103\par \fi0\li0 \bullet {\b Ping Timeout} - number of seconds to wait between sending echo requests. 105\par \fi0\li0 \bullet {\b Ping Timeout} - number of seconds to wait between sending echo requests.
104\par \fi0\li0 \bullet {\b Interval between pings} - number of seconds to wait between sending echo requests. 106\par \fi0\li0 \bullet {\b Interval between pings} - number of seconds to wait between sending echo requests.
105\par \fi0\li0 \bullet {\b Ping size} - number of bytes to send in each echo request. 107\par \fi0\li0 \bullet {\b Ping size} - number of bytes to send in each echo request.
106\par \fi0\li0 \bullet {#{\footnote OptionsIM}}{\b Test innermost URL} - in case of nesting {\b redir}ed URLs test the innermost one. Some strange companies refer to their mirrors using {\b redir.dll} so that the URLs for files located on different machines look like they're all here. Like {\b http://www.punchcards.com/redir.dll?target=http://www.punchcards.mirrordudes.com/file.exe&puchcards=advanced} 108\par \fi0\li0 \bullet {#{\footnote OptionsIM}}{\b Test innermost URL} - in case of nesting {\b redir}ed URLs test the innermost one. Some strange companies refer to their mirrors using {\b redir.dll} so that the URLs for files located on different machines look like they're all here. Like {\b http://www.punchcards.com/redir.dll?target=http://www.punchcards.mirrordudes.com/file.exe&puchcards=advanced}
107\par \fi0\li0 \bullet {#{\footnote OptionsBU}}{\b Come up with the best URL} - pop up with a suggestion about the best URL (after all locations have been pinged and have nothing left to do other than to start dowloading).\pard 109\par \fi0\li0 \bullet {#{\footnote OptionsBU}}{\b Come up with the best URL} - pop up with a suggestion about the best URL (after all locations have been pinged and have nothing left to do other than to start dowloading).\pard
108\page 110\page
109 111
110\pard\plain\keepn 112\pard\plain\keepn
111#{\footnote Properties} 113#{\footnote Properties}
112${\footnote URL properties} 114${\footnote URL properties}
113{ \f1\fs18\b\sb120 URL Properties} 115{ \f1\fs18\b\sb120 URL Properties}
114\par\sa120\sb120\qj\pard \f1\fs18\sb120 URL Properties are:\pard 116\par\sa120\sb120\qj\pard \f1\fs18\sb120 URL Properties are:\pard
115\par \fi0\li0 \bullet {\b URL} - the URL itself if present. 117\par \fi0\li0 \bullet {\b URL} - the URL itself if present.
116\par \fi0\li0 \bullet {\b Host name} - host name as specified in URL (or the innermost URL in case of {\b redir}ed URLs in the {\uldb appropriate option}{\v OptionsIM} is turned on or resolved by {\b Dipstick}. 118\par \fi0\li0 \bullet {\b Host name} - host name as specified in URL (or the innermost URL in case of {\b redir}ed URLs in the {\uldb appropriate option}{\v OptionsIM} is turned on or resolved by {\b Dipstick}.
117\par \fi0\li0 \bullet {\b Ping times} - minimum, average, and mmaximum round trip times if available. 119\par \fi0\li0 \bullet {\b Ping times} - minimum, average, and mmaximum round trip times if available.
118\par \fi0\li0 \bullet {\b Packet loss} - percentage of packets lost in transmission. 120\par \fi0\li0 \bullet {\b Packet loss} - percentage of packets lost in transmission.
119\par \fi0\li0 \bullet {\b Status} - description of last error occured (if any).\pard 121\par \fi0\li0 \bullet {\b Status} - description of last error occured (if any).\pard
120\page 122\page
121 123
122\pard\plain\keepn 124\pard\plain\keepn
123#{\footnote SelectURLs} 125#{\footnote SelectURLs}
124${\footnote Select URLs Dialog} 126${\footnote Select URLs Dialog}
125{ \f1\fs18\b\sb120 Select URLs dialog} 127{ \f1\fs18\b\sb120 Select URLs dialog}
126\par\sa120\sb120\qj\pard \f1\fs18\sb120 If you're dragging or cut'n'pasting selection from {\b\cf6 MSIE4} browser, you're supposed to chose which URLs to test. 128\par\sa120\sb120\qj\pard \f1\fs18\sb120 If you're dragging or cut'n'pasting selection from {\b\cf6 MSIE4} browser, you're supposed to chose which URLs to test.
127\par\sa120\sb120\qj\pard \f1\fs18\sb120 There are two options you may want to change when selecting URLs from list:\pard 129\par\sa120\sb120\qj\pard \f1\fs18\sb120 There are two options you may want to change when selecting URLs from list:\pard
128\par \fi0\li0 \bullet {\b Smart adjust selection} - let {\b Dipstick} adjust current selection when you're clicking URL based on the URL you click. 130\par \fi0\li0 \bullet {\b Smart adjust selection} - let {\b Dipstick} adjust current selection when you're clicking URL based on the URL you click.
129\par \fi0\li0 \bullet {\b Adjusst by innermost URL} - use the innermost URL when adjusting selection.\pard 131\par \fi0\li0 \bullet {\b Adjusst by innermost URL} - use the innermost URL when adjusting selection.\pard
130\par\sa120\sb120\qj\pard \f1\fs18\sb120 The default values for these options are also available from the {\uldb {\b Options}}{\v Options} dialog box. 132\par\sa120\sb120\qj\pard \f1\fs18\sb120 The default values for these options are also available from the {\uldb {\b Options}}{\v Options} dialog box.
131\page 133\page
132 134
133\pard\plain\keepn 135\pard\plain\keepn
134#{\footnote Autobest} 136#{\footnote Autobest}
135${\footnote Dipstick Report} 137${\footnote Dipstick Report}
136{ \f1\fs18\b\sb120 {\b Dipstick} report} 138{ \f1\fs18\b\sb120 {\b Dipstick} report}
137\par\sa120\sb120\qj\pard \f1\fs18\sb120 When {\b Dipstick} has finished testing and there's nothing left but to start your download, you're presented with a suggestion about the best URL. From this dialog you may chose to browse to the location you like using {\b Previous Location} and {\b Next Location} buttons, {\b Open this URL}, {\b Copy URL} to clipboard or drag it to wherever you want. 139\par\sa120\sb120\qj\pard \f1\fs18\sb120 When {\b Dipstick} has finished testing and there's nothing left but to start your download, you're presented with a suggestion about the best URL. From this dialog you may chose to browse to the location you like using {\b Previous Location} and {\b Next Location} buttons, {\b Open this URL}, {\b Copy URL} to clipboard or drag it to wherever you want.
138\page 140\page
139} \ No newline at end of file 141} \ No newline at end of file
diff --git a/help/dipstick.xml b/help/dipstick.xml
index 4754e47..8ed0383 100644
--- a/help/dipstick.xml
+++ b/help/dipstick.xml
@@ -1,115 +1,118 @@
1<?xml version="1.0"?> 1<?xml version="1.0"?>
2<winhelp> 2<winhelp>
3 <topic id="About" title="About Dipstick" keywords="about"> 3 <topic id="About" title="About Dipstick" keywords="about">
4 <heading scroll="no">About <kin>Dipstick</kin></heading> 4 <heading scroll="no">About <kin>Dipstick</kin></heading>
5 <p><kin>Dipstick</kin> is our award-winning freeware that allows you to evaluate <term>mirror sites</term> to figure out which one has currently the least traffic.</p> 5 <p><kin>Dipstick</kin> is our award-winning freeware that allows you to evaluate <term>mirror sites</term> to figure out which one has currently the least traffic.</p>
6 <p/> 6 <p/>
7 <p><b><i>Enjoy!</i></b></p> 7 <p><b><i>Enjoy!</i></b></p>
8 <license years="1996-2004"/> 8 <license years="1996-2005"/>
9 <credits/> 9 <credits/>
10 </topic> 10 </topic>
11 <topic id="News" title="What's new"> 11 <topic id="News" title="What's new">
12 <heading scroll="no">What's New</heading> 12 <heading scroll="no">What's New</heading>
13 <newsfor version="3.1" date="July 26th, 2005">
14 <ni>Ability to parse multiple URLs from plaintext selection</ni>
15 </newsfor>
13 <newsfor version="3.0" date="July 11th, 2004"> 16 <newsfor version="3.0" date="July 11th, 2004">
14 <ni>Change of <a href="#About">license</a> and opening the source.</ni> 17 <ni>Change of <a href="#About">license</a> and opening the source.</ni>
15 <ni>Minor cosmetic changes</ni> 18 <ni>Minor cosmetic changes</ni>
16 </newsfor> 19 </newsfor>
17 <newsfor version="2.52" date="June 3rd, 1998"> 20 <newsfor version="2.52" date="June 3rd, 1998">
18 <ni>Now works properly with Winsock 2 for Windows95. Also may start working with non-Microsoft TCP/IP stacks.</ni> 21 <ni>Now works properly with Winsock 2 for Windows95. Also may start working with non-Microsoft TCP/IP stacks.</ni>
19 <ni>Fixed bug that caused GPF when removing all URLs after testing is over and you picked the URL of your choice.</ni> 22 <ni>Fixed bug that caused GPF when removing all URLs after testing is over and you picked the URL of your choice.</ni>
20 </newsfor> 23 </newsfor>
21 <newsfor version="2.5" date="December 30th, 1997"> 24 <newsfor version="2.5" date="December 30th, 1997">
22 <ni>Ability to export/import sets of URLs.</ni> 25 <ni>Ability to export/import sets of URLs.</ni>
23 <ni>Copy URL menu command in the Main Window and button in the Best URL window.</ni> 26 <ni>Copy URL menu command in the Main Window and button in the Best URL window.</ni>
24 <ni>Multiple URLs dragging or pasting. Works only for MSIE4 browser.</ni> 27 <ni>Multiple URLs dragging or pasting. Works only for MSIE4 browser.</ni>
25 <ni>Annoying ToolTips removed.</ni> 28 <ni>Annoying ToolTips removed.</ni>
26 </newsfor> 29 </newsfor>
27 <newsfor version="2.00" date="July 1st, 1997"> 30 <newsfor version="2.00" date="July 1st, 1997">
28 <ni>Drag'n'drop source added to the Best URL window.</ni> 31 <ni>Drag'n'drop source added to the Best URL window.</ni>
29 <ni>Completed/Total URLs counter added to <kin>Dipstick</kin> drag pad.</ni> 32 <ni>Completed/Total URLs counter added to <kin>Dipstick</kin> drag pad.</ni>
30 <ni>You may now drag'n'drop URLs from main <kin>Dipstick</kin> dialog window.</ni> 33 <ni>You may now drag'n'drop URLs from main <kin>Dipstick</kin> dialog window.</ni>
31 <ni>Added ability to paste URLs into <kin>Dipstick</kin> instead of dropping.</ni> 34 <ni>Added ability to paste URLs into <kin>Dipstick</kin> instead of dropping.</ni>
32 <ni>New install program now lets you install <kin>Dipstick</kin> to the location of your choice.</ni> 35 <ni>New install program now lets you install <kin>Dipstick</kin> to the location of your choice.</ni>
33 </newsfor> 36 </newsfor>
34 <newsfor version="1.01" date="March 13th, 1997"> 37 <newsfor version="1.01" date="March 13th, 1997">
35 <ni>Resizable main <kin>Dipstick</kin> dialog window.</ni> 38 <ni>Resizable main <kin>Dipstick</kin> dialog window.</ni>
36 <ni>Come up with the best URL automatically.</ni> 39 <ni>Come up with the best URL automatically.</ni>
37 <ni>Workaround for redir.dll</ni> 40 <ni>Workaround for redir.dll</ni>
38 <ni>No more <product>MSIE</product> 3.0 requirement.</ni> 41 <ni>No more <product>MSIE</product> 3.0 requirement.</ni>
39 <ni>Remembers window positions and size as well as columns widths.</ni> 42 <ni>Remembers window positions and size as well as columns widths.</ni>
40 <ni>When manually adding locations - you may specify the URL, not host name as it was before (I still wonder how it came to my mind)</ni> 43 <ni>When manually adding locations - you may specify the URL, not host name as it was before (I still wonder how it came to my mind)</ni>
41 </newsfor> 44 </newsfor>
42 </topic> 45 </topic>
43 <topic id="Using" title="Using Dipstick"> 46 <topic id="Using" title="Using Dipstick">
44 <heading scroll="no">Using <kin>Dipstick</kin></heading> 47 <heading scroll="no">Using <kin>Dipstick</kin></heading>
45 <p>To use <kin>Dipstick</kin>, please follow these steps:</p> 48 <p>To use <kin>Dipstick</kin>, please follow these steps:</p>
46 <ul> 49 <ul>
47 <li>Load the page that contains links into your <product>MSIE</product> or <product>Netscape</product> browser.</li> 50 <li>Load the page that contains links into your <product>MSIE</product> or <product>Netscape</product> browser.</li>
48 <li>Drag'n'drop desired links to <kin>Dipstick</kin> window.</li> 51 <li>Drag'n'drop desired links to <kin>Dipstick</kin> window.</li>
49 <li><a name="UsingManual"/>(Optional) you can also manually add as many links as you want by selecting <b>Manual Ping</b> option. You can enter <term>url</term>, <term>hostname</term> or <term>IP address</term> there.</li> 52 <li><a name="UsingManual"/>(Optional) you can also manually add as many links as you want by selecting <b>Manual Ping</b> option. You can enter <term>url</term>, <term>hostname</term> or <term>IP address</term> there.</li>
50 <li>You will see rain going thought <kin>Dipstick</kin> window. After the rain stops, <kin>Dipstick</kin> will show you results either by suggesting the best URL or by sorting results in a table (which can be viewed by clicking on <kin>Dipstick</kin> window).</li> 53 <li>You will see rain going thought <kin>Dipstick</kin> window. After the rain stops, <kin>Dipstick</kin> will show you results either by suggesting the best URL or by sorting results in a table (which can be viewed by clicking on <kin>Dipstick</kin> window).</li>
51 <li>After you are done, you can reping all selected URLs by clicking <a href="#MainWindowRA"><b>Reping All</b></a> button in <kin>Dipstick</kin> window.</li> 54 <li>After you are done, you can reping all selected URLs by clicking <a href="#MainWindowRA"><b>Reping All</b></a> button in <kin>Dipstick</kin> window.</li>
52 </ul> 55 </ul>
53 <note>Small note for newbies (all others, please do not get mad): To drag'n'drop the URL, you need to move your mouse to the link on the web page, press and hold the select (usually - left) mouse button, and drag the mouse (with the selected URL to <kin>Dipstick</kin> window and then release mouse button.</note> 56 <note>Small note for newbies (all others, please do not get mad): To drag'n'drop the URL, you need to move your mouse to the link on the web page, press and hold the select (usually - left) mouse button, and drag the mouse (with the selected URL to <kin>Dipstick</kin> window and then release mouse button.</note>
54 </topic> 57 </topic>
55 <topic id="MainWindow" title="Main Window"> 58 <topic id="MainWindow" title="Main Window">
56 <heading scroll="no">Main Window</heading> 59 <heading scroll="no">Main Window</heading>
57 <p>The main window consists of -</p> 60 <p>The main window consists of -</p>
58 <ul> 61 <ul>
59 <li><b>Brilliant ListView with the following columns:</b></li> 62 <li><b>Brilliant ListView with the following columns:</b></li>
60 <li>Host Name - host name as it was specified in the URL or resolved from IP address.</li> 63 <li>Host Name - host name as it was specified in the URL or resolved from IP address.</li>
61 <li>Host IP address - host IP address as it was specified in the URL or resolved from host name.</li> 64 <li>Host IP address - host IP address as it was specified in the URL or resolved from host name.</li>
62 <li>Min RTT - Minimum Round Trip Time. <kin>Dipstick</kin> sends a few echo requests to remote host and calculates minimum, maximum, and average Round Trip Times. The less the better.</li> 65 <li>Min RTT - Minimum Round Trip Time. <kin>Dipstick</kin> sends a few echo requests to remote host and calculates minimum, maximum, and average Round Trip Times. The less the better.</li>
63 <li>Avg RTT - Average Round Trip Time. About the same meaning as in Min RTT, but this is the average one. The less the better. By default locations are sorted by Avg RTT.</li> 66 <li>Avg RTT - Average Round Trip Time. About the same meaning as in Min RTT, but this is the average one. The less the better. By default locations are sorted by Avg RTT.</li>
64 <li>Max RTT - Maximum Round Trip Time. About the same meaning as in Min RTT and Avg RTT, but this is maximum one. The less the better.</li> 67 <li>Max RTT - Maximum Round Trip Time. About the same meaning as in Min RTT and Avg RTT, but this is maximum one. The less the better.</li>
65 <li>Pktloss - Percentage of the requests lost somewhere in the net. The less the better.</li> 68 <li>Pktloss - Percentage of the requests lost somewhere in the net. The less the better.</li>
66 <li><b>Buttons:</b></li> 69 <li><b>Buttons:</b></li>
67 <li><a name="MainWindowMP"/>Manual Ping - lets you add location manually (usually you just drag'n'drop locations into <kin>Dipstick</kin> window.</li> 70 <li><a name="MainWindowMP"/>Manual Ping - lets you add location manually (usually you just drag'n'drop locations into <kin>Dipstick</kin> window.</li>
68 <li>Reping - Test selected location again.</li> 71 <li>Reping - Test selected location again.</li>
69 <li><a name="MainWindowRA"/>Reping All - Test again all locations in the list.</li> 72 <li><a name="MainWindowRA"/>Reping All - Test again all locations in the list.</li>
70 <li>Remove - Remove selected location from the list.</li> 73 <li>Remove - Remove selected location from the list.</li>
71 <li>Remove All - Remove all locations from the list.</li> 74 <li>Remove All - Remove all locations from the list.</li>
72 <li>Help - I think you have a clue on what this button does.</li> 75 <li>Help - I think you have a clue on what this button does.</li>
73 <li>Options - Set <kin>Dipstick</kin> options</li> 76 <li>Options - Set <kin>Dipstick</kin> options</li>
74 <li>Exit Dipstick - Close <kin>Dipstick</kin> program</li> 77 <li>Exit Dipstick - Close <kin>Dipstick</kin> program</li>
75 </ul> 78 </ul>
76 </topic> 79 </topic>
77 <topic id="Options" title="Dipstick Options"> 80 <topic id="Options" title="Dipstick Options">
78 <heading scroll="no"><kin>Dipstick</kin> Opions</heading> 81 <heading scroll="no"><kin>Dipstick</kin> Opions</heading>
79 <p>Options are:</p> 82 <p>Options are:</p>
80 <ul> 83 <ul>
81 <li><a name="OptionsPPH"/><b>Number of pings per host</b> - number of echo requests to send for each location.</li> 84 <li><a name="OptionsPPH"/><b>Number of pings per host</b> - number of echo requests to send for each location.</li>
82 <li><b>Maximum number of threads</b> - number of locations to process at the same time. adjust this if you have unusually fast or slow connection and/or computer.</li> 85 <li><b>Maximum number of threads</b> - number of locations to process at the same time. adjust this if you have unusually fast or slow connection and/or computer.</li>
83 <li><b>Ping Timeout</b> - number of seconds to wait between sending echo requests.</li> 86 <li><b>Ping Timeout</b> - number of seconds to wait between sending echo requests.</li>
84 <li><b>Interval between pings</b> - number of seconds to wait between sending echo requests.</li> 87 <li><b>Interval between pings</b> - number of seconds to wait between sending echo requests.</li>
85 <li><b>Ping size</b> - number of bytes to send in each echo request.</li> 88 <li><b>Ping size</b> - number of bytes to send in each echo request.</li>
86 <li><a name="OptionsIM"/><b>Test innermost URL</b> - in case of nesting <b>redir</b>ed URLs test the innermost one. Some strange companies refer to their mirrors using <b>redir.dll</b> so that the URLs for files located on different machines look like they're all here. Like <b>http://www.punchcards.com/redir.dll?target=http://www.punchcards.mirrordudes.com/file.exe&amp;puchcards=advanced</b></li> 89 <li><a name="OptionsIM"/><b>Test innermost URL</b> - in case of nesting <b>redir</b>ed URLs test the innermost one. Some strange companies refer to their mirrors using <b>redir.dll</b> so that the URLs for files located on different machines look like they're all here. Like <b>http://www.punchcards.com/redir.dll?target=http://www.punchcards.mirrordudes.com/file.exe&amp;puchcards=advanced</b></li>
87 <li><a name="OptionsBU"/><b>Come up with the best URL</b> - pop up with a suggestion about the best URL (after all locations have been pinged and have nothing left to do other than to start dowloading).</li> 90 <li><a name="OptionsBU"/><b>Come up with the best URL</b> - pop up with a suggestion about the best URL (after all locations have been pinged and have nothing left to do other than to start dowloading).</li>
88 </ul> 91 </ul>
89 </topic> 92 </topic>
90 <topic id="Properties" title="URL properties"> 93 <topic id="Properties" title="URL properties">
91 <heading scroll="no">URL Properties</heading> 94 <heading scroll="no">URL Properties</heading>
92 <p>URL Properties are:</p> 95 <p>URL Properties are:</p>
93 <ul> 96 <ul>
94 <li><b>URL</b> - the URL itself if present.</li> 97 <li><b>URL</b> - the URL itself if present.</li>
95 <li><b>Host name</b> - host name as specified in URL (or the innermost URL in case of <b>redir</b>ed URLs in the <a href="#OptionsIM">appropriate option</a> is turned on or resolved by <kin>Dipstick</kin>.</li> 98 <li><b>Host name</b> - host name as specified in URL (or the innermost URL in case of <b>redir</b>ed URLs in the <a href="#OptionsIM">appropriate option</a> is turned on or resolved by <kin>Dipstick</kin>.</li>
96 <li><b>Ping times</b> - minimum, average, and mmaximum round trip times if available.</li> 99 <li><b>Ping times</b> - minimum, average, and mmaximum round trip times if available.</li>
97 <li><b>Packet loss</b> - percentage of packets lost in transmission.</li> 100 <li><b>Packet loss</b> - percentage of packets lost in transmission.</li>
98 <li><b>Status</b> - description of last error occured (if any).</li> 101 <li><b>Status</b> - description of last error occured (if any).</li>
99 </ul> 102 </ul>
100 </topic> 103 </topic>
101 <topic id="SelectURLs" title="Select URLs Dialog"> 104 <topic id="SelectURLs" title="Select URLs Dialog">
102 <heading scroll="no">Select URLs dialog</heading> 105 <heading scroll="no">Select URLs dialog</heading>
103 <p>If you're dragging or cut'n'pasting selection from <product>MSIE4</product> browser, you're supposed to chose which URLs to test.</p> 106 <p>If you're dragging or cut'n'pasting selection from <product>MSIE4</product> browser, you're supposed to chose which URLs to test.</p>
104 <p>There are two options you may want to change when selecting URLs from list:</p> 107 <p>There are two options you may want to change when selecting URLs from list:</p>
105 <ul> 108 <ul>
106 <li><b>Smart adjust selection</b> - let <kin>Dipstick</kin> adjust current selection when you're clicking URL based on the URL you click.</li> 109 <li><b>Smart adjust selection</b> - let <kin>Dipstick</kin> adjust current selection when you're clicking URL based on the URL you click.</li>
107 <li><b>Adjusst by innermost URL</b> - use the innermost URL when adjusting selection.</li> 110 <li><b>Adjusst by innermost URL</b> - use the innermost URL when adjusting selection.</li>
108 </ul> 111 </ul>
109 <p>The default values for these options are also available from the <a href="#Options"><b>Options</b></a> dialog box.</p> 112 <p>The default values for these options are also available from the <a href="#Options"><b>Options</b></a> dialog box.</p>
110 </topic> 113 </topic>
111 <topic id="Autobest" title="Dipstick Report"> 114 <topic id="Autobest" title="Dipstick Report">
112 <heading scroll="no"><kin>Dipstick</kin> report</heading> 115 <heading scroll="no"><kin>Dipstick</kin> report</heading>
113 <p>When <kin>Dipstick</kin> has finished testing and there's nothing left but to start your download, you're presented with a suggestion about the best URL. From this dialog you may chose to browse to the location you like using <b>Previous Location</b> and <b>Next Location</b> buttons, <b>Open this URL</b>, <b>Copy URL</b> to clipboard or drag it to wherever you want.</p> 116 <p>When <kin>Dipstick</kin> has finished testing and there's nothing left but to start your download, you're presented with a suggestion about the best URL. From this dialog you may chose to browse to the location you like using <b>Previous Location</b> and <b>Next Location</b> buttons, <b>Open this URL</b>, <b>Copy URL</b> to clipboard or drag it to wherever you want.</p>
114 </topic> 117 </topic>
115</winhelp> 118</winhelp>
diff --git a/install/install.cpp b/install/install.cpp
index 296f3a3..1d91bc2 100644
--- a/install/install.cpp
+++ b/install/install.cpp
@@ -1,68 +1,68 @@
1#include "resource.h" 1#include "resource.h"
2#include "../shared-code/install.h" 2#include "../shared-code/install.h"
3 3
4#define KINNAME "Dipstick" 4#define KINNAME "Dipstick"
5#define KINSHORT KINNAME 5#define KINSHORT KINNAME
6#define VERSION "3.0" 6#define VERSION "3.1-trunk"
7 7
8BOOL Install(void) 8BOOL Install(void)
9{ 9{
10STRING dPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",KINSHORT "Path"); 10STRING dPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",KINSHORT "Path");
11STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath"); 11STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath");
12LPCSTR qPath = ((LPCSTR)dPath)?(LPCSTR)dPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings"); 12LPCSTR qPath = ((LPCSTR)dPath)?(LPCSTR)dPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings");
13STRING path = REQUESTPATH(" " KINNAME " " VERSION,"\nEnter destination path:",qPath); 13STRING path = REQUESTPATH(" " KINNAME " " VERSION,"\nEnter destination path:",qPath);
14 if(!path) 14 if(!path)
15 return NULL; 15 return NULL;
16 16
17 #ifdefK_ANNED 17 #ifdefK_ANNED
18STRING sysDir(_MAX_PATH); 18STRING sysDir(_MAX_PATH);
19 GetSystemDirectory(sysDir,_MAX_PATH); 19 GetSystemDirectory(sysDir,_MAX_PATH);
20 INSTALLFILE("mfc42.dl_",sysDir,"mfc42.dll"); 20 INSTALLFILE("mfc42.dl_",sysDir,"mfc42.dll");
21#endif 21#endif
22 22
23 MAKE_PATH(path); 23 MAKE_PATH(path);
24STRING shortPath = GET_SHORT_PATH(path); 24STRING shortPath = GET_SHORT_PATH(path);
25 if(!shortPath){ 25 if(!shortPath){
26 MessageBox(NULL,"Failed to install " KINNAME " " VERSION " in specified directory",NULL,MB_ICONERROR|MB_OK); 26 MessageBox(NULL,"Failed to install " KINNAME " " VERSION " in specified directory",NULL,MB_ICONERROR|MB_OK);
27 return FALSE; 27 return FALSE;
28 } 28 }
29 29
30 if(!( 30 if(!(
31 INSTALLFILE("dipstick.ex_",path,"dipstick.exe") && 31 INSTALLFILE("dipstick.ex_",path,"dipstick.exe") &&
32 INSTALLFILE("dipstick.hl_",path,"dipstick.hlp") && 32 INSTALLFILE("dipstick.hl_",path,"dipstick.hlp") &&
33 INSTALLFILE("dipstick.cn_",path,"dipstick.cnt") 33 INSTALLFILE("dipstick.cn_",path,"dipstick.cnt")
34 )){ 34 )){
35 MessageBox(NULL,"Failed to install " KINNAME " " VERSION " in specified directory",NULL,MB_ICONERROR|MB_OK); 35 MessageBox(NULL,"Failed to install " KINNAME " " VERSION " in specified directory",NULL,MB_ICONERROR|MB_OK);
36 return FALSE; 36 return FALSE;
37 } 37 }
38 ADDMENU("Klever Group",KINNAME,path,"dipstick.exe"); 38 ADDMENU("Klever Group",KINNAME,path,"dipstick.exe");
39 39
40 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",KINSHORT "Path",path); 40 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",KINSHORT "Path",path);
41 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath",path); 41 strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath",path);
42 42
43FILE* inf=CREATE_INF_FILE(path,KINSHORT ".INF"); 43FILE* inf=CREATE_INF_FILE(path,KINSHORT ".INF");
44 if(!inf){ 44 if(!inf){
45 MessageBox(NULL,"Failed to install " KINNAME " " VERSION,NULL,MB_ICONERROR|MB_OK); 45 MessageBox(NULL,"Failed to install " KINNAME " " VERSION,NULL,MB_ICONERROR|MB_OK);
46 return FALSE; 46 return FALSE;
47 } 47 }
48 INF_FILE_HEADER(inf); 48 INF_FILE_HEADER(inf);
49 INF_FILE_SECTION(inf,"Uninstall"); 49 INF_FILE_SECTION(inf,"Uninstall");
50 fprintf(inf,"AddReg=kFiles\nDelReg=kReg\nUpdateInis=kMenu\n"); 50 fprintf(inf,"AddReg=kFiles\nDelReg=kReg\nUpdateInis=kMenu\n");
51 INF_FILE_SECTION(inf,"kFiles"); 51 INF_FILE_SECTION(inf,"kFiles");
52 INF_REMOVE_ROOT(inf,KINSHORT "Files",path); 52 INF_REMOVE_ROOT(inf,KINSHORT "Files",path);
53 INF_REMOVE_FILE(inf,KINSHORT "Files","dipstick.exe"); 53 INF_REMOVE_FILE(inf,KINSHORT "Files","dipstick.exe");
54 INF_REMOVE_HELP_FILE(inf,KINSHORT "Files","dipstick"); 54 INF_REMOVE_HELP_FILE(inf,KINSHORT "Files","dipstick");
55 INF_REMOVE_FILE(inf,KINSHORT "Files",KINSHORT ".INF"); 55 INF_REMOVE_FILE(inf,KINSHORT "Files",KINSHORT ".INF");
56 INF_FILE_SECTION(inf,"kReg"); 56 INF_FILE_SECTION(inf,"kReg");
57 INF_UNINSTALL_REG(inf,KINSHORT); 57 INF_UNINSTALL_REG(inf,KINSHORT);
58 INF_FILE_SECTION(inf,"kMenu"); 58 INF_FILE_SECTION(inf,"kMenu");
59 INF_MENU_GROUP(inf,1,"Klever Group"); 59 INF_MENU_GROUP(inf,1,"Klever Group");
60 INF_MENU_ITEM(inf,1,KINNAME); 60 INF_MENU_ITEM(inf,1,KINNAME);
61 fclose(inf); 61 fclose(inf);
62 62
63 REG_UNINSTALL_COMMAND(KINSHORT,"Klever " KINNAME " " VERSION,shortPath,KINSHORT ".INF","Uninstall"); 63 REG_UNINSTALL_COMMAND(KINSHORT,"Klever " KINNAME " " VERSION,shortPath,KINSHORT ".INF","Uninstall");
64 64
65 MessageBox(NULL,KINNAME " " VERSION " installed successfully, you may now run it from 'Programs/Klever Group' menu or remove it using Control Panel Add/Remove Programs applet."," Rejoice!",MB_ICONINFORMATION|MB_OK); 65 MessageBox(NULL,KINNAME " " VERSION " installed successfully, you may now run it from 'Programs/Klever Group' menu or remove it using Control Panel Add/Remove Programs applet."," Rejoice!",MB_ICONINFORMATION|MB_OK);
66 66
67 return TRUE; 67 return TRUE;
68} 68}
diff --git a/install/install.rc b/install/install.rc
index 016c554..2bdee9c 100644
--- a/install/install.rc
+++ b/install/install.rc
@@ -1,182 +1,182 @@
1//Microsoft Developer Studio generated resource script. 1//Microsoft Developer Studio generated resource script.
2// 2//
3#include "resource.h" 3#include "resource.h"
4 4
5#define APSTUDIO_READONLY_SYMBOLS 5#define APSTUDIO_READONLY_SYMBOLS
6///////////////////////////////////////////////////////////////////////////// 6/////////////////////////////////////////////////////////////////////////////
7// 7//
8// Generated from the TEXTINCLUDE 2 resource. 8// Generated from the TEXTINCLUDE 2 resource.
9// 9//
10#include "afxres.h" 10#include "afxres.h"
11 11
12///////////////////////////////////////////////////////////////////////////// 12/////////////////////////////////////////////////////////////////////////////
13#undef APSTUDIO_READONLY_SYMBOLS 13#undef APSTUDIO_READONLY_SYMBOLS
14 14
15///////////////////////////////////////////////////////////////////////////// 15/////////////////////////////////////////////////////////////////////////////
16// English (U.S.) resources 16// English (U.S.) resources
17 17
18#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 18#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19#ifdef _WIN32 19#ifdef _WIN32
20LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 20LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21#pragma code_page(1252) 21#pragma code_page(1252)
22#endif //_WIN32 22#endif //_WIN32
23 23
24///////////////////////////////////////////////////////////////////////////// 24/////////////////////////////////////////////////////////////////////////////
25// 25//
26// Dialog 26// Dialog
27// 27//
28 28
29#if defined(APSTUDIO_INVOKED) || defined(FALSE) 29#if defined(APSTUDIO_INVOKED) || defined(FALSE)
30#if defined(APSTUDIO_INVOKED) 30#if defined(APSTUDIO_INVOKED)
31IDD_INSTALLING$(FALSE) DIALOGEX 0, 0, 200, 74 31IDD_INSTALLING$(FALSE) DIALOGEX 0, 0, 200, 74
32#else 32#else
33IDD_INSTALLING DIALOGEX 0, 0, 200, 74 33IDD_INSTALLING DIALOGEX 0, 0, 200, 74
34#endif 34#endif
35STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP 35STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP
36FONT 8, "MS Sans Serif", 0, 0, 0x1 36FONT 8, "MS Sans Serif", 0, 0, 0x1
37BEGIN 37BEGIN
38 PUSHBUTTON "Cancel",IDCANCEL,143,53,50,14,BS_CENTER | BS_VCENTER | 38 PUSHBUTTON "Cancel",IDCANCEL,143,53,50,14,BS_CENTER | BS_VCENTER |
39 BS_NOTIFY | BS_FLAT,WS_EX_DLGMODALFRAME 39 BS_NOTIFY | BS_FLAT,WS_EX_DLGMODALFRAME
40 CONTROL "Animate1",IDC_DISKS,"SysAnimate32",ACS_TRANSPARENT | 40 CONTROL "Animate1",IDC_DISKS,"SysAnimate32",ACS_TRANSPARENT |
41 ACS_AUTOPLAY | WS_TABSTOP,161,7,32,32 41 ACS_AUTOPLAY | WS_TABSTOP,161,7,32,32
42 LTEXT "",IDC_STATE,7,7,150,32,SS_NOPREFIX | SS_NOTIFY 42 LTEXT "",IDC_STATE,7,7,150,32,SS_NOPREFIX | SS_NOTIFY
43 CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,7,45, 43 CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,7,45,
44 186,7,WS_EX_DLGMODALFRAME 44 186,7,WS_EX_DLGMODALFRAME
45END 45END
46#endif 46#endif
47 47
48IDD_PATH DIALOGEX 0, 0, 255, 73 48IDD_PATH DIALOGEX 0, 0, 255, 73
49STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP | 49STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP |
50 WS_VISIBLE | WS_CAPTION 50 WS_VISIBLE | WS_CAPTION
51EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE 51EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
52FONT 8, "MS Sans Serif", 0, 0, 0x1 52FONT 8, "MS Sans Serif", 0, 0, 0x1
53BEGIN 53BEGIN
54 LTEXT "",IDC_PROMPT,7,7,241,30 54 LTEXT "",IDC_PROMPT,7,7,241,30
55 EDITTEXT IDC_PATH,7,37,195,12,ES_AUTOHSCROLL 55 EDITTEXT IDC_PATH,7,37,195,12,ES_AUTOHSCROLL
56 PUSHBUTTON "B&rowse..",IDC_BROWSE,208,37,40,12 56 PUSHBUTTON "B&rowse..",IDC_BROWSE,208,37,40,12
57 DEFPUSHBUTTON "OK",IDOK,69,52,50,14 57 DEFPUSHBUTTON "OK",IDOK,69,52,50,14
58 PUSHBUTTON "Cancel",IDCANCEL,135,52,50,14 58 PUSHBUTTON "Cancel",IDCANCEL,135,52,50,14
59END 59END
60 60
61 61
62///////////////////////////////////////////////////////////////////////////// 62/////////////////////////////////////////////////////////////////////////////
63// 63//
64// DESIGNINFO 64// DESIGNINFO
65// 65//
66 66
67#ifdef APSTUDIO_INVOKED 67#ifdef APSTUDIO_INVOKED
68GUIDELINES DESIGNINFO DISCARDABLE 68GUIDELINES DESIGNINFO DISCARDABLE
69BEGIN 69BEGIN
70 "IDD_INSTALLING$(FALSE)", DIALOG 70 "IDD_INSTALLING$(FALSE)", DIALOG
71 BEGIN 71 BEGIN
72 LEFTMARGIN, 7 72 LEFTMARGIN, 7
73 RIGHTMARGIN, 193 73 RIGHTMARGIN, 193
74 TOPMARGIN, 7 74 TOPMARGIN, 7
75 BOTTOMMARGIN, 67 75 BOTTOMMARGIN, 67
76 HORZGUIDE, 39 76 HORZGUIDE, 39
77 END 77 END
78 78
79 IDD_PATH, DIALOG 79 IDD_PATH, DIALOG
80 BEGIN 80 BEGIN
81 LEFTMARGIN, 7 81 LEFTMARGIN, 7
82 RIGHTMARGIN, 248 82 RIGHTMARGIN, 248
83 VERTGUIDE, 202 83 VERTGUIDE, 202
84 VERTGUIDE, 208 84 VERTGUIDE, 208
85 TOPMARGIN, 7 85 TOPMARGIN, 7
86 BOTTOMMARGIN, 66 86 BOTTOMMARGIN, 66
87 HORZGUIDE, 37 87 HORZGUIDE, 37
88 END 88 END
89END 89END
90#endif // APSTUDIO_INVOKED 90#endif // APSTUDIO_INVOKED
91 91
92 92
93#ifdef APSTUDIO_INVOKED 93#ifdef APSTUDIO_INVOKED
94///////////////////////////////////////////////////////////////////////////// 94/////////////////////////////////////////////////////////////////////////////
95// 95//
96// TEXTINCLUDE 96// TEXTINCLUDE
97// 97//
98 98
991 TEXTINCLUDE DISCARDABLE 991 TEXTINCLUDE DISCARDABLE
100BEGIN 100BEGIN
101 "resource.h\0" 101 "resource.h\0"
102END 102END
103 103
1042 TEXTINCLUDE DISCARDABLE 1042 TEXTINCLUDE DISCARDABLE
105BEGIN 105BEGIN
106 "#include ""afxres.h""\r\n" 106 "#include ""afxres.h""\r\n"
107 "\0" 107 "\0"
108END 108END
109 109
1103 TEXTINCLUDE DISCARDABLE 1103 TEXTINCLUDE DISCARDABLE
111BEGIN 111BEGIN
112 "#include ""custom.rch""\0" 112 "#include ""custom.rch""\0"
113END 113END
114 114
115#endif // APSTUDIO_INVOKED 115#endif // APSTUDIO_INVOKED
116 116
117 117
118///////////////////////////////////////////////////////////////////////////// 118/////////////////////////////////////////////////////////////////////////////
119// 119//
120// Icon 120// Icon
121// 121//
122 122
123// Icon with lowest ID value placed first to ensure application icon 123// Icon with lowest ID value placed first to ensure application icon
124// remains consistent on all systems. 124// remains consistent on all systems.
125IDI_ICON ICON DISCARDABLE "../shared-data/install-icon.ico" 125IDI_ICON ICON DISCARDABLE "../shared-data/install-icon.ico"
126 126
127#ifndef _MAC 127#ifndef _MAC
128///////////////////////////////////////////////////////////////////////////// 128/////////////////////////////////////////////////////////////////////////////
129// 129//
130// Version 130// Version
131// 131//
132 132
133VS_VERSION_INFO VERSIONINFO 133VS_VERSION_INFO VERSIONINFO
134 FILEVERSION 3,0,0,0 134 FILEVERSION 3,1,0,0
135 PRODUCTVERSION 3,0,0,0 135 PRODUCTVERSION 3,1,0,0
136 FILEFLAGSMASK 0x3fL 136 FILEFLAGSMASK 0x3fL
137#ifdef _DEBUG 137#ifdef _DEBUG
138 FILEFLAGS 0x1L 138 FILEFLAGS 0x1L
139#else 139#else
140 FILEFLAGS 0x0L 140 FILEFLAGS 0x0L
141#endif 141#endif
142 FILEOS 0x40004L 142 FILEOS 0x40004L
143 FILETYPE 0x1L 143 FILETYPE 0x1L
144 FILESUBTYPE 0x0L 144 FILESUBTYPE 0x0L
145BEGIN 145BEGIN
146 BLOCK "StringFileInfo" 146 BLOCK "StringFileInfo"
147 BEGIN 147 BEGIN
148 BLOCK "040904b0" 148 BLOCK "040904b0"
149 BEGIN 149 BEGIN
150 VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0" 150 VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0"
151 VALUE "FileDescription", "INSTALL: Dipstick, mirror locator\0" 151 VALUE "FileDescription", "INSTALL: Dipstick, mirror locator\0"
152 VALUE "FileVersion", "3, 0, 0, 0\0" 152 VALUE "FileVersion", "3, 1, 0, 0\0"
153 VALUE "InternalName", "INSTALL\0" 153 VALUE "InternalName", "INSTALL\0"
154 VALUE "LegalCopyright", "Copyright © 1996-2004 Klever Group (http://www.klever.net/)\0" 154 VALUE "LegalCopyright", "Copyright © 1996-2005 Klever Group (http://www.klever.net/)\0"
155 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0" 155 VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
156 VALUE "OriginalFilename", "INSTALL.EXE\0" 156 VALUE "OriginalFilename", "INSTALL.EXE\0"
157 VALUE "ProductName", "Dipstick\0" 157 VALUE "ProductName", "Dipstick\0"
158 VALUE "ProductVersion", "3, 0, 0, 0\0" 158 VALUE "ProductVersion", "3, 1, 0, 0\0"
159 END 159 END
160 END 160 END
161 BLOCK "VarFileInfo" 161 BLOCK "VarFileInfo"
162 BEGIN 162 BEGIN
163 VALUE "Translation", 0x409, 1200 163 VALUE "Translation", 0x409, 1200
164 END 164 END
165END 165END
166 166
167#endif // !_MAC 167#endif // !_MAC
168 168
169#endif // English (U.S.) resources 169#endif // English (U.S.) resources
170///////////////////////////////////////////////////////////////////////////// 170/////////////////////////////////////////////////////////////////////////////
171 171
172 172
173 173
174#ifndef APSTUDIO_INVOKED 174#ifndef APSTUDIO_INVOKED
175///////////////////////////////////////////////////////////////////////////// 175/////////////////////////////////////////////////////////////////////////////
176// 176//
177// Generated from the TEXTINCLUDE 3 resource. 177// Generated from the TEXTINCLUDE 3 resource.
178// 178//
179#include "custom.rch" 179#include "custom.rch"
180///////////////////////////////////////////////////////////////////////////// 180/////////////////////////////////////////////////////////////////////////////
181#endif // not APSTUDIO_INVOKED 181#endif // not APSTUDIO_INVOKED
182 182
diff --git a/resource.h b/resource.h
index 2af32cb..2f7b81e 100644
--- a/resource.h
+++ b/resource.h
@@ -1,149 +1,150 @@
1//{{NO_DEPENDENCIES}} 1//{{NO_DEPENDENCIES}}
2// Microsoft Developer Studio generated include file. 2// Microsoft Developer Studio generated include file.
3// Used by Dipstick.rc 3// Used by Dipstick.rc
4// 4//
5#define IDM_ABOUTBOX 0x0010 5#define IDM_ABOUTBOX 0x0010
6#define IDD_ABOUTBOX 100 6#define IDD_ABOUTBOX 100
7#define IDS_ABOUTBOX 101 7#define IDS_ABOUTBOX 101
8#define IDD_DIPSTICK_DIALOG 102 8#define IDD_DIPSTICK_DIALOG 102
9#define IDS_REGEX_NESTEDURL 102 9#define IDS_REGEX_NESTEDURL 102
10#define IDS_PS_FAILEDTOLOCK 102 10#define IDS_PS_FAILEDTOLOCK 102
11#define IDP_SOCKETS_INIT_FAILED 103 11#define IDP_SOCKETS_INIT_FAILED 103
12#define IDS_REGEX_CRACKHOST 104 12#define IDS_REGEX_CRACKHOST 104
13#define IDS_CSVEXT 104 13#define IDS_CSVEXT 104
14#define IDS_HN_BADURL 105 14#define IDS_HN_BADURL 105
15#define IDS_ABEST_CLEANUP 106 15#define IDS_ABEST_CLEANUP 106
16#define IDS_ABEST_NONEFOUND 107 16#define IDS_ABEST_NONEFOUND 107
17#define IDS_ABEST_TITLE 108 17#define IDS_ABEST_TITLE 108
18#define IDS_DRAGPAD_TITLE 109 18#define IDS_DRAGPAD_TITLE 109
19#define IDS_DRAGPAD_URLS 110 19#define IDS_DRAGPAD_URLS 110
20#define IDS_REGEX_HTMLURL 111 20#define IDS_REGEX_HTMLURL 111
21#define IDS_CSVFILTER 112 21#define IDS_CSVFILTER 112
22#define IDS_REGEX_URL 113
22#define IDR_MAINFRAME 128 23#define IDR_MAINFRAME 128
23#define IDD_DRAGPAD 129 24#define IDD_DRAGPAD 129
24#define IDR_DNDAVI 130 25#define IDR_DNDAVI 130
25#define IDD_OPTIONS 132 26#define IDD_OPTIONS 132
26#define IDR_MENU 133 27#define IDR_MENU 133
27#define IDD_MANUALHOST 134 28#define IDD_MANUALHOST 134
28#define IDD_PROPS 135 29#define IDD_PROPS 135
29#define IDI_PINGING 136 30#define IDI_PINGING 136
30#define IDI_PENDING 137 31#define IDI_PENDING 137
31#define IDI_COMPLETED 138 32#define IDI_COMPLETED 138
32#define IDI_UNREACHABLE 139 33#define IDI_UNREACHABLE 139
33#define IDB_DIABACK 140 34#define IDB_DIABACK 140
34#define IDD_AUTOBEST 141 35#define IDD_AUTOBEST 141
35#define IDW_BESTURL 142 36#define IDW_BESTURL 142
36#define IDR_DRAGAVI 143 37#define IDR_DRAGAVI 143
37#define IDD_URLS 145 38#define IDD_URLS 145
38#define IDC_HOSTLIST 1002 39#define IDC_HOSTLIST 1002
39#define IDC_DNDTARGET 1011 40#define IDC_DNDTARGET 1011
40#define IDC_OPTIONS 1013 41#define IDC_OPTIONS 1013
41#define IDC_NPINGS 1014 42#define IDC_NPINGS 1014
42#define IDC_PACKETSIZE 1015 43#define IDC_PACKETSIZE 1015
43#define IDC_TIMEOUT 1016 44#define IDC_TIMEOUT 1016
44#define IDC_INTERVAL 1017 45#define IDC_INTERVAL 1017
45#define IDC_KLEVERNET 1017 46#define IDC_KLEVERNET 1017
46#define IDC_MAXPINGS 1018 47#define IDC_MAXPINGS 1018
47#define IDC_MANUALPING 1019 48#define IDC_MANUALPING 1019
48#define IDC_HOST 1020 49#define IDC_HOST 1020
49#define IDC_REPING 1021 50#define IDC_REPING 1021
50#define IDC_IP 1021 51#define IDC_IP 1021
51#define IDC_REPINGALL 1022 52#define IDC_REPINGALL 1022
52#define IDC_CLEAR 1023 53#define IDC_CLEAR 1023
53#define IDC_EXIT 1024 54#define IDC_EXIT 1024
54#define IDC_REMOVE 1025 55#define IDC_REMOVE 1025
55#define IDC_URLCAPTION 1026 56#define IDC_URLCAPTION 1026
56#define IDC_URL 1027 57#define IDC_URL 1027
57#define IDC_HOSTCAPTION 1028 58#define IDC_HOSTCAPTION 1028
58#define IDC_IPCAPTION 1029 59#define IDC_IPCAPTION 1029
59#define IDC_TIMESCAPTION 1030 60#define IDC_TIMESCAPTION 1030
60#define IDC_TIMES 1031 61#define IDC_TIMES 1031
61#define IDC_LOSSCAPTION 1032 62#define IDC_LOSSCAPTION 1032
62#define IDC_LOSS 1033 63#define IDC_LOSS 1033
63#define IDC_STATUSCAPTION 1034 64#define IDC_STATUSCAPTION 1034
64#define IDC_STATUS 1035 65#define IDC_STATUS 1035
65#define IDC_OPENURL 1036 66#define IDC_OPENURL 1036
66#define IDC_STATE 1039 67#define IDC_STATE 1039
67#define IDC_MSWORKAROUND 1048 68#define IDC_MSWORKAROUND 1048
68#define IDC_SPINPINGS 1049 69#define IDC_SPINPINGS 1049
69#define IDC_SPINMAXPINGS 1050 70#define IDC_SPINMAXPINGS 1050
70#define IDC_SPINTIMEOUT 1051 71#define IDC_SPINTIMEOUT 1051
71#define IDC_RTT 1051 72#define IDC_RTT 1051
72#define IDC_SPINTERVAL 1052 73#define IDC_SPINTERVAL 1052
73#define IDC_PKTLOSS 1052 74#define IDC_PKTLOSS 1052
74#define IDC_SPINSIZE 1053 75#define IDC_SPINSIZE 1053
75#define IDC_PREV 1053 76#define IDC_PREV 1053
76#define IDC_AUTOBEST 1054 77#define IDC_AUTOBEST 1054
77#define IDC_NEXT 1054 78#define IDC_NEXT 1054
78#define IDC_SMARTADJUST 1055 79#define IDC_SMARTADJUST 1055
79#define IDC_DROPSOURCE 1056 80#define IDC_DROPSOURCE 1056
80#define IDC_URLS 1057 81#define IDC_URLS 1057
81#define IDC_DOADJUST 1058 82#define IDC_DOADJUST 1058
82#define IDC_ADJUSTINN 1059 83#define IDC_ADJUSTINN 1059
83#define IDC_IGNORELA 1060 84#define IDC_IGNORELA 1060
84#define IDC_COPYURL 1060 85#define IDC_COPYURL 1060
85#define IDC_ADVANCED 1061 86#define IDC_ADVANCED 1061
86#define IDS_KLEVERNET_URL 2102 87#define IDS_KLEVERNET_URL 2102
87#define IDS_PS_INTERNALERROR 2104 88#define IDS_PS_INTERNALERROR 2104
88#define IDS_PS_NETUNREACHABLE 2105 89#define IDS_PS_NETUNREACHABLE 2105
89#define IDS_PS_HOSTUNREACHABLE 2106 90#define IDS_PS_HOSTUNREACHABLE 2106
90#define IDS_PS_PROTUNREACHABLE 2107 91#define IDS_PS_PROTUNREACHABLE 2107
91#define IDS_PS_PORTUNREACHABLE 2108 92#define IDS_PS_PORTUNREACHABLE 2108
92#define IDS_PS_NORESOURCES 2109 93#define IDS_PS_NORESOURCES 2109
93#define IDS_PS_HWERROR 2110 94#define IDS_PS_HWERROR 2110
94#define IDS_PS_BIGPACKET 2111 95#define IDS_PS_BIGPACKET 2111
95#define IDS_PS_TIMEOUT 2112 96#define IDS_PS_TIMEOUT 2112
96#define IDS_PS_BADROUTE 2113 97#define IDS_PS_BADROUTE 2113
97#define IDS_PS_TTLEXPTRANSIT 2114 98#define IDS_PS_TTLEXPTRANSIT 2114
98#define IDS_PS_TTLEXPREASM 2115 99#define IDS_PS_TTLEXPREASM 2115
99#define IDS_PS_IPARAMP 2116 100#define IDS_PS_IPARAMP 2116
100#define IDS_PS_SOURCEQUENCH 2117 101#define IDS_PS_SOURCEQUENCH 2117
101#define IDS_PS_BIGOPTION 2118 102#define IDS_PS_BIGOPTION 2118
102#define IDS_PS_BADDEST 2119 103#define IDS_PS_BADDEST 2119
103#define IDS_PS_UNKNOWNERROR 2120 104#define IDS_PS_UNKNOWNERROR 2120
104#define IDS_REGISTRYKEY 2121 105#define IDS_REGISTRYKEY 2121
105#define IDS_FMT_TIMES 2122 106#define IDS_FMT_TIMES 2122
106#define IDS_FMT_LOSS 2123 107#define IDS_FMT_LOSS 2123
107#define IDS_TIP_UNREACHABLE 2124 108#define IDS_TIP_UNREACHABLE 2124
108#define IDS_PS_FAILEDTORESOLVE 2127 109#define IDS_PS_FAILEDTORESOLVE 2127
109#define IDS_PS_UNABLETOICMP 2128 110#define IDS_PS_UNABLETOICMP 2128
110#define IDS_TIP_PENDING 2130 111#define IDS_TIP_PENDING 2130
111#define IDS_TIP_COMPLETE 2131 112#define IDS_TIP_COMPLETE 2131
112#define IDS_TIP_PROPSOK 2132 113#define IDS_TIP_PROPSOK 2132
113#define IDS_TIP_INTERVAL 2133 114#define IDS_TIP_INTERVAL 2133
114#define IDS_TIP_OPTIONSOK 2134 115#define IDS_TIP_OPTIONSOK 2134
115#define IDS_TIP_OPTIONSCANCEL 2135 116#define IDS_TIP_OPTIONSCANCEL 2135
116#define IDS_TIP_PINGING 2136 117#define IDS_TIP_PINGING 2136
117#define ID_DRAGPAD_EXIT 32771 118#define ID_DRAGPAD_EXIT 32771
118#define ID_DRAGPAD_SHOWMAINWINDOW 32772 119#define ID_DRAGPAD_SHOWMAINWINDOW 32772
119#define ID_DRAGPAD_OPTIONS 32773 120#define ID_DRAGPAD_OPTIONS 32773
120#define ID_DRAGPAD_ABOUT 32774 121#define ID_DRAGPAD_ABOUT 32774
121#define ID_DRAGPAD_MANUALPING 32775 122#define ID_DRAGPAD_MANUALPING 32775
122#define ID_HOSTLIST_REPING 32776 123#define ID_HOSTLIST_REPING 32776
123#define ID_HOSTLIST_REMOVE 32777 124#define ID_HOSTLIST_REMOVE 32777
124#define ID_HOSTLIST_REPINGALL 32778 125#define ID_HOSTLIST_REPINGALL 32778
125#define ID_HOSTLIST_REMOVEALL 32779 126#define ID_HOSTLIST_REMOVEALL 32779
126#define ID_HOSTLIST_OPENURL 32780 127#define ID_HOSTLIST_OPENURL 32780
127#define ID_HOSTLIST_PROPERTIES 32781 128#define ID_HOSTLIST_PROPERTIES 32781
128#define ID_DRAGPAD_HELP 32782 129#define ID_DRAGPAD_HELP 32782
129#define ID_DRAGPAD_REPINGALL 32783 130#define ID_DRAGPAD_REPINGALL 32783
130#define ID_DRAGPAD_REMOVEALL 32784 131#define ID_DRAGPAD_REMOVEALL 32784
131#define ID_DRAGPAD_PASTEURL 32785 132#define ID_DRAGPAD_PASTEURL 32785
132#define ID_HOSTLIST_PASTEURL 32786 133#define ID_HOSTLIST_PASTEURL 32786
133#define ID_HOSTLIST_COPYURL 32787 134#define ID_HOSTLIST_COPYURL 32787
134#define ID_ADVANCED_EXPORTLIST 32788 135#define ID_ADVANCED_EXPORTLIST 32788
135#define ID_ADVANCED_IMPORTLIST 32789 136#define ID_ADVANCED_IMPORTLIST 32789
136#define ID_DRAGPAD_ADVANCED_EXPORTLIST 32790 137#define ID_DRAGPAD_ADVANCED_EXPORTLIST 32790
137#define ID_DRAGPAD_ADVANCED_IMPORTLIST 32791 138#define ID_DRAGPAD_ADVANCED_IMPORTLIST 32791
138 139
139// Next default values for new objects 140// Next default values for new objects
140// 141//
141#ifdef APSTUDIO_INVOKED 142#ifdef APSTUDIO_INVOKED
142#ifndef APSTUDIO_READONLY_SYMBOLS 143#ifndef APSTUDIO_READONLY_SYMBOLS
143#define _APS_3D_CONTROLS 1 144#define _APS_3D_CONTROLS 1
144#define _APS_NEXT_RESOURCE_VALUE 147 145#define _APS_NEXT_RESOURCE_VALUE 147
145#define _APS_NEXT_COMMAND_VALUE 32792 146#define _APS_NEXT_COMMAND_VALUE 32792
146#define _APS_NEXT_CONTROL_VALUE 1062 147#define _APS_NEXT_CONTROL_VALUE 1062
147#define _APS_NEXT_SYMED_VALUE 107 148#define _APS_NEXT_SYMED_VALUE 107
148#endif 149#endif
149#endif 150#endif
diff --git a/stdafx.h b/stdafx.h
index 06ef43f..ed0fe4e 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -1,36 +1,37 @@
1// stdafx.h : include file for standard system include files, 1// stdafx.h : include file for standard system include files,
2// or project specific include files that are used frequently, but 2// or project specific include files that are used frequently, but
3// are changed infrequently 3// are changed infrequently
4// 4//
5 5
6 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 6 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
7 7
8#include <afxwin.h> // MFC core and standard components 8#include <afxwin.h> // MFC core and standard components
9#include <afxext.h> // MFC extensions 9#include <afxext.h> // MFC extensions
10#ifndef _AFX_NO_AFXCMN_SUPPORT 10#ifndef _AFX_NO_AFXCMN_SUPPORT
11 #include <afxcmn.h> // MFC support for Windows 95 Common Controls 11 #include <afxcmn.h> // MFC support for Windows 95 Common Controls
12#endif // _AFX_NO_AFXCMN_SUPPORT 12#endif // _AFX_NO_AFXCMN_SUPPORT
13 13
14 #include <afxsock.h> // MFC socket extensions 14 #include <afxsock.h> // MFC socket extensions
15 15
16#include <afxole.h> 16#include <afxole.h>
17#include <afxtempl.h> 17#include <afxtempl.h>
18#include <afxmt.h> 18#include <afxmt.h>
19 19
20#include <winsock.h> 20#include <winsock.h>
21#include "shared-code/ms_icmp.h" 21#include "shared-code/ms_icmp.h"
22#include "shared-code/ip_icmp.h" 22#include "shared-code/ip_icmp.h"
23 23
24#include "shared-code/kICMP.h" 24#include "shared-code/kICMP.h"
25#include "shared-code/RegEx.h" 25#include "shared-code/RegEx.h"
26#include "CrackURL.h" 26#include "CrackURL.h"
27 27
28 enum{ 28 enum{
29 WM_DNP_ACTIVITYCOUNT = WM_USER+16, 29 WM_DNP_ACTIVITYCOUNT = WM_USER+16,
30 WM_DNP_URLPING, 30 WM_DNP_URLPING,
31 WM_DNP_UPDATEHOSTDATA, 31 WM_DNP_UPDATEHOSTDATA,
32 WM_DNP_HTML 32 WM_DNP_HTML,
33 WM_DNP_URLSPING
33}; 34};
34#include <MMSystem.h> 35#include <MMSystem.h>
35// CG: The following line was added by the Windows Multimedia component. 36// CG: The following line was added by the Windows Multimedia component.
36#pragma comment(lib, "winmm.lib") 37#pragma comment(lib, "winmm.lib")