summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--COPYING2
-rw-r--r--DipstickDlg.cpp48
-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, 76 insertions, 25 deletions
diff --git a/COPYING b/COPYING
index 427b0ba..fa23ff9 100644
--- a/COPYING
+++ b/COPYING
@@ -1,19 +1,19 @@
-Copyright (c) 1996-2004 Klever Group (http://www.klever.net/)
+Copyright (c) 1996-2005 Klever Group (http://www.klever.net/)
Permission 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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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.
diff --git a/DipstickDlg.cpp b/DipstickDlg.cpp
index ace2aff..f27b219 100644
--- a/DipstickDlg.cpp
+++ b/DipstickDlg.cpp
@@ -1,329 +1,332 @@
// DipstickDlg.cpp : implementation file
//
#include "stdafx.h"
#include "Dipstick.h"
#include "DipstickDlg.h"
#include "DragPad.h"
#include "OptionsDlg.h"
#include "HostNameDlg.h"
#include "HostProperties.h"
#include "AutoBestDlg.h"
#include "ddeml.h"
#include "URLSource.h"
#include "SelectURLsDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
virtual BOOL OnInitDialog();
//{{AFX_MSG(CAboutDlg)
afx_msg void OnKlevernet();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
ON_BN_CLICKED(IDC_KLEVERNET, OnKlevernet)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDipstickDlg dialog
CDipstickDlg::CDipstickDlg(CWnd* pParent /*=NULL*/)
: CDialog(CDipstickDlg::IDD, pParent),
m_DragPad(NULL), m_PingsPerHost(10), m_PingSize(32), m_TimeOut(5000), m_Interval(500),
m_SortCriteria(sortAvg), m_bShown(FALSE), m_MaxThreads(10), m_bExiting(FALSE),
m_bMSWorkAround(TRUE), m_MinSize(-1,-1), m_bAutoBest(TRUE), m_bSmartAdjust(TRUE),
m_bAdjustInnermost(TRUE), m_ActiveThreads(0), m_bIgnorelative(TRUE)
{
CWinApp *app = AfxGetApp();
ASSERT(app);
WORD hi,lo;
hi=app->GetProfileInt("Options","IntervalHi",HIWORD(m_Interval));
lo=app->GetProfileInt("Options","IntervalLo",LOWORD(m_Interval));
m_Interval=MAKELONG(lo,hi);
m_MaxThreads=app->GetProfileInt("Options","MaxThreads",m_MaxThreads);
m_PingSize=app->GetProfileInt("Options","PingSize",m_PingSize);
m_PingsPerHost=app->GetProfileInt("Options","PingsPerHost",m_PingsPerHost);
m_SortCriteria=app->GetProfileInt("Options","SortBy",m_SortCriteria);
hi=app->GetProfileInt("Options","TimeOutHi",HIWORD(m_TimeOut));
lo=app->GetProfileInt("Options","TimeOutLo",LOWORD(m_TimeOut));
m_TimeOut=MAKELONG(lo,hi);
m_bMSWorkAround = app->GetProfileInt("Options","InnermostURL",m_bMSWorkAround);
m_bAutoBest = app->GetProfileInt("Options","AutoBest",m_bAutoBest);
m_bSmartAdjust = app->GetProfileInt("Options","SmartAdjust",m_bSmartAdjust);
m_bAdjustInnermost = app->GetProfileInt("Options","AdjustInnermost",m_bAdjustInnermost);
m_bIgnorelative = app->GetProfileInt("Options","IgnoreRelative",m_bIgnorelative);
m_impexPath = app->GetProfileString("Options","ImportExportPath",m_impexPath);
//{{AFX_DATA_INIT(CDipstickDlg)
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_bmpBack.LoadBitmap(IDB_DIABACK);
m_bmpBack.GetBitmap(&m_bitmapBack);
CString tmp;
VERIFY(tmp.LoadString(IDS_REGEX_HTMLURL));
VERIFY(m_reHTMLURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase));
+ VERIFY(tmp.LoadString(IDS_REGEX_URL));
+ VERIFY(m_reURL.Compile(tmp,CRegEx::regExtended|CRegEx::regIgnoreCase));
}
CDipstickDlg::~CDipstickDlg()
{
}
void CDipstickDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDipstickDlg)
DDX_Control(pDX, IDC_ADVANCED, m_AdvancedCtl);
DDX_Control(pDX, ID_HELP, m_HelpCtl);
DDX_Control(pDX, IDC_EXIT, m_ExitCtl);
DDX_Control(pDX, IDC_OPTIONS, m_OptionsCtl);
DDX_Control(pDX, IDC_MANUALPING, m_ManualPingCtl);
DDX_Control(pDX, IDC_REMOVE, m_RemoveCtl);
DDX_Control(pDX, IDC_REPINGALL, m_RepingAllCtl);
DDX_Control(pDX, IDC_REPING, m_RepingCtl);
DDX_Control(pDX, IDC_CLEAR, m_ClearListCtl);
DDX_Control(pDX, IDC_HOSTLIST, m_HostList);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDipstickDlg, CDialog)
//{{AFX_MSG_MAP(CDipstickDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_WM_DESTROY()
ON_BN_CLICKED(IDC_OPTIONS, OnOptions)
+ ON_MESSAGE(WM_DNP_URLSPING, OnURLSPing)
ON_MESSAGE(WM_DNP_URLPING, OnUrlPing)
ON_MESSAGE(WM_DNP_ACTIVITYCOUNT, OnActivityCount)
ON_MESSAGE(WM_DNP_UPDATEHOSTDATA, OnUpdateHostData)
ON_MESSAGE(WM_DNP_HTML, OnHTMLTransfer)
ON_NOTIFY(LVN_COLUMNCLICK, IDC_HOSTLIST, OnColumnclickHostlist)
ON_WM_WINDOWPOSCHANGING()
ON_COMMAND(ID_DRAGPAD_OPTIONS, OnDragpadOptions)
ON_COMMAND(ID_DRAGPAD_SHOWMAINWINDOW, OnDragpadShowmainwindow)
ON_COMMAND(ID_DRAGPAD_HELP, OnDragpadHelp)
ON_COMMAND(ID_DRAGPAD_ABOUT, OnDragpadAbout)
ON_COMMAND(ID_DRAGPAD_EXIT, OnDragpadExit)
ON_BN_CLICKED(IDC_MANUALPING, OnManualping)
ON_COMMAND(ID_DRAGPAD_MANUALPING, OnDragpadManualping)
ON_COMMAND(ID_DRAGPAD_REPINGALL, OnDragpadRepingAll)
ON_COMMAND(ID_DRAGPAD_REMOVEALL, OnDragpadRemoveAll)
ON_BN_CLICKED(IDC_REPING, OnReping)
ON_BN_CLICKED(IDC_REPINGALL, OnRepingall)
ON_BN_CLICKED(IDC_CLEAR, OnClear)
ON_NOTIFY(LVN_INSERTITEM, IDC_HOSTLIST, OnInsertitemHostlist)
ON_NOTIFY(LVN_DELETEITEM, IDC_HOSTLIST, OnDeleteitemHostlist)
ON_NOTIFY(LVN_DELETEALLITEMS, IDC_HOSTLIST, OnDeleteallitemsHostlist)
ON_BN_CLICKED(IDC_EXIT, OnExit)
ON_NOTIFY(LVN_ITEMCHANGED, IDC_HOSTLIST, OnItemchangedHostlist)
ON_BN_CLICKED(IDC_REMOVE, OnRemove)
ON_NOTIFY(NM_RCLICK, IDC_HOSTLIST, OnRclickHostlist)
ON_COMMAND(ID_HOSTLIST_REPING, OnHostListReping)
ON_COMMAND(ID_HOSTLIST_REMOVE, OnHostListRemove)
ON_COMMAND(ID_HOSTLIST_REPINGALL, OnHostListRepingAll)
ON_COMMAND(ID_HOSTLIST_REMOVEALL, OnHostListRemoveAll)
ON_COMMAND(ID_HOSTLIST_OPENURL, OnHostListOpenURL)
ON_COMMAND(ID_HOSTLIST_PROPERTIES, OnHostListProperties)
ON_NOTIFY(NM_DBLCLK, IDC_HOSTLIST, OnDblclkHostlist)
ON_WM_CLOSE()
ON_WM_GETMINMAXINFO()
ON_WM_SIZE()
ON_BN_CLICKED(ID_HELP, OnHelp)
ON_NOTIFY(LVN_BEGINDRAG, IDC_HOSTLIST, OnBegindragHostlist)
ON_COMMAND(ID_HOSTLIST_PASTEURL, OnPasteurl)
ON_COMMAND(ID_HOSTLIST_COPYURL, OnHostlistCopyurl)
ON_WM_HELPINFO()
ON_WM_DROPFILES()
ON_BN_CLICKED(IDC_ADVANCED, OnAdvanced)
ON_COMMAND(ID_ADVANCED_EXPORTLIST, OnAdvancedExportlist)
ON_COMMAND(ID_ADVANCED_IMPORTLIST, OnAdvancedImportlist)
ON_COMMAND(ID_DRAGPAD_PASTEURL, OnPasteurl)
ON_COMMAND(ID_DRAGPAD_ADVANCED_EXPORTLIST, OnDragpadAdvancedExportlist)
ON_COMMAND(ID_DRAGPAD_ADVANCED_IMPORTLIST, OnDragpadAdvancedImportlist)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDipstickDlg message handlers
BOOL CDipstickDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
CRect wrci, wrco;
GetWindowRect(&wrco);
GetClientRect(&wrci);
CRect brc1, brc2, lrc;
m_HostList.GetWindowRect(&lrc);
ScreenToClient(&lrc);
m_ManualPingCtl.GetWindowRect(&brc1);
ScreenToClient(brc1);
m_RepingCtl.GetWindowRect(&brc2);
ScreenToClient(&brc2);
m_OverX = lrc.left;
m_OverY = lrc.top;
m_GapY = brc2.top - brc1.bottom;
m_MinSize.cx = m_OverX+m_OverX+m_OverX+brc1.Width()+m_OverX;
m_MinSize.cy = m_OverY+(brc1.Height()+m_GapY)*6+(brc1.Height()+m_GapY)*3+m_OverY;
m_MinSize.cx+=wrco.Width()-wrci.Width();
m_MinSize.cy+=wrco.Height()-wrci.Height();
CWinApp *app = AfxGetApp();
ASSERT(app);
CRect wrc;
wrc.top=app->GetProfileInt("Windows","DlgTop",-1);
wrc.bottom=app->GetProfileInt("Windows","DlgBottom",-1);
wrc.left=app->GetProfileInt("Windows","DlgLeft",-1);
wrc.right=app->GetProfileInt("Windows","DlgRight",-1);
if((wrc.top!=-1|| wrc.bottom!=-1) && wrc.left!=-1&& wrc.right!=-1)
MoveWindow(&wrc);
RecalcLayout(-1,-1);
m_DragPad = new CDragPad();
m_DragPad->m_Daddy=this;
m_DragPad->Create(CDragPad::IDD);
m_Images.Create(16,16,TRUE,4,1);
m_iPending=m_Images.Add(app->LoadIcon(IDI_PENDING));
m_iPinging=m_Images.Add(app->LoadIcon(IDI_PINGING));
m_iCompleted=m_Images.Add(app->LoadIcon(IDI_COMPLETED));
m_iUnreachable=m_Images.Add(app->LoadIcon(IDI_UNREACHABLE));
ASSERT(!(m_iPending<0 || m_iPinging<0 || m_iCompleted<0 || m_iUnreachable<0));
m_HostList.SetImageList(&m_Images,LVSIL_NORMAL);
m_HostList.SetImageList(&m_Images,LVSIL_SMALL);
m_HostList.SetImageList(&m_Images,LVSIL_STATE);
m_HostList.SetTextColor(RGB(255,255,0)); // Yellow
m_HostList.SetTextBkColor(RGB(12,167,0)); // Green
m_HostList.SetBkColor(RGB(12,167,0)); // Green
CRect listrc;
m_HostList.GetClientRect(&listrc);
m_HostList.InsertColumn(0,"Host Name",LVCFMT_LEFT,app->GetProfileInt("Columns","HostName",listrc.Width()-(listrc.Width()*2/16)*4-(listrc.Width()*3/16)),subitemHost);
m_HostList.InsertColumn(1,"Host IP",LVCFMT_LEFT,app->GetProfileInt("Columns","HostIP",listrc.Width()*3/16),subitemIP);
m_HostList.InsertColumn(2,"Min RTT",LVCFMT_RIGHT,app->GetProfileInt("Columns","MinRTT",listrc.Width()*2/16),subitemMin);
m_HostList.InsertColumn(3,"Avg RTT",LVCFMT_RIGHT,app->GetProfileInt("Columns","AvgRTT",listrc.Width()*2/16),subitemAvg);
m_HostList.InsertColumn(4,"Max RTT",LVCFMT_RIGHT,app->GetProfileInt("Columns","MaxRTT",listrc.Width()*2/16),subitemMax);
m_HostList.InsertColumn(5,"Pktloss", LVCFMT_RIGHT,app->GetProfileInt("Columns","PktLoss",listrc.Width()*2/16),subitemPacketloss);
DragAcceptFiles(TRUE);
return TRUE; // return TRUE unless you set the focus to a control
}
void CDipstickDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CDipstickDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CPaintDC pDC(this);
CDC bmpDC;
bmpDC.CreateCompatibleDC(&pDC);
bmpDC.SelectObject(&m_bmpBack);
CRect rc;
GetClientRect(&rc);
for(int x=-m_bitmapBack.bmWidth*2/4;x<rc.Width();x+=m_bitmapBack.bmWidth)
for(int y=-m_bitmapBack.bmHeight*2/4;y<rc.Height();y+=m_bitmapBack.bmHeight)
pDC.BitBlt(x,y,m_bitmapBack.bmWidth,m_bitmapBack.bmHeight,&bmpDC,0,0,SRCCOPY);
bmpDC.DeleteDC();
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CDipstickDlg::OnQueryDragIcon()
{
@@ -996,456 +999,495 @@ void CDipstickDlg::OnHostListProperties()
return;
int items = m_HostList.GetItemCount();
for(int tmp=0;tmp<items;tmp++){
if((m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED))&LVIS_SELECTED)
break;
}
ASSERT(tmp<items);
CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp);
ASSERT(host);
CHostProperties hp(this);
hp.SetHost(host);
hp.DoModal();
}
void CDipstickDlg::OnDblclkHostlist(NMHDR* pNMHDR, LRESULT* pResult)
{
OnHostListOpenURL();
*pResult = 0;
}
void CDipstickDlg::OnClose()
{
m_bShown=FALSE;
ShowWindow(SW_HIDE);
}
BOOL CAboutDlg::OnInitDialog()
{
CDialog::OnInitDialog();
return TRUE;
}
void CDipstickDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
CDialog::OnGetMinMaxInfo(lpMMI);
if(m_MinSize.cx>0 && m_MinSize.cy>0){
lpMMI->ptMinTrackSize.x = m_MinSize.cx;
lpMMI->ptMinTrackSize.y = m_MinSize.cy;
}
}
void CDipstickDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
if(nType==SIZE_RESTORED)
RecalcLayout(cx,cy);
}
void CDipstickDlg::RecalcLayout(int,int)
{
CRect wrc;
GetClientRect(&wrc);
CRect brc;
m_ManualPingCtl.GetWindowRect(&brc);
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);
int xb = wrc.Width()-m_OverX-brc.Width();
int cyb = brc.Height()+m_GapY;
m_ManualPingCtl.SetWindowPos(NULL,xb,m_OverY,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
m_RepingCtl.SetWindowPos(NULL,xb,m_OverY+cyb,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
m_RepingAllCtl.SetWindowPos(NULL,xb,m_OverY+cyb*2,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
m_RemoveCtl.SetWindowPos(NULL,xb,m_OverY+cyb*3,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
m_ClearListCtl.SetWindowPos(NULL,xb,m_OverY+cyb*4,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
m_AdvancedCtl.SetWindowPos(NULL,xb,m_OverY+cyb*5,0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
m_ExitCtl.SetWindowPos(NULL,xb,wrc.Height()-m_OverY-brc.Height(),0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
m_OptionsCtl.SetWindowPos(NULL,xb,wrc.Height()-m_OverY-cyb-brc.Height(),0,0,SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS);
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);
}
void CDipstickDlg::OnHelp()
{
WinHelp(0,HELP_FINDER);
}
void CDipstickDlg::UpdateDragpadTitle()
{
int ic = m_HostList.GetItemCount();
CString title;
if(!ic){
VERIFY(title.LoadString(IDS_DRAGPAD_TITLE));
}else{
int ip = 0;
POSITION p = m_Hosts.GetHeadPosition();
while(p){
CPingyHost *host = m_Hosts.GetNext(p);
ASSERT(host);
if(!(host->m_Pinging || host->m_bToPing))
ip++;
}
title.Format(IDS_DRAGPAD_URLS,ip,ic);
}
if(m_DragPad)
m_DragPad->SetWindowText(title);
}
void CDipstickDlg::OnBegindragHostlist(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
if(pNMListView->iItem>=0){
CPingyHost *host = (CPingyHost*) m_HostList.GetItemData(pNMListView->iItem);
ASSERT(host);
if(!host->m_URL.IsEmpty()){
CURLSource us(host->m_URL);
us.DoDragDrop(DROPEFFECT_COPY|DROPEFFECT_LINK);
}
}
*pResult = 0;
}
void CDipstickDlg::OnPasteurl()
{
COleDataObject odo;
if(!odo.AttachClipboard())
return;
CollectURLs(&odo,FALSE);
}
BOOL CDipstickDlg::IsPasteableClipboard()
{
COleDataObject odo;
if(!odo.AttachClipboard())
return FALSE;
if(CollectURLs(&odo,TRUE))
return TRUE;
return FALSE;
}
BOOL CDipstickDlg::CollectURLs(COleDataObject* pDO,BOOL bTestOnly)
{
UINT cfURL = RegisterClipboardFormat("UniformResourceLocator");
UINT cfHTML = RegisterClipboardFormat("HTML Format");
UINT cfNIF = RegisterClipboardFormat("Netscape Image Format");
if(pDO->IsDataAvailable(cfURL)){
if(!bTestOnly){
HGLOBAL hg = pDO->GetGlobalData(cfURL);
ASSERT(hg);
LPVOID lpv = GlobalLock(hg);
ASSERT(lpv);
PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)lpv));
GlobalUnlock(hg);
GlobalFree(hg);
}
return TRUE;
}
if(pDO->IsDataAvailable(cfHTML)){
HGLOBAL hg = pDO->GetGlobalData(cfHTML);
ASSERT(hg);
LPCTSTR lps = (LPCTSTR)GlobalLock(hg);
ASSERT(lps);
BOOL rv = FALSE;
do{
static LPCTSTR v10 = "Version:1.0\r\n";
if(memcmp(v10,lps,strlen(v10)))
break;
static LPCTSTR strStartSelection = "StartSelection:";
static LPCTSTR strEndSelection = "EndSelection:";
static LPCTSTR strSourceURL = "SourceURL:";
LPTSTR subs = strstr(lps,strStartSelection);
if(!subs)
break;
LONG startSelection = atol(&subs[strlen(strStartSelection)]);
if(!startSelection)
break;
if(!(subs=strstr(lps,strEndSelection)))
break;
LONG endSelection = atol(&subs[strlen(strEndSelection)]);
if(!endSelection)
break;
if(!(subs=strstr(lps,strSourceURL)))
break;
subs = &subs[strlen(strSourceURL)];
LPTSTR eol = strchr(subs,'\r');
if(!eol)
break;
(*eol)=0;
CString sourceURL = subs;
if(!sourceURL.GetLength())
break;
TRACE0("SourceURL = "+sourceURL+"\n");
_xferHTML* xf = new _xferHTML;
VERIFY(xf->src.Crack(sourceURL));
LPTSTR htmlBuff = xf->html.GetBuffer(endSelection-startSelection+2);
ASSERT(htmlBuff);
memmove(htmlBuff,&lps[startSelection],endSelection-startSelection+1);
htmlBuff[endSelection-startSelection+1]=0;
xf->html.ReleaseBuffer();
if(bTestOnly){
rv = m_reHTMLURL.Match(xf->html);
delete xf;
}else{
PostMessage(WM_DNP_HTML,0,(LPARAM)xf);
+ rv = TRUE;
}
}while(FALSE);
GlobalUnlock(hg);
GlobalFree(hg);
return rv;
}
if(pDO->IsDataAvailable(cfNIF)){
if(!bTestOnly){
HGLOBAL hg = pDO->GetGlobalData(cfNIF);
ASSERT(hg);
LPVOID lpv = GlobalLock(hg);
ASSERT(lpv);
struct _nif {
BYTE data[0x20];
DWORD m_offDescr;
DWORD m_offURL;
DWORD m_offToImage;
} *nif = (_nif*)lpv;
PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)&nif->data[nif->m_offURL]));
GlobalUnlock(hg);
GlobalFree(hg);
}
return TRUE;
}
if(pDO->IsDataAvailable(CF_TEXT)){
- if(!bTestOnly){
+ BOOL rv = FALSE;
HGLOBAL hg = pDO->GetGlobalData(CF_TEXT);
ASSERT(hg);
LPVOID lpv = GlobalLock(hg);
ASSERT(lpv);
+ if(bTestOnly){
+ rv = m_reURL.Match((LPCSTR)lpv);
+ }else{
+ CString sel = (LPCSTR)lpv;
+ if(m_reURL.Match(sel)) {
+ rv = TRUE;
+ CString tmp = m_reURL.GetMatch(CRegEx::matchPostMatch);
+ if(m_reURL.Match(tmp)) {
+ PostMessage(WM_DNP_URLSPING,0,(LPARAM)new CString((LPCSTR)lpv));
+ }else{
PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString((LPCTSTR)lpv));
+ }
+ }
+ }
GlobalUnlock(hg);
GlobalFree(hg);
- }
- return TRUE;
+ return rv;
}
return FALSE;
}
LRESULT CDipstickDlg::OnHTMLTransfer(WPARAM wP, LPARAM lP)
{
_xferHTML* xf = (_xferHTML*)lP;
CSelectURLsDlg su;
su.m_bAdjust = m_bSmartAdjust;
su.m_bAdjustInnermost = m_bAdjustInnermost;
BeginWaitCursor();
while(m_reHTMLURL.Match(xf->html)){
CString url = m_reHTMLURL.GetMatch(1);
xf->html = m_reHTMLURL.GetMatch(CRegEx::matchPostMatch);
if(CCrackURL::GetHostName(url)==url){
if(m_bIgnorelative)
continue;
CCrackURL cracked;
VERIFY(cracked.Crack(url));
cracked.Adjust(xf->src);
url = cracked.Build();
}
if(!su.m_URLs.Find(url))
VERIFY(su.m_URLs.AddTail(url));
}
EndWaitCursor();
delete xf;
if(su.DoModal()==IDOK){
POSITION p = su.m_URLs.GetHeadPosition();
while(p){
CString url = su.m_URLs.GetNext(p);
PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString(url));
}
}
return 0;
}
+LRESULT CDipstickDlg::OnURLSPing(WPARAM wP,LPARAM lP)
+{
+CString *sel = (CString*)lP;
+TRACE1("URLS: %s\n",(LPCTSTR)*sel);
+CSelectURLsDlg su;
+ su.m_bAdjust = m_bSmartAdjust;
+ su.m_bAdjustInnermost = m_bAdjustInnermost;
+ BeginWaitCursor();
+ while(m_reURL.Match(*sel)){
+ CString url = m_reURL.GetMatch(CRegEx::matchMatch);
+ (*sel) = m_reURL.GetMatch(CRegEx::matchPostMatch);
+ if(!su.m_URLs.Find(url))
+ VERIFY(su.m_URLs.AddTail(url));
+ }
+ EndWaitCursor();
+ delete sel;
+ if(su.DoModal()==IDOK){
+ POSITION p = su.m_URLs.GetHeadPosition();
+ while(p){
+ CString url = su.m_URLs.GetNext(p);
+ PostMessage(WM_DNP_URLPING,0,(LPARAM)new CString(url));
+ }
+ }
+ return 0;
+}
+
UINT CPingyHost::PingProc(LPVOID pParam)
{
CPingyHost* pThis = (CPingyHost*)pParam;
ASSERT(pThis->m_Daddy);
return pThis->DoPing();
}
UINT CPingyHost::DoPing()
{
CSingleLock slock(&m_mutex);
if(!slock.Lock(2000)){
m_Status.LoadString(IDS_PS_FAILEDTOLOCK);
return 1;
}
m_Pinging = TRUE;
m_bToPing = FALSE;
VERIFY(m_Daddy->m_eveStartup.SetEvent());
m_Daddy->PostMessage(WM_DNP_UPDATEHOSTDATA,0,(LPARAM)this);
in_addr ip;
UINT packets, lost;
packets=lost=0;
CICMP* pICMP = NULL;
UINT dataSize = m_Daddy->m_PingSize;
int ploss = 100;
do{
if(m_HostName.IsEmpty()){
ip.s_addr = m_IP;
hostent *he = gethostbyaddr((char*)&ip,4,PF_INET);
if(!he)
m_HostName.Empty();
else
m_HostName = he->h_name;
}else{
hostent *he = gethostbyname(m_HostName);
if(!he){
m_Status.LoadString(IDS_PS_FAILEDTORESOLVE);
m_IP = 0;
break;
}
memmove(&ip.s_addr,he->h_addr,sizeof(ip.s_addr));
m_IP = ip.s_addr;
}
pICMP = CICMP::CreateICMP();
if(!(pICMP && pICMP->Initialize())){
m_Status.LoadString(IDS_PS_UNABLETOICMP);
break;
}
m_Daddy->PostMessage(WM_DNP_UPDATEHOSTDATA,0,(LPARAM)this);
ULONG sum, num, pmin, pmax;
sum = num = 0;
pmin = 0xFFFFFFFF;
pmax = 0;
UINT seq;
for(seq = 0;seq<m_Daddy->m_PingsPerHost;seq++){
INT status;
LONG rtt = pICMP->Ping(ip,dataSize,m_Daddy->m_TimeOut,&status);
UINT stString = 0;
switch(status){
case CICMP::ipSuccess:
sum+=rtt; num++;
if(rtt<pmin)
pmin=rtt;
if(rtt>pmax)
pmax=rtt;
break;
case CICMP::ipBuffTooSmall: stString = IDS_PS_INTERNALERROR;
break;
case CICMP::ipDestNetUnreachable: stString = IDS_PS_NETUNREACHABLE;
break;
case CICMP::ipDestHostUnreachable: stString = IDS_PS_HOSTUNREACHABLE;
break;
case CICMP::ipDestProtUnreachable: stString = IDS_PS_PROTUNREACHABLE;
break;
case CICMP::ipDestPortUnreachable: stString = IDS_PS_PORTUNREACHABLE;
break;
case CICMP::ipNoResources: stString = IDS_PS_NORESOURCES;
break;
case CICMP::ipBadOption: stString = IDS_PS_INTERNALERROR;
break;
case CICMP::ipHWError: stString = IDS_PS_HWERROR;
break;
case CICMP::ipPacketTooBig: stString = IDS_PS_BIGPACKET;
break;
case CICMP::ipTimeOut: stString = IDS_PS_TIMEOUT;
break;
case CICMP::ipBadRequest: stString = IDS_PS_INTERNALERROR;
break;
case CICMP::ipBadRoute: stString = IDS_PS_BADROUTE;
break;
case CICMP::ipTTLExpiredInTransit: stString = IDS_PS_TTLEXPTRANSIT;
break;
case CICMP::ipTTLExpiredInReasm: stString = IDS_PS_TTLEXPREASM;
break;
case CICMP::ipParamProblem: stString = IDS_PS_IPARAMP;
break;
case CICMP::ipSourceQuench: stString = IDS_PS_SOURCEQUENCH;
break;
case CICMP::ipOptionTooBig: stString = IDS_PS_BIGOPTION;
break;
case CICMP::ipBadDest: stString = IDS_PS_BADDEST;
break;
default:
stString = IDS_PS_UNKNOWNERROR;
break;
}
if(stString)
m_Status.LoadString(stString);
packets++;
if(rtt<0)
lost++;
Sleep(m_Daddy->m_Interval);
}
if(packets==lost || !packets){
ploss=100;
}else{
ploss = lost*100/packets;
m_MinRTT = pmin;
m_MaxRTT = pmax;
if(sum){
ASSERT(num);
m_AvgRTT = sum/num;
}else{
m_AvgRTT = 0;
}
}
}while(FALSE);
m_Packetloss=ploss;
m_Pinged=TRUE;
m_Pinging=FALSE;
if(pICMP){
pICMP->Deinitialize();
delete pICMP;
}
m_Daddy->PostMessage(WM_DNP_UPDATEHOSTDATA,0,(LPARAM)this);
m_Daddy->PostMessage(WM_DNP_ACTIVITYCOUNT,(WPARAM)-1);
return 0;
}
void CPingyHost::Ping()
{
ASSERT(m_Daddy);
m_Daddy->m_eveStartup.ResetEvent();
if(!AfxBeginThread(CPingyHost::PingProc,this)){
ASSERT(FALSE);
}else{
CSingleLock sl(&m_Daddy->m_eveStartup);
sl.Lock();
m_Daddy->SendMessage(WM_DNP_ACTIVITYCOUNT,(WPARAM)1); // *** AWFUL! Shouldn't be here!
}
}
void CDipstickDlg::OnHostlistCopyurl()
{
if(m_HostList.GetSelectedCount()!=1)
return;
int items = m_HostList.GetItemCount();
for(int tmp=0;tmp<items;tmp++){
if((m_HostList.GetItemState(tmp,LVIS_SELECTED|LVIS_FOCUSED))&LVIS_SELECTED)
break;
}
ASSERT(tmp<items);
CPingyHost *host = (CPingyHost*)m_HostList.GetItemData(tmp);
ASSERT(host);
if(!host->m_URL.IsEmpty()){
CURLSource *us = new CURLSource(host->m_URL);
us->SetClipboard();
us->FlushClipboard();
}
}
BOOL CDipstickDlg::OnHelpInfo(HELPINFO* pHelpInfo)
{
WinHelp(IDD|0x20000l);
return TRUE;
}
void CDipstickDlg::OnDropFiles(HDROP hDropInfo)
{
// *** Import only 1st file, but maybe we should fall into prompt mode if multiple files are dropped.
CString fileName;
int bufferSize = DragQueryFile(hDropInfo,0,NULL,0);
DragQueryFile(hDropInfo,0,fileName.GetBuffer(bufferSize+2),bufferSize+1);
fileName.ReleaseBuffer();
if(fileName.IsEmpty())
CDialog::OnDropFiles(hDropInfo);
else
ImportLocations(fileName);
}
BOOL CDipstickDlg::ImportLocations(LPCTSTR file)
{
CString fileLine;
diff --git a/DipstickDlg.h b/DipstickDlg.h
index ce9ed22..47c3e01 100644
--- a/DipstickDlg.h
+++ b/DipstickDlg.h
@@ -1,184 +1,186 @@
// DipstickDlg.h : header file
//
class CDipstickDlg;
struct CPingyHost {
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) {}
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) {}
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) {}
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) {}
public:
static UINT SuicideProc(LPVOID pParam);
void Suicide();
void Ping();
UINT DoPing();
static UINT PingProc(LPVOID);
CDipstickDlg* m_Daddy;
CMutex m_mutex;
CString m_Descr;
CString m_URL;
BOOL m_bToPing;
BOOL m_Pinging;
CString m_HostName;
CString m_Status;
DWORD m_IP;
ULONG m_MinRTT;
ULONG m_AvgRTT;
ULONG m_MaxRTT;
BOOL m_Pinged;
int m_Packetloss;
};
typedef CList<CPingyHost*,CPingyHost*> CHostList;
/////////////////////////////////////////////////////////////////////////////
// CDipstickDlg dialog
class CDragPad;
class CDipstickDlg : public CDialog
{
// Construction
struct _xferHTML {
CString html;
CCrackURL src;
};
public:
+ LRESULT OnURLSPing(WPARAM wP,LPARAM lP);
+ CRegEx m_reURL;
BOOL ExportLocations(LPCTSTR file);
CString m_impexPath;
BOOL ImportLocations(LPCTSTR file);
BOOL m_bIgnorelative;
CEvent m_eveStartup;
UINT volatile m_ActiveThreads;
BOOL m_bAdjustInnermost;
BOOL m_bSmartAdjust;
BOOL CollectURLs(COleDataObject* pDO,BOOL bTestOnly=FALSE);
BOOL IsPasteableClipboard();
void UpdateDragpadTitle();
BOOL m_bAutoBest;
void RecalcLayout(int cx,int cy);
CSize m_MinSize;
UINT m_GapY;
UINT m_OverY;
UINT m_OverX;
BOOL m_bMSWorkAround;
CRegEx m_reCrackHost;
CRegEx m_reNestedURL;
CRegEx m_reHTMLURL; // 1 - URL
CRegEx m_reCrackURL; // 3 - schema, 4 - host, 5 - path, 7 - query string
BITMAP m_bitmapBack;
CBitmap m_bmpBack;
int m_iUnreachable;
int m_iCompleted;
int m_iPinging;
int m_iPending;
CImageList m_Images;
void UpdateControlButtons();
BOOL m_bExiting;
int CheckForPendingRequests();
UINT m_MaxThreads;
BOOL m_bShown;
enum {
sortHost, sortIP, sortMin, sortAvg, sortMax, sortLoss
};
int m_SortCriteria;
static int CALLBACK CompareItems(LPARAM lp1, LPARAM lp2, LPARAM lp);
DWORD m_Interval;
BOOL RemovePingyHost(CPingyHost *host,int index=-1);
BOOL UpdatePingyHost(CPingyHost *host,int index=-1);
BOOL AddPingyHost(CPingyHost *host);
CHostList m_Hosts;
enum {
subitemHost = 0, subitemIP, subitemMin,subitemAvg,subitemMax, subitemPacketloss
};
DWORD m_TimeOut;
UINT m_PingSize;
UINT m_PingsPerHost;
CDragPad * m_DragPad;
~CDipstickDlg();
CDipstickDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CDipstickDlg)
enum { IDD = IDD_DIPSTICK_DIALOG };
CButton m_AdvancedCtl;
CButton m_HelpCtl;
CButton m_ExitCtl;
CButton m_OptionsCtl;
CButton m_ManualPingCtl;
CButton m_RemoveCtl;
CButton m_RepingAllCtl;
CButton m_RepingCtl;
CButton m_ClearListCtl;
CListCtrl m_HostList;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDipstickDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CDipstickDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnDestroy();
afx_msg void OnOptions();
afx_msg LRESULT OnUrlPing(WPARAM,LPARAM);
afx_msg LRESULT OnActivityCount(WPARAM,LPARAM);
afx_msg LRESULT OnUpdateHostData(WPARAM,LPARAM);
afx_msg LRESULT OnHTMLTransfer(WPARAM,LPARAM);
afx_msg void OnColumnclickHostlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
afx_msg void OnDragpadOptions();
afx_msg void OnDragpadShowmainwindow();
afx_msg void OnDragpadHelp();
afx_msg void OnDragpadAbout();
afx_msg void OnDragpadExit();
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnManualping();
afx_msg void OnDragpadManualping();
afx_msg void OnDragpadRepingAll();
afx_msg void OnDragpadRemoveAll();
afx_msg void OnReping();
afx_msg void OnRepingall();
afx_msg void OnClear();
afx_msg void OnInsertitemHostlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDeleteitemHostlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDeleteallitemsHostlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnExit();
afx_msg void OnItemchangedHostlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnRemove();
afx_msg void OnRclickHostlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnHostListReping();
afx_msg void OnHostListRemove();
afx_msg void OnHostListRepingAll();
afx_msg void OnHostListRemoveAll();
afx_msg void OnHostListOpenURL();
afx_msg void OnHostListProperties();
afx_msg void OnDblclkHostlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnClose();
afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnHelp();
afx_msg void OnBegindragHostlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnPasteurl();
afx_msg void OnHostlistCopyurl();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
afx_msg void OnDropFiles(HDROP hDropInfo);
afx_msg void OnAdvanced();
afx_msg void OnAdvancedExportlist();
afx_msg void OnAdvancedImportlist();
afx_msg void OnDragpadAdvancedExportlist();
afx_msg void OnDragpadAdvancedImportlist();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
diff --git a/dipstick.rc b/dipstick.rc
index 55f9fde..8797946 100644
--- a/dipstick.rc
+++ b/dipstick.rc
@@ -1,567 +1,567 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif\r\n"
"#include ""res\\Dipstick.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
"#include ""afxres.rc"" // Standard components\r\n"
"#endif\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME ICON DISCARDABLE "res\\Dipstick.ico"
IDI_PINGING ICON DISCARDABLE "res\\pinging.ico"
IDI_PENDING ICON DISCARDABLE "res\\pending.ico"
IDI_COMPLETED ICON DISCARDABLE "res\\complete.ico"
IDI_UNREACHABLE ICON DISCARDABLE "res\\unreach.ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 213, 61
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About Dipstick"
FONT 8, "MS Sans Serif"
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,11,17,21,20
- LTEXT "Dipstick, Version 3.0",IDC_STATIC,40,7,89,8,
- SS_NOPREFIX
- LTEXT "Copyright © 1996-2004 Klever Group",
- IDC_STATIC,40,25,166,8
+ LTEXT "Dipstick, Version 3.1-trunk",IDC_STATIC,40,7,89,8,SS_NOPREFIX
+ LTEXT "Copyright © 1996-2005 Klever Group",IDC_STATIC,40,25,
+ 166,8
DEFPUSHBUTTON "OK",IDOK,174,7,32,14,WS_GROUP
PUSHBUTTON "http://www.klever.net/",IDC_KLEVERNET,40,40,91,14
END
IDD_DIPSTICK_DIALOG DIALOGEX 0, 0, 419, 152
STYLE DS_3DLOOK | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP |
WS_EX_APPWINDOW
-CAPTION " Dipstick 3.0"
+CAPTION " Dipstick 3.1-trunk"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "List1",IDC_HOSTLIST,"SysListView32",LVS_REPORT |
LVS_SORTASCENDING | LVS_AUTOARRANGE | WS_BORDER |
WS_TABSTOP,8,8,349,136,WS_EX_CLIENTEDGE
PUSHBUTTON "&Manual Ping",IDC_MANUALPING,361,8,50,14
PUSHBUTTON "&Reping",IDC_REPING,361,23,50,14,WS_DISABLED
PUSHBUTTON "Reping &All",IDC_REPINGALL,361,38,50,14,WS_DISABLED
PUSHBUTTON "R&emove",IDC_REMOVE,361,53,50,14,WS_DISABLED
PUSHBUTTON "Remove A&ll",IDC_CLEAR,361,68,50,14,WS_DISABLED
PUSHBUTTON "&Help",ID_HELP,361,99,50,14
PUSHBUTTON "&Options",IDC_OPTIONS,361,114,50,14
PUSHBUTTON "E&xit Dipstick",IDC_EXIT,361,129,50,14
PUSHBUTTON "",IDCANCEL,411,2,6,6,NOT WS_VISIBLE | WS_DISABLED
PUSHBUTTON "Ad&vanced",IDC_ADVANCED,361,83,50,11
END
IDD_DRAGPAD DIALOGEX 0, 0, 53, 33
STYLE DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP
CAPTION " Drag URL here"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
CONTROL "Animate1",IDC_DNDTARGET,"SysAnimate32",WS_TABSTOP,0,0,
53,33
PUSHBUTTON "",IDCANCEL,49,0,6,6,NOT WS_VISIBLE | WS_DISABLED
DEFPUSHBUTTON "",IDOK,47,27,6,6,NOT WS_VISIBLE | WS_DISABLED
END
IDD_OPTIONS DIALOGEX 0, 0, 179, 154
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP
CAPTION "Dipstick Options"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
LTEXT "Number of pings per &host",IDC_STATIC,50,9,122,10
EDITTEXT IDC_NPINGS,7,7,35,14,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_SPINPINGS,"msctls_updown32",UDS_WRAP |
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,7,11,14
LTEXT "&Maximum number of threads",IDC_STATIC,50,23,122,10
EDITTEXT IDC_MAXPINGS,7,21,35,14,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_SPINMAXPINGS,"msctls_updown32",UDS_WRAP |
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,21,11,14
LTEXT "Ping &timeout",IDC_STATIC,50,37,122,10
EDITTEXT IDC_TIMEOUT,7,35,35,14,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_SPINTIMEOUT,"msctls_updown32",UDS_WRAP |
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,35,11,14
LTEXT "&Interval between pings",IDC_STATIC,50,51,122,10
EDITTEXT IDC_INTERVAL,7,49,35,14,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_SPINTERVAL,"msctls_updown32",UDS_WRAP |
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,49,11,14
LTEXT "Ping &size",IDC_STATIC,50,65,122,10
EDITTEXT IDC_PACKETSIZE,7,63,35,14,ES_AUTOHSCROLL
CONTROL "Spin1",IDC_SPINSIZE,"msctls_updown32",UDS_WRAP |
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
UDS_ARROWKEYS | UDS_NOTHOUSANDS,31,63,11,14
CONTROL "Test i&nnermost URL",IDC_MSWORKAROUND,"Button",
BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,7,80,165,8
DEFPUSHBUTTON "OK",IDOK,31,133,50,14
PUSHBUTTON "Cancel",IDCANCEL,97,133,50,14
CONTROL "Come up with the &best URL",IDC_AUTOBEST,"Button",
BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,16,90,156,8
CONTROL "When selecting URLs, enable smart adjust",
IDC_SMARTADJUST,"Button",BS_AUTOCHECKBOX | BS_NOTIFY |
WS_TABSTOP,7,100,165,8
CONTROL "When smart-adjusting, use innermost URL",IDC_ADJUSTINN,
"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,16,110,
156,8
CONTROL "Ignore relative URLs when dragging selection.",
IDC_IGNORELA,"Button",BS_AUTOCHECKBOX | BS_NOTIFY |
WS_TABSTOP,7,120,165,8
END
IDD_MANUALHOST DIALOGEX 0, 0, 187, 54
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
CAPTION " Manually Test Host"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
LTEXT "Enter &URL, host name or ip address:",IDC_STATIC,7,7,
129,8
EDITTEXT IDC_HOST,7,16,173,14,ES_LOWERCASE | ES_AUTOHSCROLL
DEFPUSHBUTTON "OK",IDOK,35,33,50,14
PUSHBUTTON "Cancel",IDCANCEL,101,33,50,14
END
IDD_PROPS DIALOGEX 0, 0, 209, 99
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
CAPTION " Properties"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,152,78,50,14
LTEXT "URL:",IDC_URLCAPTION,7,7,18,8,SS_NOTIFY
LTEXT "..",IDC_URL,60,7,142,8,SS_NOPREFIX | SS_NOTIFY
LTEXT "Host name:",IDC_HOSTCAPTION,7,17,37,8,SS_NOTIFY
LTEXT "..",IDC_HOST,60,17,142,8,SS_NOPREFIX | SS_NOTIFY
LTEXT "IP:",IDC_IPCAPTION,7,27,10,8,SS_NOTIFY
LTEXT "..",IDC_IP,60,27,142,8,SS_NOTIFY
LTEXT "Ping times (min/avg/max):",IDC_TIMESCAPTION,7,37,53,17,
SS_NOTIFY
LTEXT "../../..",IDC_TIMES,60,45,66,8,SS_NOTIFY
LTEXT "Packet loss:",IDC_LOSSCAPTION,7,56,40,8,SS_NOTIFY
LTEXT "..",IDC_LOSS,60,56,66,8,SS_NOPREFIX | SS_NOTIFY
LTEXT "Status:",IDC_STATUSCAPTION,7,66,23,8,SS_NOTIFY
LTEXT "..",IDC_STATUS,60,66,142,8,SS_NOPREFIX | SS_NOTIFY
PUSHBUTTON "&Open URL",IDC_OPENURL,7,78,50,14
ICON IDR_MAINFRAME,IDC_STATE,166,42,18,20,SS_NOTIFY |
SS_CENTERIMAGE | SS_REALSIZEIMAGE
PUSHBUTTON "&Copy URL",IDC_COPYURL,60,78,50,14
END
IDD_AUTOBEST DIALOGEX 0, 0, 287, 82
STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP |
WS_CAPTION
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
CAPTION " Dipstick - report"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "Open this URL",IDOK,110,47,68,14
PUSHBUTTON "&Next Location",IDC_NEXT,188,47,68,14
PUSHBUTTON "&Previous Location",IDC_PREV,32,47,68,14
CTEXT "..",IDC_URL,7,7,273,14,SS_NOPREFIX,WS_EX_DLGMODALFRAME |
WS_EX_CLIENTEDGE
LTEXT "Average Response Time, milliseconds:",IDC_STATIC,7,25,
136,8
LTEXT "..",IDC_RTT,143,25,68,8
LTEXT "Packet Loss:",IDC_STATIC,7,36,136,8
LTEXT "..",IDC_PKTLOSS,143,36,68,8
PUSHBUTTON "Cancel",IDCANCEL,118,63,50,12
CONTROL "Animate1",IDC_DROPSOURCE,"SysAnimate32",ACS_CENTER |
ACS_AUTOPLAY,257,23,23,22,WS_EX_DLGMODALFRAME |
WS_EX_STATICEDGE
PUSHBUTTON "&Copy URL",IDC_COPYURL,211,23,39,22,BS_CENTER |
BS_VCENTER | BS_MULTILINE
END
IDD_URLS DIALOGEX 0, 0, 176, 192
STYLE DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_MAXIMIZEBOX | WS_POPUP |
WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_CLIENTEDGE
CAPTION " Select URLs of interest"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
LISTBOX IDC_URLS,7,7,162,146,LBS_SORT | LBS_NOINTEGRALHEIGHT |
LBS_EXTENDEDSEL | NOT WS_BORDER | WS_VSCROLL |
WS_HSCROLL | WS_TABSTOP,WS_EX_STATICEDGE
DEFPUSHBUTTON "OK",IDOK,7,155,50,14
PUSHBUTTON "Cancel",IDCANCEL,7,171,50,14
CONTROL "&Smart adjust selection",IDC_DOADJUST,"Button",
BS_AUTOCHECKBOX | BS_TOP | WS_TABSTOP,63,157,106,10
CONTROL "Adjust by &innermost URL",IDC_ADJUSTINN,"Button",
BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,63,
175,106,10
END
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,0,0,0
- PRODUCTVERSION 3,0,0,0
+ FILEVERSION 3,1,0,0
+ PRODUCTVERSION 3,1,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x9L
#else
FILEFLAGS 0x8L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0"
VALUE "FileDescription", "Dipstick, mirror locator\0"
- VALUE "FileVersion", "3, 0, 0, 0\0"
+ VALUE "FileVersion", "3, 1, 0, 0\0"
VALUE "InternalName", "DIPSTICK\0"
- VALUE "LegalCopyright", "Copyright © 1996-2004 Klever Group (http://www.klever.net/)\0"
+ VALUE "LegalCopyright", "Copyright © 1996-2005 Klever Group (http://www.klever.net/)\0"
VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
VALUE "OriginalFilename", "DIPSTICK.EXE\0"
VALUE "ProductName", "Dipstick\0"
- VALUE "ProductVersion", "3, 0, 0, 0\0"
+ VALUE "ProductVersion", "3, 1, 0, 0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 206
VERTGUIDE, 40
TOPMARGIN, 7
BOTTOMMARGIN, 54
END
IDD_DIPSTICK_DIALOG, DIALOG
BEGIN
VERTGUIDE, 8
VERTGUIDE, 411
HORZGUIDE, 8
HORZGUIDE, 144
END
IDD_OPTIONS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 172
VERTGUIDE, 16
VERTGUIDE, 50
TOPMARGIN, 7
BOTTOMMARGIN, 147
END
IDD_MANUALHOST, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 180
TOPMARGIN, 7
BOTTOMMARGIN, 47
END
IDD_PROPS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 202
VERTGUIDE, 60
TOPMARGIN, 7
BOTTOMMARGIN, 92
END
IDD_AUTOBEST, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 280
VERTGUIDE, 143
VERTGUIDE, 211
TOPMARGIN, 7
BOTTOMMARGIN, 75
HORZGUIDE, 25
HORZGUIDE, 44
END
IDD_URLS, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 169
TOPMARGIN, 7
BOTTOMMARGIN, 185
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// AVI
//
IDR_DNDAVI AVI DISCARDABLE "res\\kdnd.avi"
IDR_DRAGAVI AVI DISCARDABLE "res\\kdragurl.avi"
/////////////////////////////////////////////////////////////////////////////
//
// Menu
//
IDR_MENU MENU DISCARDABLE
BEGIN
POPUP "Drag pad"
BEGIN
MENUITEM "&Manual Ping", ID_DRAGPAD_MANUALPING
MENUITEM "&Paste URL(s)", ID_DRAGPAD_PASTEURL
MENUITEM "Reping &All", ID_DRAGPAD_REPINGALL
MENUITEM "Remove A&ll", ID_DRAGPAD_REMOVEALL
MENUITEM SEPARATOR
MENUITEM "&Options", ID_DRAGPAD_OPTIONS
MENUITEM "&Show main window", ID_DRAGPAD_SHOWMAINWINDOW
POPUP "Ad&vanced"
BEGIN
MENUITEM "&Export List", ID_DRAGPAD_ADVANCED_EXPORTLIST
MENUITEM "&Import List", ID_DRAGPAD_ADVANCED_IMPORTLIST
END
MENUITEM SEPARATOR
MENUITEM "&Help", ID_DRAGPAD_HELP
MENUITEM "A&bout Dipstick", ID_DRAGPAD_ABOUT
MENUITEM "E&xit Dipstick", ID_DRAGPAD_EXIT
END
POPUP "Host List"
BEGIN
MENUITEM "&Reping", ID_HOSTLIST_REPING
MENUITEM "R&emove", ID_HOSTLIST_REMOVE
MENUITEM "Open URL", ID_HOSTLIST_OPENURL
MENUITEM "&Copy URL", ID_HOSTLIST_COPYURL
MENUITEM SEPARATOR
MENUITEM "Reping &All", ID_HOSTLIST_REPINGALL
MENUITEM "Remove A&ll", ID_HOSTLIST_REMOVEALL
MENUITEM SEPARATOR
MENUITEM "&Paste URL(s)", ID_HOSTLIST_PASTEURL
MENUITEM "&Properties", ID_HOSTLIST_PROPERTIES
END
POPUP "Advanced"
BEGIN
MENUITEM "&Export List", ID_ADVANCED_EXPORTLIST
MENUITEM "&Import List", ID_ADVANCED_IMPORTLIST
END
END
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_DIABACK BITMAP DISCARDABLE "shared-data/klever-background.bmp"
/////////////////////////////////////////////////////////////////////////////
//
// WAVE
//
IDW_BESTURL WAVE DISCARDABLE "res\\best.wav"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_ABOUTBOX "&About Dipstick.."
IDS_PS_FAILEDTOLOCK "Failed to gain access to internal resources. Please, report to Klever."
IDP_SOCKETS_INIT_FAILED "Windows sockets initialization failed."
IDS_CSVEXT ".csv"
IDS_HN_BADURL "Bad URL"
IDS_ABEST_CLEANUP "Remove all locations from list?"
IDS_ABEST_NONEFOUND "No reachable locations were found."
IDS_ABEST_TITLE " Dipstick - report"
- IDS_DRAGPAD_TITLE " Dipstick 3.0"
+ IDS_DRAGPAD_TITLE " Dipstick 3.1-trunk"
IDS_DRAGPAD_URLS " %d/%d URL(s)"
IDS_REGEX_HTMLURL "<A[^[:alpha:]][^>]*href[[:space:]]*=[[:space:]]*""?([^[:space:]>""]+)""?[^>]*>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_KLEVERNET_URL "http://www.klever.net/"
IDS_PS_INTERNALERROR "Internal Error. Please report to Klever."
IDS_PS_NETUNREACHABLE "Destination network unreachable"
IDS_PS_HOSTUNREACHABLE "Destination host unreachable"
IDS_PS_PROTUNREACHABLE "Destination protocol unreachable"
IDS_PS_PORTUNREACHABLE "Destination port unreachable"
IDS_PS_NORESOURCES "No resources"
IDS_PS_HWERROR "Hardware error"
IDS_PS_BIGPACKET "Packet size is too big"
END
STRINGTABLE DISCARDABLE
BEGIN
- IDC_DNDTARGET "Dipstick 3.0, click the right mouse button to display main window, left mouse button for menu"
+ IDC_DNDTARGET "Dipstick 3.1-trunk, click the right mouse button to display main window, left mouse button for menu"
IDC_HOST "Host name as specified or resolved by Dipstick"
END
STRINGTABLE DISCARDABLE
BEGIN
IDC_URLCAPTION "Universal Resource Locator (URL) associated with this location"
IDC_URL "Universal Resource Locator (URL) associated with this location"
IDC_HOSTCAPTION "Host name as specified or resolved by Dipstick"
IDC_IPCAPTION "Host's IP address as specified or resolved by Dipstick"
IDC_TIMESCAPTION "Minmum, maximum and average round trip time in milliseconds. The less the better."
IDC_TIMES "Minmum, maximum and average round trip time in milliseconds. The less the better."
IDC_LOSSCAPTION "IP packets loss"
IDC_LOSS "IP packets loss"
IDC_STATUSCAPTION "Last error occured during attempt to ping this location"
IDC_STATUS "Last error occured during attempt to ping this location"
IDC_OPENURL "Open URL in your default browser"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_PS_TIMEOUT "Request timed out"
IDS_PS_BADROUTE "Bad route"
IDS_PS_TTLEXPTRANSIT "TTL expired in transit"
IDS_PS_TTLEXPREASM "TTL expired during reassembly"
IDS_PS_IPARAMP "IP parameter problem"
IDS_PS_SOURCEQUENCH "Source quench received"
IDS_PS_BIGOPTION "Option is too big"
IDS_PS_BADDEST "Bad destination"
IDS_PS_UNKNOWNERROR "Unknown error"
IDS_REGISTRYKEY "Klever Group"
IDS_FMT_TIMES "%lu/%lu/%lu"
IDS_FMT_LOSS "%d%%"
IDS_TIP_UNREACHABLE "This location seems to be unreachable"
IDS_PS_FAILEDTORESOLVE "Unable to resolve host IP"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_PS_UNABLETOICMP "Unable to initialize ICMP services"
IDS_TIP_PENDING "This location is waiting for it's turn to get pinged"
IDS_TIP_COMPLETE "Pinging of this location has been completed"
IDS_TIP_PROPSOK "Click OK if you're done with looking and want to dismiss this window"
IDS_TIP_INTERVAL "Interval between ping requests in seconds"
IDS_TIP_OPTIONSOK "Click OK to make changes permanent"
IDS_TIP_OPTIONSCANCEL "Click CANCEL to leave dialog without making any changes"
IDS_TIP_PINGING "This location is being pinged at the moment.."
END
STRINGTABLE DISCARDABLE
BEGIN
IDC_MSWORKAROUND "In case of REDIRed URL - test the innermost one"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_CSVFILTER "Comma Separated Values (*.csv)|*.csv|All Files (*.*)|*.*||"
+ IDS_REGEX_URL "([a-zA-Z]+://)?[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]*)+(/[^ \t\r\n\\f]*)?"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif
#include "res\Dipstick.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
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 @@
{\rtf1\ansi
@{\footnote
THIS FILE WAS AUTOMATICALLY GENERATED FROM XML DOCUMENT.
DO NOT MODIFY THIS FILE DIRECTLY. EDIT XML DOCUMENT INSTEAD
}
{\fonttbl{\f0\froman Times New Roman;}{\f1\fswiss Arial;}{\f3\froman Symbol;}}{\colortbl;
\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;
\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;
\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
\pard\plain\keepn
#{\footnote About}
${\footnote About Dipstick}
K{\footnote about}
{ \f1\fs18\b\sb120 About {\b Dipstick}}
\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.
\par\sa120\sb120\qj\pard \f1\fs18\sb120
\par\sa120\sb120\qj\pard \f1\fs18\sb120 {\b {\i Enjoy!}}
{
-\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/")}
+\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/")}
\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:
\par The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
\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.
}
\par \sa0\sb120\ql \f1\fs16 Author: {\b\uldb\cf11 Michael Krelin ({\i hacker@klever.net})}{\v %!ExecFile("mailto:hacker@klever.net")}
\par \sa0\sb0 Fan mail send to {\i\uldb gefilte@klever.net}{\v %!ExecFile("mailto:gefilte@klever.net")}
\page
\pard\plain\keepn
#{\footnote News}
${\footnote What's new}
{ \f1\fs18\b\sb120 What's New}
+\par\pard\plain\f1\fs24\qc\cf2\b 3.1 - July 26th, 2005
+\par\pard\plain\fi0\li0\f1\fs18 \bullet Ability to parse multiple URLs from plaintext selection
\par\pard\plain\f1\fs24\qc\cf2\b 3.0 - July 11th, 2004
\par\pard\plain\fi0\li0\f1\fs18 \bullet Change of {\uldb license}{\v About} and opening the source.
\par\pard\plain\fi0\li0\f1\fs18 \bullet Minor cosmetic changes
\par\pard\plain\f1\fs24\qc\cf2\b 2.52 - June 3rd, 1998
\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.
\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.
\par\pard\plain\f1\fs24\qc\cf2\b 2.5 - December 30th, 1997
\par\pard\plain\fi0\li0\f1\fs18 \bullet Ability to export/import sets of URLs.
\par\pard\plain\fi0\li0\f1\fs18 \bullet Copy URL menu command in the Main Window and button in the Best URL window.
\par\pard\plain\fi0\li0\f1\fs18 \bullet Multiple URLs dragging or pasting. Works only for MSIE4 browser.
\par\pard\plain\fi0\li0\f1\fs18 \bullet Annoying ToolTips removed.
\par\pard\plain\f1\fs24\qc\cf2\b 2.00 - July 1st, 1997
\par\pard\plain\fi0\li0\f1\fs18 \bullet Drag'n'drop source added to the Best URL window.
\par\pard\plain\fi0\li0\f1\fs18 \bullet Completed/Total URLs counter added to {\b Dipstick} drag pad.
\par\pard\plain\fi0\li0\f1\fs18 \bullet You may now drag'n'drop URLs from main {\b Dipstick} dialog window.
\par\pard\plain\fi0\li0\f1\fs18 \bullet Added ability to paste URLs into {\b Dipstick} instead of dropping.
\par\pard\plain\fi0\li0\f1\fs18 \bullet New install program now lets you install {\b Dipstick} to the location of your choice.
\par\pard\plain\f1\fs24\qc\cf2\b 1.01 - March 13th, 1997
\par\pard\plain\fi0\li0\f1\fs18 \bullet Resizable main {\b Dipstick} dialog window.
\par\pard\plain\fi0\li0\f1\fs18 \bullet Come up with the best URL automatically.
\par\pard\plain\fi0\li0\f1\fs18 \bullet Workaround for redir.dll
\par\pard\plain\fi0\li0\f1\fs18 \bullet No more {\b\cf6 MSIE} 3.0 requirement.
\par\pard\plain\fi0\li0\f1\fs18 \bullet Remembers window positions and size as well as columns widths.
\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)
\page
\pard\plain\keepn
#{\footnote Using}
${\footnote Using Dipstick}
{ \f1\fs18\b\sb120 Using {\b Dipstick}}
\par\sa120\sb120\qj\pard \f1\fs18\sb120 To use {\b Dipstick}, please follow these steps:\pard
\par \fi0\li0 \bullet Load the page that contains links into your {\b\cf6 MSIE} or {\b\cf6 Netscape} browser.
\par \fi0\li0 \bullet Drag'n'drop desired links to {\b Dipstick} window.
\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.
\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).
\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
\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.
\page
\pard\plain\keepn
#{\footnote MainWindow}
${\footnote Main Window}
{ \f1\fs18\b\sb120 Main Window}
\par\sa120\sb120\qj\pard \f1\fs18\sb120 The main window consists of -\pard
\par \fi0\li0 \bullet {\b Brilliant ListView with the following columns:}
\par \fi0\li0 \bullet Host Name - host name as it was specified in the URL or resolved from IP address.
\par \fi0\li0 \bullet Host IP address - host IP address as it was specified in the URL or resolved from host name.
\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.
\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.
\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.
\par \fi0\li0 \bullet Pktloss - Percentage of the requests lost somewhere in the net. The less the better.
\par \fi0\li0 \bullet {\b Buttons:}
\par \fi0\li0 \bullet {#{\footnote MainWindowMP}}Manual Ping - lets you add location manually (usually you just drag'n'drop locations into {\b Dipstick} window.
\par \fi0\li0 \bullet Reping - Test selected location again.
\par \fi0\li0 \bullet {#{\footnote MainWindowRA}}Reping All - Test again all locations in the list.
\par \fi0\li0 \bullet Remove - Remove selected location from the list.
\par \fi0\li0 \bullet Remove All - Remove all locations from the list.
\par \fi0\li0 \bullet Help - I think you have a clue on what this button does.
\par \fi0\li0 \bullet Options - Set {\b Dipstick} options
\par \fi0\li0 \bullet Exit Dipstick - Close {\b Dipstick} program\pard
\page
\pard\plain\keepn
#{\footnote Options}
${\footnote Dipstick Options}
{ \f1\fs18\b\sb120 {\b Dipstick} Opions}
\par\sa120\sb120\qj\pard \f1\fs18\sb120 Options are:\pard
\par \fi0\li0 \bullet {#{\footnote OptionsPPH}}{\b Number of pings per host} - number of echo requests to send for each location.
\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.
\par \fi0\li0 \bullet {\b Ping Timeout} - number of seconds to wait between sending echo requests.
\par \fi0\li0 \bullet {\b Interval between pings} - number of seconds to wait between sending echo requests.
\par \fi0\li0 \bullet {\b Ping size} - number of bytes to send in each echo request.
\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}
\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
\page
\pard\plain\keepn
#{\footnote Properties}
${\footnote URL properties}
{ \f1\fs18\b\sb120 URL Properties}
\par\sa120\sb120\qj\pard \f1\fs18\sb120 URL Properties are:\pard
\par \fi0\li0 \bullet {\b URL} - the URL itself if present.
\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}.
\par \fi0\li0 \bullet {\b Ping times} - minimum, average, and mmaximum round trip times if available.
\par \fi0\li0 \bullet {\b Packet loss} - percentage of packets lost in transmission.
\par \fi0\li0 \bullet {\b Status} - description of last error occured (if any).\pard
\page
\pard\plain\keepn
#{\footnote SelectURLs}
${\footnote Select URLs Dialog}
{ \f1\fs18\b\sb120 Select URLs dialog}
\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.
\par\sa120\sb120\qj\pard \f1\fs18\sb120 There are two options you may want to change when selecting URLs from list:\pard
\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.
\par \fi0\li0 \bullet {\b Adjusst by innermost URL} - use the innermost URL when adjusting selection.\pard
\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.
\page
\pard\plain\keepn
#{\footnote Autobest}
${\footnote Dipstick Report}
{ \f1\fs18\b\sb120 {\b Dipstick} report}
\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.
\page
} \ 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 @@
<?xml version="1.0"?>
<winhelp>
<topic id="About" title="About Dipstick" keywords="about">
<heading scroll="no">About <kin>Dipstick</kin></heading>
<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>
<p/>
<p><b><i>Enjoy!</i></b></p>
- <license years="1996-2004"/>
+ <license years="1996-2005"/>
<credits/>
</topic>
<topic id="News" title="What's new">
<heading scroll="no">What's New</heading>
+ <newsfor version="3.1" date="July 26th, 2005">
+ <ni>Ability to parse multiple URLs from plaintext selection</ni>
+ </newsfor>
<newsfor version="3.0" date="July 11th, 2004">
<ni>Change of <a href="#About">license</a> and opening the source.</ni>
<ni>Minor cosmetic changes</ni>
</newsfor>
<newsfor version="2.52" date="June 3rd, 1998">
<ni>Now works properly with Winsock 2 for Windows95. Also may start working with non-Microsoft TCP/IP stacks.</ni>
<ni>Fixed bug that caused GPF when removing all URLs after testing is over and you picked the URL of your choice.</ni>
</newsfor>
<newsfor version="2.5" date="December 30th, 1997">
<ni>Ability to export/import sets of URLs.</ni>
<ni>Copy URL menu command in the Main Window and button in the Best URL window.</ni>
<ni>Multiple URLs dragging or pasting. Works only for MSIE4 browser.</ni>
<ni>Annoying ToolTips removed.</ni>
</newsfor>
<newsfor version="2.00" date="July 1st, 1997">
<ni>Drag'n'drop source added to the Best URL window.</ni>
<ni>Completed/Total URLs counter added to <kin>Dipstick</kin> drag pad.</ni>
<ni>You may now drag'n'drop URLs from main <kin>Dipstick</kin> dialog window.</ni>
<ni>Added ability to paste URLs into <kin>Dipstick</kin> instead of dropping.</ni>
<ni>New install program now lets you install <kin>Dipstick</kin> to the location of your choice.</ni>
</newsfor>
<newsfor version="1.01" date="March 13th, 1997">
<ni>Resizable main <kin>Dipstick</kin> dialog window.</ni>
<ni>Come up with the best URL automatically.</ni>
<ni>Workaround for redir.dll</ni>
<ni>No more <product>MSIE</product> 3.0 requirement.</ni>
<ni>Remembers window positions and size as well as columns widths.</ni>
<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>
</newsfor>
</topic>
<topic id="Using" title="Using Dipstick">
<heading scroll="no">Using <kin>Dipstick</kin></heading>
<p>To use <kin>Dipstick</kin>, please follow these steps:</p>
<ul>
<li>Load the page that contains links into your <product>MSIE</product> or <product>Netscape</product> browser.</li>
<li>Drag'n'drop desired links to <kin>Dipstick</kin> window.</li>
<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>
<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>
<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>
</ul>
<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>
</topic>
<topic id="MainWindow" title="Main Window">
<heading scroll="no">Main Window</heading>
<p>The main window consists of -</p>
<ul>
<li><b>Brilliant ListView with the following columns:</b></li>
<li>Host Name - host name as it was specified in the URL or resolved from IP address.</li>
<li>Host IP address - host IP address as it was specified in the URL or resolved from host name.</li>
<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>
<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>
<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>
<li>Pktloss - Percentage of the requests lost somewhere in the net. The less the better.</li>
<li><b>Buttons:</b></li>
<li><a name="MainWindowMP"/>Manual Ping - lets you add location manually (usually you just drag'n'drop locations into <kin>Dipstick</kin> window.</li>
<li>Reping - Test selected location again.</li>
<li><a name="MainWindowRA"/>Reping All - Test again all locations in the list.</li>
<li>Remove - Remove selected location from the list.</li>
<li>Remove All - Remove all locations from the list.</li>
<li>Help - I think you have a clue on what this button does.</li>
<li>Options - Set <kin>Dipstick</kin> options</li>
<li>Exit Dipstick - Close <kin>Dipstick</kin> program</li>
</ul>
</topic>
<topic id="Options" title="Dipstick Options">
<heading scroll="no"><kin>Dipstick</kin> Opions</heading>
<p>Options are:</p>
<ul>
<li><a name="OptionsPPH"/><b>Number of pings per host</b> - number of echo requests to send for each location.</li>
<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>
<li><b>Ping Timeout</b> - number of seconds to wait between sending echo requests.</li>
<li><b>Interval between pings</b> - number of seconds to wait between sending echo requests.</li>
<li><b>Ping size</b> - number of bytes to send in each echo request.</li>
<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>
<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>
</ul>
</topic>
<topic id="Properties" title="URL properties">
<heading scroll="no">URL Properties</heading>
<p>URL Properties are:</p>
<ul>
<li><b>URL</b> - the URL itself if present.</li>
<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>
<li><b>Ping times</b> - minimum, average, and mmaximum round trip times if available.</li>
<li><b>Packet loss</b> - percentage of packets lost in transmission.</li>
<li><b>Status</b> - description of last error occured (if any).</li>
</ul>
</topic>
<topic id="SelectURLs" title="Select URLs Dialog">
<heading scroll="no">Select URLs dialog</heading>
<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>
<p>There are two options you may want to change when selecting URLs from list:</p>
<ul>
<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>
<li><b>Adjusst by innermost URL</b> - use the innermost URL when adjusting selection.</li>
</ul>
<p>The default values for these options are also available from the <a href="#Options"><b>Options</b></a> dialog box.</p>
</topic>
<topic id="Autobest" title="Dipstick Report">
<heading scroll="no"><kin>Dipstick</kin> report</heading>
<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>
</topic>
</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 @@
#include "resource.h"
#include "../shared-code/install.h"
#define KINNAME "Dipstick"
#define KINSHORT KINNAME
-#define VERSION "3.0"
+#define VERSION "3.1-trunk"
BOOL Install(void)
{
STRING dPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",KINSHORT "Path");
STRING kPath = strFETCH_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath");
LPCSTR qPath = ((LPCSTR)dPath)?(LPCSTR)dPath:(((LPCSTR)kPath)?(LPSTR)kPath:"C:\\Program Files\\Klever\\Nothings");
STRING path = REQUESTPATH(" " KINNAME " " VERSION,"\nEnter destination path:",qPath);
if(!path)
return NULL;
#ifdef K_ANNED
STRING sysDir(_MAX_PATH);
GetSystemDirectory(sysDir,_MAX_PATH);
INSTALLFILE("mfc42.dl_",sysDir,"mfc42.dll");
#endif
MAKE_PATH(path);
STRING shortPath = GET_SHORT_PATH(path);
if(!shortPath){
MessageBox(NULL,"Failed to install " KINNAME " " VERSION " in specified directory",NULL,MB_ICONERROR|MB_OK);
return FALSE;
}
if(!(
INSTALLFILE("dipstick.ex_",path,"dipstick.exe") &&
INSTALLFILE("dipstick.hl_",path,"dipstick.hlp") &&
INSTALLFILE("dipstick.cn_",path,"dipstick.cnt")
)){
MessageBox(NULL,"Failed to install " KINNAME " " VERSION " in specified directory",NULL,MB_ICONERROR|MB_OK);
return FALSE;
}
ADDMENU("Klever Group",KINNAME,path,"dipstick.exe");
strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group",KINSHORT "Path",path);
strSET_REG_KEY(HKEY_LOCAL_MACHINE,"Software\\Klever Group","KINPath",path);
FILE* inf=CREATE_INF_FILE(path,KINSHORT ".INF");
if(!inf){
MessageBox(NULL,"Failed to install " KINNAME " " VERSION,NULL,MB_ICONERROR|MB_OK);
return FALSE;
}
INF_FILE_HEADER(inf);
INF_FILE_SECTION(inf,"Uninstall");
fprintf(inf,"AddReg=kFiles\nDelReg=kReg\nUpdateInis=kMenu\n");
INF_FILE_SECTION(inf,"kFiles");
INF_REMOVE_ROOT(inf,KINSHORT "Files",path);
INF_REMOVE_FILE(inf,KINSHORT "Files","dipstick.exe");
INF_REMOVE_HELP_FILE(inf,KINSHORT "Files","dipstick");
INF_REMOVE_FILE(inf,KINSHORT "Files",KINSHORT ".INF");
INF_FILE_SECTION(inf,"kReg");
INF_UNINSTALL_REG(inf,KINSHORT);
INF_FILE_SECTION(inf,"kMenu");
INF_MENU_GROUP(inf,1,"Klever Group");
INF_MENU_ITEM(inf,1,KINNAME);
fclose(inf);
REG_UNINSTALL_COMMAND(KINSHORT,"Klever " KINNAME " " VERSION,shortPath,KINSHORT ".INF","Uninstall");
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);
return TRUE;
}
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 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
#if defined(APSTUDIO_INVOKED) || defined(FALSE)
#if defined(APSTUDIO_INVOKED)
IDD_INSTALLING$(FALSE) DIALOGEX 0, 0, 200, 74
#else
IDD_INSTALLING DIALOGEX 0, 0, 200, 74
#endif
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
PUSHBUTTON "Cancel",IDCANCEL,143,53,50,14,BS_CENTER | BS_VCENTER |
BS_NOTIFY | BS_FLAT,WS_EX_DLGMODALFRAME
CONTROL "Animate1",IDC_DISKS,"SysAnimate32",ACS_TRANSPARENT |
ACS_AUTOPLAY | WS_TABSTOP,161,7,32,32
LTEXT "",IDC_STATE,7,7,150,32,SS_NOPREFIX | SS_NOTIFY
CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",0x0,7,45,
186,7,WS_EX_DLGMODALFRAME
END
#endif
IDD_PATH DIALOGEX 0, 0, 255, 73
STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP |
WS_VISIBLE | WS_CAPTION
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_CLIENTEDGE
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
LTEXT "",IDC_PROMPT,7,7,241,30
EDITTEXT IDC_PATH,7,37,195,12,ES_AUTOHSCROLL
PUSHBUTTON "B&rowse..",IDC_BROWSE,208,37,40,12
DEFPUSHBUTTON "OK",IDOK,69,52,50,14
PUSHBUTTON "Cancel",IDCANCEL,135,52,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
"IDD_INSTALLING$(FALSE)", DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 193
TOPMARGIN, 7
BOTTOMMARGIN, 67
HORZGUIDE, 39
END
IDD_PATH, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 248
VERTGUIDE, 202
VERTGUIDE, 208
TOPMARGIN, 7
BOTTOMMARGIN, 66
HORZGUIDE, 37
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""custom.rch""\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON ICON DISCARDABLE "../shared-data/install-icon.ico"
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,0,0,0
- PRODUCTVERSION 3,0,0,0
+ FILEVERSION 3,1,0,0
+ PRODUCTVERSION 3,1,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Klever Group (http://www.klever.net/)\0"
VALUE "FileDescription", "INSTALL: Dipstick, mirror locator\0"
- VALUE "FileVersion", "3, 0, 0, 0\0"
+ VALUE "FileVersion", "3, 1, 0, 0\0"
VALUE "InternalName", "INSTALL\0"
- VALUE "LegalCopyright", "Copyright © 1996-2004 Klever Group (http://www.klever.net/)\0"
+ VALUE "LegalCopyright", "Copyright © 1996-2005 Klever Group (http://www.klever.net/)\0"
VALUE "LegalTrademarks", "Klever Group (http://www.klever.net/)\0"
VALUE "OriginalFilename", "INSTALL.EXE\0"
VALUE "ProductName", "Dipstick\0"
- VALUE "ProductVersion", "3, 0, 0, 0\0"
+ VALUE "ProductVersion", "3, 1, 0, 0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#include "custom.rch"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
diff --git a/resource.h b/resource.h
index 2af32cb..2f7b81e 100644
--- a/resource.h
+++ b/resource.h
@@ -1,149 +1,150 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Dipstick.rc
//
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_DIPSTICK_DIALOG 102
#define IDS_REGEX_NESTEDURL 102
#define IDS_PS_FAILEDTOLOCK 102
#define IDP_SOCKETS_INIT_FAILED 103
#define IDS_REGEX_CRACKHOST 104
#define IDS_CSVEXT 104
#define IDS_HN_BADURL 105
#define IDS_ABEST_CLEANUP 106
#define IDS_ABEST_NONEFOUND 107
#define IDS_ABEST_TITLE 108
#define IDS_DRAGPAD_TITLE 109
#define IDS_DRAGPAD_URLS 110
#define IDS_REGEX_HTMLURL 111
#define IDS_CSVFILTER 112
+#define IDS_REGEX_URL 113
#define IDR_MAINFRAME 128
#define IDD_DRAGPAD 129
#define IDR_DNDAVI 130
#define IDD_OPTIONS 132
#define IDR_MENU 133
#define IDD_MANUALHOST 134
#define IDD_PROPS 135
#define IDI_PINGING 136
#define IDI_PENDING 137
#define IDI_COMPLETED 138
#define IDI_UNREACHABLE 139
#define IDB_DIABACK 140
#define IDD_AUTOBEST 141
#define IDW_BESTURL 142
#define IDR_DRAGAVI 143
#define IDD_URLS 145
#define IDC_HOSTLIST 1002
#define IDC_DNDTARGET 1011
#define IDC_OPTIONS 1013
#define IDC_NPINGS 1014
#define IDC_PACKETSIZE 1015
#define IDC_TIMEOUT 1016
#define IDC_INTERVAL 1017
#define IDC_KLEVERNET 1017
#define IDC_MAXPINGS 1018
#define IDC_MANUALPING 1019
#define IDC_HOST 1020
#define IDC_REPING 1021
#define IDC_IP 1021
#define IDC_REPINGALL 1022
#define IDC_CLEAR 1023
#define IDC_EXIT 1024
#define IDC_REMOVE 1025
#define IDC_URLCAPTION 1026
#define IDC_URL 1027
#define IDC_HOSTCAPTION 1028
#define IDC_IPCAPTION 1029
#define IDC_TIMESCAPTION 1030
#define IDC_TIMES 1031
#define IDC_LOSSCAPTION 1032
#define IDC_LOSS 1033
#define IDC_STATUSCAPTION 1034
#define IDC_STATUS 1035
#define IDC_OPENURL 1036
#define IDC_STATE 1039
#define IDC_MSWORKAROUND 1048
#define IDC_SPINPINGS 1049
#define IDC_SPINMAXPINGS 1050
#define IDC_SPINTIMEOUT 1051
#define IDC_RTT 1051
#define IDC_SPINTERVAL 1052
#define IDC_PKTLOSS 1052
#define IDC_SPINSIZE 1053
#define IDC_PREV 1053
#define IDC_AUTOBEST 1054
#define IDC_NEXT 1054
#define IDC_SMARTADJUST 1055
#define IDC_DROPSOURCE 1056
#define IDC_URLS 1057
#define IDC_DOADJUST 1058
#define IDC_ADJUSTINN 1059
#define IDC_IGNORELA 1060
#define IDC_COPYURL 1060
#define IDC_ADVANCED 1061
#define IDS_KLEVERNET_URL 2102
#define IDS_PS_INTERNALERROR 2104
#define IDS_PS_NETUNREACHABLE 2105
#define IDS_PS_HOSTUNREACHABLE 2106
#define IDS_PS_PROTUNREACHABLE 2107
#define IDS_PS_PORTUNREACHABLE 2108
#define IDS_PS_NORESOURCES 2109
#define IDS_PS_HWERROR 2110
#define IDS_PS_BIGPACKET 2111
#define IDS_PS_TIMEOUT 2112
#define IDS_PS_BADROUTE 2113
#define IDS_PS_TTLEXPTRANSIT 2114
#define IDS_PS_TTLEXPREASM 2115
#define IDS_PS_IPARAMP 2116
#define IDS_PS_SOURCEQUENCH 2117
#define IDS_PS_BIGOPTION 2118
#define IDS_PS_BADDEST 2119
#define IDS_PS_UNKNOWNERROR 2120
#define IDS_REGISTRYKEY 2121
#define IDS_FMT_TIMES 2122
#define IDS_FMT_LOSS 2123
#define IDS_TIP_UNREACHABLE 2124
#define IDS_PS_FAILEDTORESOLVE 2127
#define IDS_PS_UNABLETOICMP 2128
#define IDS_TIP_PENDING 2130
#define IDS_TIP_COMPLETE 2131
#define IDS_TIP_PROPSOK 2132
#define IDS_TIP_INTERVAL 2133
#define IDS_TIP_OPTIONSOK 2134
#define IDS_TIP_OPTIONSCANCEL 2135
#define IDS_TIP_PINGING 2136
#define ID_DRAGPAD_EXIT 32771
#define ID_DRAGPAD_SHOWMAINWINDOW 32772
#define ID_DRAGPAD_OPTIONS 32773
#define ID_DRAGPAD_ABOUT 32774
#define ID_DRAGPAD_MANUALPING 32775
#define ID_HOSTLIST_REPING 32776
#define ID_HOSTLIST_REMOVE 32777
#define ID_HOSTLIST_REPINGALL 32778
#define ID_HOSTLIST_REMOVEALL 32779
#define ID_HOSTLIST_OPENURL 32780
#define ID_HOSTLIST_PROPERTIES 32781
#define ID_DRAGPAD_HELP 32782
#define ID_DRAGPAD_REPINGALL 32783
#define ID_DRAGPAD_REMOVEALL 32784
#define ID_DRAGPAD_PASTEURL 32785
#define ID_HOSTLIST_PASTEURL 32786
#define ID_HOSTLIST_COPYURL 32787
#define ID_ADVANCED_EXPORTLIST 32788
#define ID_ADVANCED_IMPORTLIST 32789
#define ID_DRAGPAD_ADVANCED_EXPORTLIST 32790
#define ID_DRAGPAD_ADVANCED_IMPORTLIST 32791
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 147
#define _APS_NEXT_COMMAND_VALUE 32792
#define _APS_NEXT_CONTROL_VALUE 1062
#define _APS_NEXT_SYMED_VALUE 107
#endif
#endif
diff --git a/stdafx.h b/stdafx.h
index 06ef43f..ed0fe4e 100644
--- a/stdafx.h
+++ b/stdafx.h
@@ -1,36 +1,37 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxsock.h> // MFC socket extensions
#include <afxole.h>
#include <afxtempl.h>
#include <afxmt.h>
#include <winsock.h>
#include "shared-code/ms_icmp.h"
#include "shared-code/ip_icmp.h"
#include "shared-code/kICMP.h"
#include "shared-code/RegEx.h"
#include "CrackURL.h"
enum {
WM_DNP_ACTIVITYCOUNT = WM_USER+16,
WM_DNP_URLPING,
WM_DNP_UPDATEHOSTDATA,
- WM_DNP_HTML
+ WM_DNP_HTML,
+ WM_DNP_URLSPING
};
#include <MMSystem.h>
// CG: The following line was added by the Windows Multimedia component.
#pragma comment(lib, "winmm.lib")