This component has been replaced by much powerful binary file management set of
components. Please go to the ActiveX Pack1
page
Binarysendfile component
WARNING this component is still provided for backward compatibility only. See ActiveX Pack1 for binary file management objects.
Installtion
Register component using regsvr32 binarysendfile.dll.
General
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.
Usage
Component name is binaryfilesend i.e.create component's object as follows:
Server.CreateObject("binarysendfile.BinFileSend")
BinFileSend is the only object supported by this library.
Objects
BinFileSend |
|
|
Properties:
Name |
access |
Description |
fileToSend |
read/write |
BSTR - file name to read |
About |
read |
BSTR - returns information about the component |
Bytes |
read |
Variant with SAFEARRAY of Bytes (Equivalent of Array of Byte in VB). Entire
file (specified in fileToSend property) as binary data. |
|
Sample:
<%@ Language=VBScript %>
<%
Set bin = Server.CreateObject("binarysendfile.BinFileSend")
Response.ContentType = "image/JPEG"
bin.fileToSend = "F:\Inetpub\wwwtest\mypicture.JPG"
oBytes = bin.Bytes
Response.BinaryWrite(oBytes)
%>
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.
download binarysendfile