Version:0.9 StartHTML:0000000105 EndHTML:0000177428 StartFragment:0000001053 EndFragment:0000177412 mXScriptasHTML
// 09 jun 15
2 //  dec 19
3 // 06 jan 2020  - 08 jan 2020 parallel test , #locs:486
4 { test with internal OpenSCManager & external OpenSCManagerX (DLL)}
5 // ref: 766_wmi_GetServiceStatus.txt 
6 // #sign:Max: MAXBOX10: 08/01/2020 14:45:39 
7 {Purpose: some services and event types: There are five types of events that can be logged. All of these have well-defined common data and can optionally include event-specific data.}
8 
9 program Service_Tools_930_Network2;
10 
11 //uses sysutils;
12 //https://github.com/Zeus64/alcinoe/blob/master/source/ALXmlDoc.pas  
13 
14 function OpenSCManagerX (lpMachineName : string;
15                          lpDatabaseName : string;
16                          dwDesiredAccess : DWORD): THANDLE;
17   //   external 'OpenSCManager@ADVAPI32.DLL.dll stdcall';
18       external 'OpenSCManagerA@advapi32.dll stdcall';
19 
20 Const SC_MANAGER_ALL_ACCESS = $F003F;
21       // SERVICE_ALL_ACCESS  =  SC_MANAGER_ALL_ACCESS;
22       SERVICE_ALL_ACCESS=  $F01FF;  //$f003f;
23 
24 
25 { To automatically start a service after its installation use this code }
26 //https://www.swissdelphicenter.ch/en/showcode.php?id=2119
27 
28 procedure TMyService_ServiceAfterInstall(Sender: TService);
29 var
30   sm: TServiceManager;
31 begin
32   sm := TServiceManager.Create('maXbox10','');           
33   try
34     if sm.Connect('maXbox10','',SC_MANAGER_ALL_ACCESS) then
35       if sm.OpenServiceConnection(self.name) then
36         sm.StartService;
37   finally
38     sm.Free;
39   end;
40 end;
41 
42 function ServiceStart4(sMachine,sService : string ) : boolean;
43 var
44   schm,schs   : SC_Handle;
45   ss     : TServiceStatus;
46   psTemp : PChar;
47   dwChkP : DWord;
48 begin
49   ss.dwCurrentState := 0;
50   schm:= OpenSCManager(pchar(sMachine),'',SC_MANAGER_CONNECT);
51     if(schm > 0) then begin
52        writeln('schm:'+itoa(schm))
53        schs:= OpenService(schm,PChar(sService),SERVICE_START or SERVICE_QUERY_STATUS);
54        if(schs > 0) then begin
55          writeln('schs:'+itoa(schm))
56          psTemp := '';
57          if(StartService(schs,0,psTemp)) then begin
58            if(QueryServiceStatus(schs,ss)) then begin
59              while(SERVICE_RUNNING <> ss.dwCurrentState) do begin
60                dwChkP := ss.dwCheckPoint;
61                Sleep(ss.dwWaitHint);
62                if(not QueryServiceStatus(schs,ss))then
63                begin
64                  break;
65                end;
66                if(ss.dwCheckPoint < dwChkP)then
67                begin
68                  break;
69                end;
70              end;
71            end;
72          end;
73          CloseServiceHandle(schs);
74        end;
75        CloseServiceHandle(schm);
76      end;
77   Result := SERVICE_RUNNING = ss.dwCurrentState;
78 end;
79 
80 //uses
81   //WinSvc;
82 
83 function ServiceGetStatus(sMachine, sService: PChar): DWORD;
84   {******************************************}
85   {*** Parameters: ***}
86   {*** sService: specifies the name of the service to open
87   {*** sMachine: specifies the name of the target computer
88   {*** ***}
89   {*** Return Values: ***}
90   {*** -1 = Error opening service ***}
91   {*** 1 = SERVICE_STOPPED ***}
92   {*** 2 = SERVICE_START_PENDING ***}
93   {*** 3 = SERVICE_STOP_PENDING ***}
94   {*** 4 = SERVICE_RUNNING ***}
95   {*** 5 = SERVICE_CONTINUE_PENDING ***}
96   {*** 6 = SERVICE_PAUSE_PENDING ***}
97   {*** 7 = SERVICE_PAUSED ***}
98   {******************************************}
99 var
100   SCManHandle, SvcHandle: SC_Handle;
101   SS: TServiceStatus;
102   dwStat: DWORD;
103   ap: pchar;
104 begin
105   dwStat := 0;
106   // Open service manager handle.
107   SCManHandle := OpenSCManager(sMachine, ap, SC_MANAGER_CONNECT);
108   if (SCManHandle > 0) then begin
109     SvcHandle := OpenService(SCManHandle, sService, SERVICE_QUERY_STATUS);
110     // if Service installed
111     if (SvcHandle > 0) then begin
112       // SS structure holds the service status (TServiceStatus);
113       if (QueryServiceStatus(SvcHandle, SS)) then
114         dwStat := ss.dwCurrentState;
115         writeln('debug ss.dwCurrentState '+itoa(dwstat))
116       CloseServiceHandle(SvcHandle);
117     end;
118     CloseServiceHandle(SCManHandle);
119   end;
120   Result := dwStat;
121 end;
122 
123 //https://www.swissdelphicenter.ch/en/showcode.php?id=1275
124 
125 function ServiceRunning(sMachine, sService: PChar): Boolean;
126 begin
127   writeln('service status: '+itoa(ServiceGetStatus(sMachine, sService)));
128   Result:= SERVICE_RUNNING = ServiceGetStatus(sMachine, sService);
129 end;
130 
131 procedure Get_netWork_ServiceErrors;
132  var  isloc: ISWBemLocator;
133       iserv: ISWBemServices;
134       iset:  ISWbemObjectSet;
135       aQuery, wmi_dom: string;
136       ENum: IEnumVariant;
137       vObj: OleVariant;
138 begin
139   isloc:= WMIStart;
140   iserv:= WMIConnect(isloc, 'localhost','',''); 
141   aQuery:= 'Select * from Win32_NTLogEvent Where Logfile="System" And EventType="1"'+
142                ' AND User = "NT AUTHORITY\\NETWORK SERVICE"';   
143     it:= 0;
144     iset:= WMIExecQuery(iserv, aQuery); 
145     if WMIRowFindFirst(iset, ENum, vObj) then repeat 
146       inc(it)
147       PrintF('-systime %d: %s - Name %s User %s'+#13#10+'%s'+#13#10,
148                [it, vObj.TimeGenerated,vObj.SourceName,vObj.User,vObj.message])
149     until not WMIRowFindNext(ENum, vObj); 
150     writeln('Sum System Network Errors : '+itoa(it))
151     vObj:= unassigned;
152 end;
153 
154 //https://docs.microsoft.com/en-us/windows/win32/eventlog/event-types
155 
156 procedure Get_NetWork_ServiceWarnings;
157  var iserv: ISWBemServices;
158      iset:  ISWbemObjectSet;
159      aQuery: string;
160      ENum: IEnumVariant;
161      vObj: OleVariant;
162 begin
163   //WMIConnect3(WMIStart, 'root\CIMV2','localhost','NETWORK SERVICE',''); 
164   iserv:= WMIConnect2(WMIStart,'root\CIMV2','localhost','NETWORK SERVICE',''); 
165 
166   aQuery:='Select * from Win32_NTLogEvent Where Logfile="System" And EventType="2"'+
167                  ' AND User = "NT AUTHORITY\\NETWORK SERVICE"';   
168     it:= 0;
169     iset:= WMIExecQuery(iserv, aQuery); 
170     if WMIRowFindFirst(iset, ENum, vObj) then repeat 
171        inc(it)
172        PrintF('-systime %d: %s - Name %s User %s'+#13#10+'%s'+#13#10,
173                [it, vObj.TimeGenerated,vObj.SourceName,vObj.User,vObj.message])
174     until not WMIRowFindNext(ENum, vObj); 
175     vObj:= unassigned;
176 end;
177 
178 
179  //...play two sounds simultaneously!
180 procedure SendMCICommand2(Cmd: string);
181 var
182   RetVal: Integer;
183   ErrMsg: pchar; //array[0..254] of char;
184 begin
185   RetVal := mciSendString(pchar(Cmd), Pchar(errmsg), 250, 0);
186   if RetVal <> 0 then begin
187     {get message for returned value}
188     //mciGetErrorString(RetVal, 'ErrMsg', 255);
189     MessageDlg(StrPas(ErrMsg), mtError, [mbOK], 0);
190   end;
191 end;
192 
193 //https://www.swissdelphicenter.ch/en/showcode.php?id=1545
194 
195 function CalculateAge(Birthday, CurrentDate: TDate): Integer;
196 var
197   Month, Day, Year, CurrentYear, CurrentMonth, CurrentDay: Word;
198 begin
199   DecodeDate(Birthday, Year, Month, Day);
200   DecodeDate(CurrentDate, CurrentYear, CurrentMonth, CurrentDay);
201   if (Year= CurrentYear) and (Month= CurrentMonth) and (Day= CurrentDay) then
202   begin
203     Result := 0;
204   end else begin
205     Result := CurrentYear - Year;
206     if (Month > CurrentMonth) then
207       Dec(Result)
208     else begin
209       if Month = CurrentMonth then
210         if (Day > CurrentDay) then
211           Dec(Result);
212     end;
213   end;
214 end;
215 
216 
217 procedure TForm1FormCreateMonitor(Sender: TObject);
218 var
219   i: integer;
220   Monitors: array[1..5] of TStringList;
221     CurrentMonitor: Integer;
222 begin
223   //
224   ShowWindow(Application.Handle, SW_HIDE);
225   SetWindowLong(Application.Handle,
226     GWL_EXSTYLE, GetWindowLong(Application.Handle, GWL_EXSTYLE) and
227     not WS_EX_APPWINDOW or WS_EX_TOOLWINDOW);
228   ShowWindow(Application.Handle, SW_SHOW);
229 
230   CurrentMonitor := 1;
231   for i := Low(Monitors) to High(Monitors) do
232     Monitors[i] := TStringList.Create;
233 end;
234 
235 //https://github.com/Zeus64/alcinoe/blob/master/source/ALXmlDoc.pas
236 
237 const XMLURL= 'https://www.cs.utexas.edu/~mitra/csFall2018/cs329/lectures/xml/planes.xml.txt';
238 
239    XMLURL2= 'https://github.com/Zeus64/alcinoe/blob/master/source/ALXmlDoc.pas';
240    
241    XMLURL3 = 'https://www.w3schools.com/xml/cd_catalog.xml';
242    
243    XMLURL4 = 'view-source:https://www.w3schools.com/xml/cd_catalog.xml';
244    
245 
246 procedure XMLStreamFeedTest(xmlfile: string);
247 var
248    StartItemNode : TALXMLNode; //IXMLNode;
249    ANode : TALXMLNode; //IXMLNode;
250    STitle, sDesc, sLink : AnsiString;
251    XMLDoc: TALXMLDocument;
252    ix: integer;
253    xmlStream: TMemoryStream;
254 begin
255 //...
256   //points to local XML file in "original" code
257   //XMLDoc.FileName := 'http://0.tqn.com/6/g/delphi/b/index.xml';
258   //procedure LoadFromStream(const Stream: TStream; Const StreamContainOnlyChildNodes: Boolean=False; Const ClearChildNodes: Boolean = True); // [added from TXMLNode]
259   //https://www.cs.utexas.edu/~mitra/csFall2018/cs329/lectures/xml/planes.xml.txt
260   
261   xmlStream:= TMemoryStream.create;
262   XMLDoc:= TALXMLDocument.create;
263   
264   try
265   //WinInet_HttpGet(XMLURL,xmlStream);
266   HttpGet(XMLURL,xmlStream);
267   writeln('xmlstreamsize: '+itoa(xmlStream.size))
268   //writeln('xmlstreamcontent: '+streamtostring3(xmlStream))
269   
270    //XMLDoc.LoadFromStream(xmlStream, false); //
271    //  XMLDoc.LoadFromFile(Exepath+'examples\planes.xml',false); //
272    XMLDoc.LoadFromFile(xmlfile,false); //
273    XMLDoc.Active:=True;
274   //writeln('XMLdoc: '+XMLdoc.xml)
275   
276   StartItemNode:=  XMLDoc.DocumentElement.ChildNodes.FindNode('CD') ;
277    //XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('TITLE') ;
278   writeln(objtostr(StartItemNode))
279   ANode := StartItemNode;
280   writeln(objtostr(Anode))
281   repeat
282     //writeln('repeat')
283     //STitle :=  (ANode.childNodes.nodes2[0].Text);   //title
284     STitle:= ANode.childNodes.nodes1['TITLE'].Text;   //title
285     sLink := ANode.childnodes.nodes1['ARTIST'].Text;
286     sDesc := ANode.ChildNodes.nodes1['COMPANY'].Text;
287     //add to list view
288     {with LV.Items.Add do begin
289       Caption := STitle;
290       SubItems.Add(sLink) ;
291       SubItems.Add(sDesc)
292     end;}
293       writeln(sLink) ;
294       writeln(STitle);
295       writeln(sDesc);
296       writeln('--------------');
297     //end;
298     ANode := ANode.NextSibling;
299   until ANode = Nil;
300   
301   finally
302     xmlStream.Free
303     XMLDoc.Free;
304     writeln('free xmlstream + xmldoc + nodes')
305   end;  
306 end;
307 
308 procedure testResFind;
309 var
310   hFind, hRes: THandle;
311   Song       : PChar;
312 begin
313   hFind := FindResource(HInstance, 'BATTERY', 'WAV');
314   if (hFind <> 0) then begin
315     hRes := LoadResource(HInstance, hFind);
316     if (hRes <> 0) then begin
317       Song := LockResource(hRes);
318       if Assigned(Song) then begin
319         SndPlaySound(Song, snd_ASync or snd_Memory);
320       end;
321       UnlockResource(hRes);
322     end;
323     FreeResource(hFind);
324   end;
325 end; 
326 
327 procedure TForm1Button1ClickXML_OLE(Sender: TObject);
328 var
329   xml: variant; //IXMLDOMDocument;
330   node: variant; //IXMLDomNode;
331   nodes_row, nodes_se: variant; //IXMLDomNodeList;
332   i, j: Integer;
333   url: string;
334 begin
335   // put url or file name
336   //url := 'http://softez.pp.ua/gg.xml';
337   url := XMLURL3;
338   xml := CreateOleObject('Microsoft.XMLDOM'); // as IXMLDOMDocument;
339   xml.async := False;
340   xml.load(url); // or use loadXML to load XML document using a supplied string
341   if xml.parseError.errorCode <> 0 then
342     Exception.Create('XML Load error:' + xml.parseError.reason);
343 
344   //Memo2.Clear;
345   nodes_row := xml.selectNodes('/CATALOG/CD');
346   for i := 0 to nodes_row.length - 1 do begin
347     node := nodes_row.item[i];
348     Memo2.Lines.Add('phrase=' + node.selectSingleNode('TITLE').text);
349     //nodes_se := node.selectNodes('search_engines/search_engine/se_url');
350     nodes_se := node.selectNodes('ARTIST');
351     for j := 0 to nodes_se.length - 1 do begin
352       node := nodes_se.item[j];
353       Memo2.Lines.Add('artist=' + node.text);
354     end;
355     Memo2.Lines.Add('--------------');
356   end;
357 end;
358 
359 function TForm1QueryXMLData(XMLFilename, XMLQuery: string): string;
360 var
361   iNode : IDOMNode;
362   Sel: IDOMNodeSelect;
363    XMLDoc: TALXMLDocument;
364 begin
365   try
366     XMLDoc.Active := False;
367     XMLDoc.FileName := XMLFilename;
368     XMLDoc.Active := True;
369    // Sel := XMLDoc.DOMDocument as IDomNodeSelect;
370     Result := '';
371     iNode := Sel.selectNode('Link[@role = "self"]');
372     //if Assigned(iNode) then
373       //if (not VarisNull(iNode.NodeValue)) then
374         //Result := iNode.NodeValue;
375     XMLDoc.Active := False;
376   Except //on E: Exception do
377     begin
378       MessageDlg('E.ClassName' + ': ' + 'E.Message', mtError, [mbOK], 0);
379       //LogEvent(E.Message);
380     end;
381   end;
382 end;
383  
384 procedure XMLStreamFeedTestURL(xmlurl: string);
385 var
386    StartItemNode : TALXMLNode; //IXMLNode;
387    ANode : TALXMLNode; //IXMLNode;
388    STitle, sDesc, sLink : AnsiString;
389    XMLDoc: TALXMLDocument;
390    ix: integer;
391    xmlStream: TMemoryStream;
392 begin
393   //procedure LoadFromStream(const Stream: TStream; Const StreamContainOnlyChildNodes: Boolean=False; Const ClearChildNodes: Boolean = True); // [added from TXMLNode]
394   //https://www.cs.utexas.edu/~mitra/csFall2018/cs329/lectures/xml/planes.xml.txt
395   
396   xmlStream:= TMemoryStream.create;
397   XMLDoc:= TALXMLDocument.create;
398   try
399      //WinInet_HttpGet(XMLURL,xmlStream);
400      HttpGet(XMLURL,xmlStream);
401      writeln('xmlstreamsize: '+itoa(xmlStream.size))
402      writeln('xmlstreamcontent: '+streamtostring3(xmlStream))
403      
404      XMLDoc.LoadFromStream(xmlStream, false); //
405      XMLDoc.Active:=True;
406      writeln('XMLdoc: '+XMLdoc.xml)
407      StartItemNode:=  XMLDoc.DocumentElement.ChildNodes.FindNode('CD') ;
408      //XMLDoc.DocumentElement.ChildNodes.First.ChildNodes.FindNode('TITLE') ;
409      writeln(objtostr(StartItemNode))
410      ANode := StartItemNode;
411      writeln(objtostr(Anode))
412   repeat
413     STitle:= ANode.childNodes.nodes1['TITLE'].Text;   //title
414     sLink := ANode.childnodes.nodes1['ARTIST'].Text;
415     sDesc := ANode.ChildNodes.nodes1['COMPANY'].Text;
416       writeln(sLink) ;
417       writeln(STitle);
418       writeln(sDesc);
419       writeln('--------------');
420     ANode := ANode.NextSibling;
421   until ANode = Nil;
422   finally
423     xmlStream.Free
424     XMLDoc.Free;
425     writeln('free xmlstream + xmldoc + nodes')
426   end;  
427 end;
428 
429 var pdwMajor, pdwMinor:Integer;
430 
431 Begin //@main
432 
433   if fileExists(Exepath +'examples\maxbox.mp3 ') then begin
434     SendMCICommand2('open waveaudio shareable');
435     //SendMCICommand2('play "C:\maXbox\maxbox3\maxbox3\maXbox3\yeahcleared.wav"');
436     SendMCICommand2('play "C:\maXbox\maxbox3\maxbox3\maXbox3\maxbox.mp3"');   
437     SendMCICommand2('close waveaudio');
438   end;  
439   
440   //WinExec32('rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,,2',SW_SHOWNORMAL);
441   //https://stackoverflow.com/questions/10576312/use-wave-file-from-project
442   
443   //if fileExists(Exepath + 'examples\928_cd_catalog2.xml ') then
444     //  XMLStreamFeedTest(Exepath+'examples\928_cd_catalog2.xml') else
445     TForm1Button1ClickXML_OLE(self)
446       
447   //XMLStreamFeedTestURL(XMLURL3); {doesnt work proper?}  
448   
449   //GetDLLVersion(const DLLName:string;var pdwMajor, pdwMinor:Int) : Boolean
450   if GetDLLVersion('kernel32.dll',pdwMajor, pdwMinor) then 
451      writeln('kernel32 has version: '+itoa(pdwmajor) +' '+itoa(pdwminor));
452      
453   if GetDLLVersion('gdi32.dll',pdwMajor, pdwMinor) then 
454      writeln('gdi32 has version: '+itoa(pdwmajor) +' '+itoa(pdwminor));
455 
456   if GetDLLVersion('shell32.dll',pdwMajor, pdwMinor) then 
457      writeln('shell32 has version: '+itoa(pdwmajor) +' '+itoa(pdwminor));
458      
459      //Application.MainForm.Show;
460      //ShowWindow(Application.Handle, SW_HIDE);
461 
462   //if ServiceRunning('maxbox10', 'EventLog') then
463   //if ServiceRunning('MAXBOX10', 'Windows Event Log') then
464   if ServiceRunning('localhost', 'EventLog') then
465     ShowMessage('Eventlog Service Running!')
466   else
467     ShowMessage('Eventlog Service not Running') ;   //}
468     
469   if ServiceRunning('localhost', 'Fax') then
470     ShowMessage('Fax Service Running')
471   else
472     ShowMessage('Fax Service NOT Running') ;   //}  
473     
474     writeln(GetLastErrorMessage) 
475     
476   //  function isServiceRunning(sMachine, sService: PChar): Boolean;
477    // writeln(botoStr(isServiceRunning('MAXBOX10','EventLog')));
478     writeln('EventLog: '+botoStr(isServiceRunning('localhost','EventLog')));
479     writeln('Fax: '+botoStr(isServiceRunning('localhost','Fax')));
480     writeln('EventSystem: '+botoStr(isServiceRunning('localhost','EventSystem')));
481     
482     Get_netWork_ServiceErrors;
483     
484     Get_NetWork_ServiceWarnings;
485 
486 End.
487 
488 Doc:
489 
490   https://www.freepascal.org/~michael/articles/services/services.pdf
491   https://www.pinvoke.net/default.aspx/Constants/Service.html
492   http://delphi.cjcsoft.net/viewthread.php?tid=44335
493 
494 
495 Ref:
496 
497 procedure SIRegister_httpsend(CL: TPSPascalCompiler);
498 begin
499  Const('cHttpProtocol','String '80;
500   AddTypeS('TTransferEncoding', '( TE_UNKNOWN, TE_IDENTITY, TE_CHUNKED );
501   SIRegister_THTTPSend(CL);
502  Function HttpGetText( const URL : string; const Response : TStrings) : Boolean;
503  Function HttpGetBinary( const URL : string; const Response : TStream) : Boolean;
504  Function HttpPostBinary( const URL : string; const Data : TStream) : Boolean;
505  Function HttpPostURL( const URL, URLData : string; const Data : TStream) : Boolean;
506  Function HttpPostFile(const URL,FieldName,FileName:string;const Data:TStream;const ResultData:TStrings):Bool;
507 end;
508 
509  TALXMLNodeList = class(Tobject)
510   Private
511     //[Deleted from TXMLNodeList] FDefaultNamespaceURI: DOMString;
512     //[Deleted from TXMLNodeList] FNotificationProc: TNodeListNotification;
513     //[Deleted from TXMLNodeList] FUpdateCount: Integer;
514     FCapacity: Integer; // [added from TXMLNodeList]
515     FCount: integer; // [added from TXMLNodeList]
516     FList: TALXMLPointerList; //[Replace from TXMLNodeList] FList: IInterfaceList;
517     [weak] FOwner: TALXMLNode;
518     procedure QuickSort(L, R: Integer; XCompare: TALXMLNodeListSortCompare); // [added from TXMLNodeList]
519   protected
520     //[Deleted from TXMLNodeList] function DoNotify(Operation: TNodeListOperation; const Node: IXMLNode; const IndexOrName: OleVariant; BeforeOperation: Boolean): IXMLNode;
521     //[Deleted from TXMLNodeList] function InternalInsert(Index: Integer; const Node: TALXMLNode): Integer;
522     //[Deleted from TXMLNodeList] property DefaultNamespaceURI: AnsiString read GetDefaultNamespaceURI;
523     //[Deleted from TXMLNodeList] property List: IInterfaceList read FList;
524     //[Deleted from TXMLNodeList] property NotificationProc: TNodeListNotification read FNotificationProc;
525     procedure Grow; // [added from TXMLNodeList]
526     procedure SetCapacity(NewCapacity: Integer); // [added from TXMLNodeList]
527     procedure SetCount(NewCount: Integer); // [added from TXMLNodeList]
528     property Owner: TALXMLNode read FOwner;
529     function Get(Index: Integer): TALXMLNode;
530     function GetNodeByIndex(Const Index: Integer): TALXMLNode; // [added from TXMLNodeList]
531     function GetNodeByName(Const Name: AnsiString): TALXMLNode; // [added from TXMLNodeList]
532     Function InternalInsert(Index: Integer; const Node: TALXMLNode): integer;
533   public
534     //[Deleted from TXMLNodeList] function Delete(const Name, NamespaceURI: AnsiString): Integer; overload;
535     //[Deleted from TXMLNodeList] function FindNode(NodeName, NamespaceURI: AnsiString): TALXMLNode; overload;
536     //[Deleted from TXMLNodeList] function FindNode(ChildNodeType: TGuid): IXMLNode; overload;
537     //[Deleted from TXMLNodeList] function GetUpdateCount: Integer;
538     //[Deleted from TXMLNodeList] function IndexOf(const Name, NamespaceURI: AnsiString): Integer; overload;
539     //[Deleted from TXMLNodeList] procedure BeginUpdate;
540     //[Deleted from TXMLNodeList] procedure EndUpdate;
541     //[Deleted from TXMLNodeList] property UpdateCount: Integer read GetUpdateCount;
542     constructor Create(Owner: TALXMLNode); //[Replace from TXMLNodeList] constructor Create(Owner: TXMLNode; const DefaultNamespaceURI: DOMString; NotificationProc: TNodeListNotification);
543     destructor Destroy; override;
544     procedure CustomSort(Compare: TALXMLNodeListSortCompare); // [added from TXMLNodeList]
545     function Add(const Node: TALXMLNode): Integer;
546     function Delete(const Index: Integer): Integer; overload;
547     function Delete(const Name: AnsiString): Integer; overload;
548     function Extract(const index: integer): TALXMLNode; overload; // [added from TXMLNodeList]
549     function Extract(const Node: TALXMLNode): TALXMLNode; overload; // [added from TXMLNodeList]
550     procedure Exchange(Index1, Index2: Integer); // [added from TXMLNodeList]
551     function FindNode(const NodeName: AnsiString): TALXMLNode; overload;
552     function FindNode(const NodeName: AnsiString; NodeAttributes: Array of ansiString): TALXMLNode; overload; // [added from TXMLNodeList]
553     function FindSibling(const Node: TALXMLNode; Delta: Integer): TALXMLNode;
554     function First: TALXMLNode;
555     function IndexOf(const Name: AnsiString): Integer; overload;
556     function IndexOf(const Node: TALXMLNode): Integer; overload;
557     function Last: TALXMLNode;
558     function Remove(const Node: TALXMLNode): Integer;
559     function ReplaceNode(const OldNode, NewNode: TALXMLNode): TALXMLNode;
560     procedure Clear;
561     procedure Insert(Index: Integer; const Node: TALXMLNode);
562     property Count: Integer read fCount;
563     property Nodes[const Name: AnsiString]: TALXMLNode read GetNodeByName; default;
564     property Nodes[const Index: integer]: TALXMLNode read GetNodeByIndex; default;
565   end;
566   
567 
568 deshollinador - Schornsteinfeger
569 hollinador - brüllen- holler  
570  Instrumento que sirve para deshollinar chimeneas.
571 2
572 Escoba de palo muy largo que suele cubrirse con un paño para limpiar techos y paredes.
573 adjective
574 1
575 [persona] Que tiene por oficio deshollinar chimeneas.
576 
577 The film rages at the human condition and the darkness that might break a person and turn that person into a monster. Specifically, Phillips points fingers at the wealthy and powerful, who claim to want to help but make it impossible for the downtrodden to pick themselves up.
578 Der Film tobt über den menschlichen Zustand und die Dunkelheit, die eine Person zerbrechen und diese Person in ein Monster verwandeln könnte. Insbesondere zeigt Phillips mit den Fingern auf die Reichen und Mächtigen, die behaupten, helfen zu wollen, es aber den Unterdrückten unmöglich machen, sich zu erheben.
579 
580 Example Output:
581 
582 kernel32 has version: 4 0
583 gdi32 has version: 4 0
584 shell32 has version: 10 0
585 debug ss.dwCurrentState 4
586 service status: 4
587 debug ss.dwCurrentState 4
588 debug ss.dwCurrentState 1
589 service status: 1
590 debug ss.dwCurrentState 1
591 The operation completed successfully
592 TRUE
593 FALSE
594 TRUE
595 -systime 1: 20190908151419.913712-000 - Name Microsoft-Windows-DistributedCOM User NT AUTHORITY\NETWORK SERVICE
596 The server {A47979D2-C419-11D9-A5B4-001185AD2B89} did not register with DCOM within the required timeout.
597 
598 Sum System Network Errors : 1
599 -systime 1: 20200107083039.351944-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
600 Name resolution for the name mail.bfh.ch timed out after none of the configured DNS servers responded.
601 
602 -systime 2: 20191226204911.200101-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
603 Name resolution for the name hopl.info timed out after none of the configured DNS servers responded.
604 
605 -systime 3: 20191213133858.655401-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
606 Name resolution for the name hopl.info timed out after none of the configured DNS servers responded.
607 
608 -systime 4: 20191211223507.052803-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
609 Name resolution for the name push.services.mozilla.com timed out after none of the configured DNS servers responded.
610 
611 -systime 5: 20191211223502.046222-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
612 Name resolution for the name wpad.home timed out after none of the configured DNS servers responded.
613 
614 -systime 6: 20191210191544.084878-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
615 Name resolution for the name www.ecospace.de timed out after none of the configured DNS servers responded.
616 
617 -systime 7: 20191204073459.459991-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
618 Name resolution for the name ipinfo.io timed out after none of the configured DNS servers responded.
619 
620 -systime 8: 20191202224950.153925-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
621 Name resolution for the name wpad timed out after none of the configured DNS servers responded.
622 
623 -systime 9: 20191202223942.395418-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
624 Name resolution for the name wpad timed out after none of the configured DNS servers responded.
625 
626 -systime 10: 20191126122403.036168-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
627 Name resolution for the name hopl.info timed out after none of the configured DNS servers responded.
628 
629 -systime 11: 20191125213641.793233-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
630 Name resolution for the name hopl.info timed out after none of the configured DNS servers responded.
631 
632 -systime 12: 20191125134823.100186-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
633 Name resolution for the name hopl.info timed out after none of the configured DNS servers responded.
634 
635 -systime 13: 20191124141624.684651-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
636 Name resolution for the name www.euro-trains.ch timed out after none of the configured DNS servers responded.
637 
638 -systime 14: 20191120172146.473138-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
639 Name resolution for the name 1.static.australianindependentbusinessmedia.com.au timed out after none of the configured DNS servers responded.
640 
641 -systime 15: 20191117131611.647253-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
642 Name resolution for the name www.dsdt.info timed out after none of the configured DNS servers responded.
643 
644 -systime 16: 20191113132258.757458-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
645 Name resolution for the name www.ecospace.de timed out after none of the configured DNS servers responded.
646 
647 -systime 17: 20191113123250.958232-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
648 Name resolution for the name www.ecospace.de timed out after none of the configured DNS servers responded.
649 
650 -systime 18: 20191109164359.571040-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
651 Name resolution for the name x.instagramfollowbutton.com timed out after none of the configured DNS servers responded.
652 
653 -systime 19: 20191102162046.668476-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
654 Name resolution for the name push.services.mozilla.com timed out after none of the configured DNS servers responded.
655 
656 -systime 20: 20191022190144.116992-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
657 Name resolution for the name hopl.info timed out after none of the configured DNS servers responded.
658 
659 -systime 21: 20191021204939.063793-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
660 Name resolution for the name co.mments.com timed out after none of the configured DNS servers responded.
661 
662 -systime 22: 20191008141622.226287-000 - Name Microsoft-Windows-DNS-Client User NT AUTHORITY\NETWORK SERVICE
663 Name resolution for the name x.instagramfollowbutton.com timed out after none of the configured DNS servers responded.
664 
665  mX4 executed: 08/01/2020 14:08:46  Runtime: 0:0:22.450  Memload: 43% use
666 PascalScript maXbox4 - RemObjects & SynEdit
667 930_service_tools.pas last File set history
668 C:\maXbox\maxbox3\maxbox3\maXbox3\examples\930_service_tools2.pas stored
669 930_service_tools2.pas in maxboxdef.ini stored: 14:09:22
670 
671 
672