¤
¤ ¤ > On Wed, 1 Oct 2003 17:26:09 -0400, "Curtis Tammany" <
[email protected]>
¤ 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 ~~~ (e-mail address removed)
¤ > ¤ > Microsoft MVP (Visual Basic)
¤ > ¤
¤ > ¤ DSOFile.dll was registered with regsvr32. I have been using it in my ASP
¤ > ¤ pages without any problems...
¤ > ¤ For .NET, would DSOFile.dll also need to be located in the BIN folder of
¤ my
¤ > ¤ web app?
¤ >
¤ > No location shouldn't matter as long as it is registered, but I think you
¤ might need the interop
¤ > assembly that was created for it (Interop.DSOleFile) when you distribute
¤ the application. Are you
¤ > having this problem on your development machine or your web server? I'm
¤ assuming you added it as a
¤ > COM reference in your project?
¤ >
¤ >
¤ > Paul ~~~ (e-mail address removed)
¤ > Microsoft MVP (Visual Basic)
¤
¤ Right now it is only on my development machine. I haven't created a project-
¤ just that aspx file above. Do I have to make a project just to get this to
¤ work??
You don't have to create a project but then you will need to late bind on the DSOFile objects:
'Declare as late bound object
Dim FilePropReader As Object
Dim FileProperties As Object
'Create instance of late bound object
FilePropReader = CreateObject("DSOleFile.PropertyReader")
FileProperties = FilePropReader.GetDocumentProperties("e:\My Documents\Product Rec
Guidelines.doc")
Console.WriteLine(FileProperties.Title)
Console.WriteLine(FileProperties.Author())
Console.WriteLine(FileProperties.Comments)
FileProperties = Nothing
FilePropReader = Nothing
Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)