Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / operating-systems / Windows

64 Bit Application Cannot Use DSOfile

4.75/5 (6 votes)
16 Aug 2016CPOL 34.1K   2.5K  
DSOfile in 64 bit version

Introduction

64 bit application cannot use DSOfile. So I have compiled DSOfile to x64 version and it can be used now in 64 bit application.

Background

The original DSOfile can be download from here.

Using the Code

  1. Download zip file (64.2 KB)
  2. Unzip the file.
  3. Run as Administrator Install.bat.
    The script will copy dsofile_x64.dll to %WINDIR%\SysWOW64 and will register it.
  4. Add reference to your project: "DSO OLE Document Properties Reader 2.1"

VBA example of using DSOfile:

VB.NET
Private Function fnFileTitle(ByVal strFileName As String) As String
On Error GoTo OnError
   Dim oOleDocProp
   'Set oOleDocProp = New DSOFile.OleDocumentProperties 
   Set oOleDocProp = CreateObject("DSOFile.OleDocumentProperties")

   oOleDocProp.Open (strFileName)
   fnFileTitle  = oOleDocProp.SummaryProperties.Title
   oOleDocProp.Close
    
   If Not oOleDocProp Is Nothing Then Set oOleDocProp = Nothing

Exit Function
OnError:
    MsgBox Err.Number & " - " & Err.Description
    Resume Next
End Function

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)