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
64 lines
1.0 KiB
<HTML>
|
|
<HEAD>
|
|
|
|
<!--
|
|
Copyright (c) 2000 Microsoft Corporation
|
|
-->
|
|
|
|
<OBJECT ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
|
|
|
|
<SCRIPT LANGUAGE=JavaScript>
|
|
|
|
function StartRead()
|
|
{
|
|
var stream = pchealth.OpenFileAsStream( idFile1.value );
|
|
|
|
var out1 = stream.Read ( 12 );
|
|
var out2 = stream.ReadHex( 12 );
|
|
|
|
stream.Close();
|
|
}
|
|
|
|
function StartWrite()
|
|
{
|
|
var stream = pchealth.CreateFileAsStream( idFile1.value );
|
|
|
|
var data = CreateVBArray();
|
|
|
|
var out1 = stream.Write ( 12, data );
|
|
var out2 = stream.WriteHex( 12, "ADEF0023" );
|
|
|
|
stream.Close();
|
|
}
|
|
|
|
</SCRIPT>
|
|
|
|
<SCRIPT LANGUAGE=VBScript>
|
|
|
|
Function CreateVBArray()
|
|
Dim a(3)
|
|
|
|
a(0) = 1
|
|
a(1) = 2
|
|
a(2) = 3
|
|
a(3) = 4
|
|
|
|
CreateVBArray = a
|
|
End Function
|
|
|
|
</SCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY>
|
|
|
|
<INPUT type="file" id="idFile1"><P>
|
|
|
|
<BUTTON onClick="StartRead();">Start Read</BUTTON>
|
|
<BUTTON onClick="StartWrite();">Start Write</BUTTON><BR>
|
|
|
|
<DIV id=idOutput ALIGN=center VALIGN=middle></DIV>
|
|
|
|
</BODY>
|
|
</HTML>
|
|
|