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.

64 lines
1.0 KiB

  1. <HTML>
  2. <HEAD>
  3. <!--
  4. Copyright (c) 2000 Microsoft Corporation
  5. -->
  6. <OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  7. <SCRIPT LANGUAGE=JavaScript>
  8. function StartRead()
  9. {
  10. var stream = pchealth.OpenFileAsStream( idFile1.value );
  11. var out1 = stream.Read ( 12 );
  12. var out2 = stream.ReadHex( 12 );
  13. stream.Close();
  14. }
  15. function StartWrite()
  16. {
  17. var stream = pchealth.CreateFileAsStream( idFile1.value );
  18. var data = CreateVBArray();
  19. var out1 = stream.Write ( 12, data );
  20. var out2 = stream.WriteHex( 12, "ADEF0023" );
  21. stream.Close();
  22. }
  23. </SCRIPT>
  24. <SCRIPT LANGUAGE=VBScript>
  25. Function CreateVBArray()
  26. Dim a(3)
  27. a(0) = 1
  28. a(1) = 2
  29. a(2) = 3
  30. a(3) = 4
  31. CreateVBArray = a
  32. End Function
  33. </SCRIPT>
  34. </HEAD>
  35. <BODY>
  36. <INPUT type="file" id="idFile1"><P>
  37. <BUTTON onClick="StartRead();">Start Read</BUTTON>
  38. <BUTTON onClick="StartWrite();">Start Write</BUTTON><BR>
  39. <DIV id=idOutput ALIGN=center VALIGN=middle></DIV>
  40. </BODY>
  41. </HTML>