473,397 Members | 2,116 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

DSOFILE and Interop Issues

Hi All:

I need some help. I am using DSOFile.exe to examine and add and/or
manipulate some document and custom properties on a JPEG file. When the
document properties are correct, I would like to copy or move the modified
file to a new location. The problem that I am having is that the modified
file is somehow being held in memory and not being released. I use the
following code to read in the file:

Try
oFilePropReader = New DSOleFile.PropertyReader
oDocProp = oFilePropReader.GetDocumentProperties(txt_FileLoc. Text)
Try
If Not oDocProp.AppName.ToString Is Nothing Then
lstNormalProps.Items.Add("AppName: " & oDocProp.AppName.ToString)
Catch ex As Exception
Err.Clear()
End Try
.........
Catch ex As Exception
MsgBox(ex.Message & " Please choose another file.", Page)
Err.Clear()
End Try

This part all works fine... then to release the file from memory I use the
following code...

If Not oDocProp Is Nothing Then
System.Runtime.InteropServices.Marshal.ReleaseComO bject(oDocProp)
oDocProp = Nothing
GC.Collect()
End If
If Not oFilePropReader Is Nothing Then
System.Runtime.InteropServices.Marshal.ReleaseComO bject(oFilePropReader)
oFilePropReader = Nothing
GC.Collect()
End If

So far...so good.. the file is released from memory and I can move or copy
it with no problem... Where the problem exists is when I review the
CustomDocumentProperties...using the following code...

Try
oFilePropReader = New DSOleFile.PropertyReader
oDocProp = oFilePropReader.GetDocumentProperties(txt_FileLoc. Text)
Try
If Not oDocProp.AppName.ToString Is Nothing Then
lstNormalProps.Items.Add("AppName: " & oDocProp.AppName.ToString)
Catch ex As Exception
Err.Clear()
End Try
.........
For Each oCustProp In oDocProp.CustomProperties
sTmp = oCustProp.Name & ": " & CStr(oCustProp.Value)
lstNormalProps.Items.Add("Custom Property: " & sTmp)
Next
Catch ex As Exception
MsgBox(ex.Message & " Please choose another file.", Page)
Err.Clear()
End Try

Then nothing I have done seems to get the file to be released... Does anyone
have any suggestions...or ideas ... or code snippets??? Thank you for your
timely advice.
--

Best regards

Paul Perot
President
Perot Solutions
Pa*******@PerotSolutions.com
(770) 565 - 9151
(678) 852 - 7789 (c)
Nov 18 '05 #1
0 1132

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: | last post by:
I am using Microsoft's dsofile (http://support.microsoft.com/support/kb/articles/Q224/3/51.asp) in an ASP to update a set of custom properties in a Word document. The document properties are always...
14
by: Curtis Tammany | last post by:
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...
0
by: Nautilus | last post by:
I am writing an application in ASP.Net which generates a list of files from a shared network folder using DirectoryInfo class and then I use the wonderful control, <a...
0
by: Curtis Tammany | last post by:
To Microsoft: For the next release of .NET framework, can you please include the functionality of DSOFile.dll??? Trying to implement DSOFile in .NET and get all the extended properties...
3
by: Bill Alexander | last post by:
I'm having trouble with updating general fields (Title, Autor Suject, etc.) in the summary of documents located on our Intranet. I've downloaded the FilePropDemoVB7 example...
4
by: Paul Bromley | last post by:
I have been pondering over this one all night!! I want to read the properties of a Word document WITHOUT opening it - notably the title document. Having read the newsgroups it seems that I neede to...
0
by: aschurg | last post by:
This post is in regard to archived discussion: http://www.thescripts.com/forum/thread103110.html Here is important information about dsofile.dll from an ASP.NET 2.0 application with regard to...
2
by: sanjay1983 | last post by:
Hi Everyone, I am stuck to access file properties using 'Interop.dsofile.dll'. I dont want registration of this assembly in system registry. I am using reflection to achive this, but at the time...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.