Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Developer Studio"> <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1"> <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT> <TITLE>Document Title</TITLE> </HEAD>
<BODY> <SCRIPT LANGUAGE=javascript> <!--
var g_dc;
function dc_onStatusChange( dc, status ) { Print( "onStatusChange " + status ); Print( "Change = " + dc.Status ); }
function dc_onProgress( dc, lDone, lTotal ) { Print( "onProgress " + lDone + " " + lTotal ); Print( "Change = " + dc.Status ); Print( "Percent = " + dc.PercentDone ); }
function dc_onComplete( dc, hr ) { Print( "onComplete " + hr ); Print( "Change = " + dc.Status );
for(var e = new Enumerator( dc.Reports ); !e.atEnd(); e.moveNext()) { var rep = e.item();
if(rep.ErrorCode != 0) { alert( "Error: " + rep.ErrorCode + " on " + rep.WQL ); } }
if(hr == 0) { stream = dc.MachineData_GetStream(); if(stream != null) { pchealth.CopyStreamToFile( "C:\\MachineData.xml", stream ); }
stream = dc.History_GetStream(); if(stream != null) { pchealth.CopyStreamToFile( "C:\\History.xml", stream ); } } g_dc = null; }
/////////////////////////////////////////////////////////////////////////////
function delta_onComplete( dc, hr ) { Print( "onComplete " + hr ); Print( "Change = " + dc.Status );
g_dc = null; }
/////////////////////////////////////////////////////////////////////////////
function Print( line ) { out.innerHTML = out.innerHTML + line + "<BR>"; }
function button_exec() { // debugger;
g_dc = pchealth.CreateObject_DataCollection();
g_dc.MachineData_DataSpec = "s:\\slm_pchealth\\src\\HelpCtr\\ScriptLib\\UnitTest\\sup1_DataSpec.xml" g_dc.History_DataSpec = "s:\\slm_pchealth\\src\\HelpCtr\\ScriptLib\\UnitTest\\sup1_History.xml" g_dc.History_MaxDeltas = 2; g_dc.onStatusChange = dc_onStatusChange; g_dc.onProgress = dc_onProgress; g_dc.onComplete = dc_onComplete;
g_dc.ExecuteAsync(); }
function button_delta() { // debugger;
g_dc = pchealth.CreateObject_DataCollection();
g_dc.onComplete = delta_onComplete;
g_dc.CompareSnapshots( "c:\\MachineData.xml", "c:\\MachineData2.xml", "c:\\Delta.xml" ); }
function button_abort() { if(g_dc != null) { g_dc.Abort(); } }
//--> </SCRIPT>
<INPUT type="button" value="Start Collection" onClick="button_exec();"> <INPUT type="button" value="Start Delta" onClick="button_delta();"> <INPUT type="button" value="Abort" onClick="button_abort();"><P>
<DIV ID=out></DIV>
</BODY> </HTML>
|