MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / aPingExecute

Method aPingExecute

source/main.cpp:1095–1114  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1093}
1094//---------------------------------------------------------------------------
1095void __fastcall TMainForm::aPingExecute(TObject *Sender)
1096{
1097 TSyslogMessage * sm = GetMessageByIndex(LogSG->Row - 1);
1098 if( ! sm )
1099 return;
1100
1101 if( sm->SourceAddr.Length() == 0 )
1102 return;
1103
1104 char * szCurDir = NULL;
1105 char szSysDir[MN];
1106 if( GetSystemDirectory(szSysDir, sizeof(szSysDir)) > 0 )
1107 szCurDir = szSysDir;
1108
1109 DWORD Error;
1110 String s = String("ping.exe ") + sm->SourceAddr;
1111 if( ! RunProg(s.c_str(), SW_NORMAL, false, &Error, szCurDir) )
1112 ReportError2("Error in command \"%s\": %s [%d]",
1113 s.c_str(), FormatLastError2(Error).c_str(), Error);
1114}
1115//---------------------------------------------------------------------------
1116void __fastcall TMainForm::aFilterByIPExecute(TObject *Sender)
1117{

Callers

nothing calls this directly

Calls 3

RunProgFunction · 0.85
ReportError2Function · 0.85
FormatLastError2Function · 0.85

Tested by

no test coverage detected