Browse discussions in Windows Installer Xml Group
Click here to read .Net and WiX articles
Dalun Software
What do you need today?
webhelper.vbs
' This file is provided as part of ASP Power Widgets Samples
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT
' WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
' INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
' OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
' PURPOSE.
' Copyright 1998-2002. All rights reserved.
' Dalun Software Inc. ASP Power Widgets
' http://dalun.com
' mail: sales@dalun.com
' mail: techsupport@dalun.com
' if you have any suggestions or requirements, please write to us.
' Revisions:
' 2.0.0 Initial release
Dim strByteArray
Dim strUnicode
Dim objWebHelper
Set objWebHelper = CreateObject("ASPPW.WebHelper.1")
WScript.Echo "-----------------------------------------------------------"
strByteArray = objWebHelper.ReadFromBinaryFile("Test.htm")
WScript.Echo "This is byteArray read from file: "
WScript.Echo strByteArray
WScript.Echo "-----------------------------------------------------------"
strBase64Encoded = objWebHelper.Base64EncodeByteArray(strByteArray)
WScript.Echo "This is Base64 Encoded string: "
WScript.Echo strBase64Encoded
WScript.Echo "-----------------------------------------------------------"
strByteArray = objWebHelper.Base64DecodeToByteArray(strBase64Encoded)
WScript.Echo "This is Base64 Decoded string: "
WScript.Echo strByteArray
WScript.Echo "-----------------------------------------------------------"
strUnicode = objWebHelper.StringMultiByteToUnicode(strByteArray)
WScript.Echo "This is unicode converted from pervious input: "
WScript.Echo strUnicode
WScript.Echo "-----------------------------------------------------------"
strByteArray = objWebHelper.StringUnicodeToMultiByte(strUnicode, 932)
WScript.Echo "This is shift_jis converted from pervious unicode: "
WScript.Echo strByteArray
WScript.Echo "-----------------------------------------------------------"
Call objWebHelper.WriteBinaryToFile("Test_Output.htm", strByteArray)
Call objWebHelper.LogEvent(1, 1, "WebHelper", "Demonstration of logging events.")
Set objWebHelper = Nothing
WScript.Quit
|
Click here to go back.