????? ????? "?" ??? ???????? ???????? ?? ASP

?????? ????????? ?????? ?????????
???? ???????: 193998 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ??? ?????? ????? ????? ???? ???????? ???????? ???????? ????? "?????? ??????".

???? ???????? ?????? ?? ????? ??????? Scripting.FileSystemObject ?? ??? ??? ASCII ???? ???????? ?? ?? Microsoft Word ?? Microsoft Excel ?? ???? Internet Explorer. ?? ????? ?? ?????? ?????? ASP ?? ?????? ???? ??? ?????? ?????? ?????? ??????? ???? ????? ??? ?????? ?????? ??? ???? ??? Excel ?? ????? ??????? ?? ??? Adobe Acrobat (.pdf) ???? .gif ?? ??? ????? ???? ????? ??? ???????? ????????. ??? ???? ???? ????? ???????? ASP ???? ????? ?????? ?? ???? ???? ??? ???????.

??????? ????

???? ????? ???? ????????? ???????? ?? ASP ????? ????? ????? ??????? ???????? MIME ????? ?? II ??? ???? ????? ????? Visual Basic 5.0 (?? ????) DLL ActiveX ?????? ???? ???? ?????? ASP ?? ????? ???????? ????????.

????? 1: ????? ASP ???? ??? ???? ??? Excel ??? ??????? ????? ???????

   <%
   Response.buffer = TRUE
   Response.ContentType = "application/x-msexcel"

   Dim vntStream

   Set oMyObject = Server.CreateObject("MyObject.BinRead")
   vntStream = oMyObject.readBinFile("c:\temp\tempxls.xls")

   Response.BinaryWrite(vntStream)

   Set oMyObject = Nothing

   Response.End
   %>
				

??????: ????? Acrobat ?? ????? ??? MIME ???????? Response.ContentType = "???????/pdf". ?????? ??? ???? .gif ?????? Response.ContentType = "????/gif".

????? ??????: Visual Basic 5.0 ActiveX DLL (MyObject.BinRead)

?????? ?????? ???? ???? ?????? ????? ????? ?????? ??????? ???????:
  1. ????? ????? DLL ActiveX ???? ?? Visual Basic 5.0 ?? ????.
  2. ????? ????? ??????? MyObject.
  3. ????? ????? ??? ?????? ??????? BinRead.
  4. ?? ?? ?? ???? ???????? ???????? ??????? ?? ???? Declarations ??? ?? ??? ?????? ???????:
       Function readBinFile(ByVal bfilename As String) As Variant
              Dim fl As Long
              Dim FileNum As Long
              Dim binbyte() As Byte
              Dim binfilestr As String
    
              On Error GoTo errHandler
              
              FileNum = FreeFile
              Open bfilename For Binary Access Read As #FileNum
    
              fl = FileLen(bfilename)
              ReDim binbyte(fl)
    
              Get #FileNum, , binbyte
    
              Close #FileNum
    
              readBinFile = binbyte
              Exit Function
    
          errHandler:
              Exit Function
          End Function
    						
  5. ??? ???????.
  6. ?? ??????? ??? ???? ??? ???? MyObject.dll.
??? ??? ???? ??? ??? ???? ?????? ?? ??? ??? ?????? ??????, ????? ??? ??? ?????? ??? ???? ??? ???????? RegSvr32 ???????.

?????? ????? ???? ?? ?????? ???? I ??? ??? ???? ASP ???? ????? ??? ???? ?? ????????? ?????? ? ??????? ???? ?????? ????? ????.

???????

???? ???????: 193998 - ????? ??? ??????: 06/???/1426 - ??????: 2.5
????? ???
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Active Server Pages 4.0
????? ??????: 
kbmt kbcode kbfso kbhowto kbscript KB193998 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????193998

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com