This component has been replaced by much powerful binary file management set of
components. Please go to the ActiveX Pack1
WARNING this component is still provided for backward compatibility only. See ActiveX Pack1 for binary file management objects.
Register component using regsvr32 binarysendfile.dll.
Binarysendfile component implements simple file read and access to the binary data
read from file through property. It can be used to construct ASP pages that must send
pictures or other files not modified to the client.
Component name is binaryfilesend i.e.create component's object as follows:
BinFileSend is the only object supported by this library.
||BSTR - file name to read
||BSTR - returns information about the component
||Variant with SAFEARRAY of Bytes (Equivalent of Array of Byte in VB). Entire
file (specified in fileToSend property) as binary data.
<%@ Language=VBScript %>
Set bin = Server.CreateObject("binarysendfile.BinFileSend")
Response.ContentType = "image/JPEG"
bin.fileToSend = "F:\Inetpub\wwwtest\mypicture.JPG"
oBytes = bin.Bytes
This sample reads and returns picture to the client i.e. this is an ASP script that
returns image - not HTML.
ContentType property of the Response object must be set to the appropriate MIME type.