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

Function RunTelnet

sourcecommon/utils.cpp:898–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

896//---------------------------------------------------------------------------
897#if !defined(DANFOSS)
898bool RunTelnet(AnsiString params)
899{
900 AnsiString TelnetPath;
901 char str[260];
902 if( GetSystemDirectory(str, sizeof(str)) > 0 )
903 {
904 lstrcat(str, "\\telnet.exe");
905 if( FileExists(str) )
906 TelnetPath = str;
907 }
908 if( TelnetPath.Length() == 0 )
909 {
910 if( GetWindowsDirectory(str, sizeof(str)) > 0 )
911 {
912 lstrcat(str, "\\telnet.exe");
913 if( FileExists(str) )
914 TelnetPath = str;
915 }
916 }
917 if( TelnetPath.Length() == 0 )
918 {
919 TelnetPath = "telnet.exe";
920 }
921
922 TelnetPath += " ";
923 TelnetPath += params;
924
925 DWORD Error;
926 if( RunProg(TelnetPath.c_str(), SW_NORMAL, false, &Error) )
927 return true;
928 ReportError("������ ������� ���������: %s [%lu]", TelnetPath.c_str(), Error);
929 return false;
930}
931#endif
932//---------------------------------------------------------------------------
933HRESULT CreateLink(LPCSTR lpszPathObj, LPCSTR lpszWorkDir,

Callers

nothing calls this directly

Calls 2

RunProgFunction · 0.85
ReportErrorFunction · 0.85

Tested by

no test coverage detected