在ASP.Net中使用DSOFile ??? [英] Using DSOFile in ASP.Net???

查看:47
本文介绍了在ASP.Net中使用DSOFile ???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好 -


有人能告诉我是否可以在ASP.NET中访问DSOFile.dll?


DSOFile.dll已注册,我在.ASP脚本中使用它没有问题。我尝试过以下方法:


Dim oFilePropReader作为DSOleFile.PropertyReader

Dim oFileProperties as oFilePropReader.GetDocumentProperties(" C:\ MyDoc.do c" )

Response.write("< table>"& vbCRLF)

Response.write("< tr>< td>< B> ;标题:< / B>< / td>< td>"& oFileProperties.Title&"< / td>< / tr>"& vbCRLF)

..

..

Response.write("< / table>"& vbCRLF)


我得到的是类型''DSOleFile.PropertyReader''未定义。

另外 - 为什么DSOile的功能不是内置在System.IO类中的????

谢谢 -


柯蒂斯


Hello-

Can someone tell me if DSOFile.dll can be accessed within ASP.NET?

DSOFile.dll is registered and I have no problem using it in my .ASP scripts. I have tried the following:

Dim oFilePropReader As DSOleFile.PropertyReader
Dim oFileProperties As oFilePropReader.GetDocumentProperties("C:\MyDoc.do c")
Response.write ("<table>" & vbCRLF)
Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title & "</td></tr>" & vbCRLF)
..
..
Response.write ("</table>" & vbCRLF)

All I get is Type ''DSOleFile.PropertyReader'' is not defined.
Also - Why isn''t the functionality of DSOFile built into the System.IO class????
Thanks-

Curtis


推荐答案

开2003年9月26日星期五14:37:03 -0400,Curtis Tammany <克拉****** @ egginc.com>写道:

$ b $b¤您好 -
$ b $b¤
$ b $b¤有人能告诉我是否可以在ASP.NET中访问DSOFile.dll ?
$ b $b¤
$ b $b¤DSOFile.dll已注册,我在.ASP脚本中使用它没有问题。我尝试过以下方法:
$ b $b¤
$ b $b¤DimoFilePropReader作为DSOleFile.PropertyReader
$ b $b¤DimoFileProperties as oFilePropReader.GetDocumentProperties(" C: \ MyDoc.do c")
$ b $b¤Response.write("< table>& vbCRLF)
$ b $b¤Response.write("< tr>< td>< B>标题:< / B>< / td>< td>"& oFileProperties.Title&"< / td>< / tr>"& ; vbCRLF)
$ b $b¤。
$ b $b¤.
$ b $b¤Response.write("< / table>& vbCRLF)< br $> $ b $b¤
$ b $b¤所有我得到的类型''DSOleFile.PropertyReader''没有定义。


你还没有实例化您的任何对象。在任何情况下,以下内容适用于我:


Dim oFilePropReader为新DSOleFile.PropertyReader()

Dim oFileProperties As Object


oFileProperties = oFilePropReader.GetDocumentProperties(" e:\ My Documents \Product Rec

Guidelines.doc")

Console.WriteLine(oFileProperties.Title )

Console.WriteLine(oFileProperties.Author())

Console.WriteLine(oFileProperties.Comments)

oFileProperties = Nothing

oFilePropReader = Nothing

$ b $b¤
$ b $b¤另外 - 为什么DSOFile的功能不是内置在System.IO中的班级????


不知道。我想他们可以为结构化存储文件添加一个界面。

Paul ~~~ pc **** **@ameritech.net

Microsoft MVP(Visual Basic)
On Fri, 26 Sep 2003 14:37:03 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:

¤ Hello-
¤
¤ Can someone tell me if DSOFile.dll can be accessed within ASP.NET?
¤
¤ DSOFile.dll is registered and I have no problem using it in my .ASP scripts. I have tried the following:
¤
¤ Dim oFilePropReader As DSOleFile.PropertyReader
¤ Dim oFileProperties As oFilePropReader.GetDocumentProperties("C:\MyDoc.do c")
¤ Response.write ("<table>" & vbCRLF)
¤ Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title & "</td></tr>" & vbCRLF)
¤ .
¤ .
¤ Response.write ("</table>" & vbCRLF)
¤
¤ All I get is Type ''DSOleFile.PropertyReader'' is not defined.

You haven''t instantiated any of your objects. In any event the following works for me:

Dim oFilePropReader As New DSOleFile.PropertyReader()
Dim oFileProperties As Object

oFileProperties = oFilePropReader.GetDocumentProperties("e:\My Documents\Product Rec
Guidelines.doc")
Console.WriteLine(oFileProperties.Title)
Console.WriteLine(oFileProperties.Author())
Console.WriteLine(oFileProperties.Comments)

oFileProperties = Nothing
oFilePropReader = Nothing

¤
¤ Also - Why isn''t the functionality of DSOFile built into the System.IO class????

Don''t know. I suppose they could have added an interface for structured storage files.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


我试过了,我仍然得到同样的错误。我甚至尝试将dsofile.dll

复制到bin文件夹但没有运气。还有其他不同之处吗?


这是完整的文件:


<%@ Page Language =" VB"调试= QUOT;真" Trace =" false"%>


<%@ import namespace =" System" %>


<%@ import namespace =" System.IO" %>


< html>


< head>


< meta名称= QUOT;发电机" Content =" Microsoft Visual Studio.NET 7.0>


< / head>


< body>


<%


Dim oFilePropReader作为新的DSOleFile.PropertyReader()


Dim oFileProperties As Object


oFileProperties =

oFilePropReader.GetDocumentProperties(" C:\ DATA \ G20 \ ServerOptions1.ppt")


Response.write("< table>& vbCRLF)

Response.write("< tr>< td>< B>标题:< / B>< / td>< td>"& oFileProperties.Title&

"< / td>< / tr>"& vbCRLF )


Response.write("< tr>< td>< B>作者:< / B>< / td>< td>"& ; oFileProperties.Author

&"< / td>< / tr>"& vbCRLF)

Response.write(" < tr>< td>< B>应用程序:< / B>< / td >< TD>" &

oFileProperties.AppName& "< / TD>< / TR>" &安培; vbCRLF)


Response.write("< / table>"& vbCRLF)

oFileProperties = Nothing


oFilePropReader = Nothing


%>


< / body>

< / html>


柯蒂斯


" Paul Clement" < US ******** @ swspectrum.com>在消息中写道

news:sa ******************************** @ 4ax.com ...
I tried that and I still get the same error. I even tried coping dsofile.dll
to the bin folder but with no luck. Can something else be different??

Here is the complete file:

<%@ Page Language="VB" Debug="true" Trace = "false"%>

<%@ import namespace="System" %>

<%@ import namespace="System.IO" %>

<html>

<head>

<meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">

</head>

<body>

<%

Dim oFilePropReader As New DSOleFile.PropertyReader()

Dim oFileProperties As Object

oFileProperties =
oFilePropReader.GetDocumentProperties("C:\DATA\G20 \ServerOptions1.ppt")

Response.write ("<table>" & vbCRLF)

Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title &
"</td></tr>" & vbCRLF)

Response.write ("<tr><td><B>Author: </B></td><td>" & oFileProperties.Author
& "</td></tr>" & vbCRLF)

Response.write ("<tr><td><B>Application: </B></td><td>" &
oFileProperties.AppName & "</td></tr>" & vbCRLF)

Response.write ("</table>" & vbCRLF)

oFileProperties = Nothing

oFilePropReader = Nothing

%>

</body>

</html>

Curtis

"Paul Clement" <Us***********************@swspectrum.com> wrote in message
news:sa********************************@4ax.com...
2003年9月26日星期五14:37:03 -0400,Curtis Tammany <克拉****** @ egginc.com>
写道:
¤您好 -
¤
¤有人能告诉我是否可以在ASP.NET中访问DSOFile.dll吗?
¤
¤DSOFile .dll已注册,我在.ASP
脚本中使用它没有问题。我尝试了以下内容:¤
¤DimoFilePropReader作为DSOleFile.PropertyReader
¤DimoFileProperties As
oFilePropReader.GetDocumentProperties(" C:\ MyDoc.do c")¤Response.write (< table>& vbCRLF)
¤Response.write("< tr>< td>< B> Title:< / B>< / td>< td> &&;
oFileProperties.Title&"< / td>< / tr>"& vbCRLF)¤。
¤。
¤Response.write( "< / table>"& vbCRLF)
¤
¤我得到的是Type''DSOleFile.PropertyReader''未定义。

你没有'没有实例化你的任何对象。无论如何,以下
对我有用:
Dim oFilePropReader作为新的DSOleFile.PropertyReader()
将oFileProperties作为对象调整

oFileProperties = oFilePropReader.GetDocumentProperties(" e:\ My
Documents\Product Rec Guidelines.doc")
Console.WriteLine(oFileProperties.Title)
Console.WriteLine(oFileProperties.Author())
控制台.WriteLine(oFileProperties.Comments)

oFileProperties = Nothing
oFilePropReader = Nothing

¤
¤另外 - 为什么不是DSOFile的功能内置于System.IO
类????
不知道。我想他们可以为结构化的
存储文件添加一个界面。

保罗~~~ pc ******@ameritech.net
Microsoft MVP(Visual Basic)
On Fri, 26 Sep 2003 14:37:03 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:
¤ Hello-
¤
¤ Can someone tell me if DSOFile.dll can be accessed within ASP.NET?
¤
¤ DSOFile.dll is registered and I have no problem using it in my .ASP scripts. I have tried the following: ¤
¤ Dim oFilePropReader As DSOleFile.PropertyReader
¤ Dim oFileProperties As oFilePropReader.GetDocumentProperties("C:\MyDoc.do c") ¤ Response.write ("<table>" & vbCRLF)
¤ Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title & "</td></tr>" & vbCRLF) ¤ .
¤ .
¤ Response.write ("</table>" & vbCRLF)
¤
¤ All I get is Type ''DSOleFile.PropertyReader'' is not defined.

You haven''t instantiated any of your objects. In any event the following works for me:
Dim oFilePropReader As New DSOleFile.PropertyReader()
Dim oFileProperties As Object

oFileProperties = oFilePropReader.GetDocumentProperties("e:\My Documents\Product Rec Guidelines.doc")
Console.WriteLine(oFileProperties.Title)
Console.WriteLine(oFileProperties.Author())
Console.WriteLine(oFileProperties.Comments)

oFileProperties = Nothing
oFilePropReader = Nothing

¤
¤ Also - Why isn''t the functionality of DSOFile built into the System.IO class????
Don''t know. I suppose they could have added an interface for structured storage files.

Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)



2003年9月29日星期一11 :30:24-0400,Curtis Tammany <克拉****** @ egginc.com>写道:

$ b $b¤我试过了,我仍然得到同样的错误。我甚至尝试将dsofile.dll
$ b $b¤复制到bin文件夹但没有运气。还有别的吗?
$ b $b¤
$ b $b¤这是完整的文件:
$ b $b¤
$ b $b¤< ;%@ Page Language =" VB"调试= QUOT;真" Trace =" false"%>
$ b $b¤
$ b $b¤<%@ import namespace =" System" %>
$ b $b¤
$ b $b¤<%@ import namespace =" System.IO" %>
$ b $b¤
$ b $b¤< html>
$ b $b¤
$ b $b¤< head>
$ b $b¤
$ b $b¤< meta name =" GENERATOR" Content =" Microsoft Visual Studio.NET 7.0>
$ b $b¤
$ b $b¤< / head>
$ b $b¤
$ b $b¤< body>
$ b $b¤
$ b $b¤<%
$ b $b¤
$ b $b¤DimoFilePropReader作为新的DSOleFile.PropertyReader()
$ b $b¤
$ b $b¤DimoFileProperties As Object
$ b $b¤
$ b $b¤oFileProperties=
$ b $b¤oFilePropReader.GetDocumentProperties(" C:\ DATA \ G20 \ ServerOptions1.ppt")
$ b $b¤
$ b $b¤Response.write (< table>& vbCRLF)
$ b $b¤
$ b $b¤Response.write("< tr>< td>< B> Title :< / B>< / td>< td>"& oFileProperties.Title&
$ b $b¤"< / td>< / tr>"& vbCRLF )
$ b $b¤
$ b $b¤Response.write("< tr>< td>< B>作者:< / B>< / td>< ; td>"& oFileProperties.Author
$ b $b¤&"< / td>< / tr>"& vbCRLF)
$ b $b¤
$ b $b¤Response.write("< tr>< td>< B>应用程序:< / B>< / td>< td> ;" &
$ b $b¤oFileProperties.AppName& "< / TD>< / TR>" &安培; vbCRLF)
$ b $b¤
$ b $b¤Response.write("< / table>& vbCRLF)
$ b $b¤
$ b $b¤oFileProperties= Nothing
$ b $b¤
$ b $b¤oFilePropReader= Nothing
$ b $b¤
$ b $b¤%>
$ b $b¤
$ b $b¤< / body>
$ b $b¤
$ b $b¤< / html>
$ b $b¤


您是否使用Regsvr32.exe或其他实用程序注册了DSOFile.dll?这是一个基于COM的组件,需要先注册
才能使用它。

保罗~~~ pc ****** @ ameritech.net

Microsoft MVP(Visual Basic)
On Mon, 29 Sep 2003 11:30:24 -0400, "Curtis Tammany" <ct******@egginc.com> wrote:

¤ I tried that and I still get the same error. I even tried coping dsofile.dll
¤ to the bin folder but with no luck. Can something else be different??
¤
¤ Here is the complete file:
¤
¤ <%@ Page Language="VB" Debug="true" Trace = "false"%>
¤
¤ <%@ import namespace="System" %>
¤
¤ <%@ import namespace="System.IO" %>
¤
¤ <html>
¤
¤ <head>
¤
¤ <meta name="GENERATOR" Content="Microsoft Visual Studio.NET 7.0">
¤
¤ </head>
¤
¤ <body>
¤
¤ <%
¤
¤ Dim oFilePropReader As New DSOleFile.PropertyReader()
¤
¤ Dim oFileProperties As Object
¤
¤ oFileProperties =
¤ oFilePropReader.GetDocumentProperties("C:\DATA\G20 \ServerOptions1.ppt")
¤
¤ Response.write ("<table>" & vbCRLF)
¤
¤ Response.write ("<tr><td><B>Title: </B></td><td>" & oFileProperties.Title &
¤ "</td></tr>" & vbCRLF)
¤
¤ Response.write ("<tr><td><B>Author: </B></td><td>" & oFileProperties.Author
¤ & "</td></tr>" & vbCRLF)
¤
¤ Response.write ("<tr><td><B>Application: </B></td><td>" &
¤ oFileProperties.AppName & "</td></tr>" & vbCRLF)
¤
¤ Response.write ("</table>" & vbCRLF)
¤
¤ oFileProperties = Nothing
¤
¤ oFilePropReader = Nothing
¤
¤ %>
¤
¤ </body>
¤
¤ </html>
¤

Did you register DSOFile.dll using Regsvr32.exe or another utility? It is a COM-based component and
needs to be registered before you can use it.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)


这篇关于在ASP.Net中使用DSOFile ???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆