PC Review


Reply
Thread Tools Rate Thread

OpenSharedItem holds onto FileHandle

 
 
New Member
Join Date: Aug 2011
Posts: 1
 
      8th Aug 2011
Good Day,

Im working on a C# Addin application using the OL 2007 Interops.

What Im seeing is that using Msg Files with Digital Signatures attached (Encrypted messages included) that I am unable to release the File handle for that message and as a result unable to delete it or use it later.

This will however work for other files that do not have a Digital Signature or that are not encrypted. AKA the file handle will not be held.

It appears that OpenSharedItem call is behaving differently for msgs that contain digital signatures.

// Code Sample

outlookItem = OutlookApplication.Session.OpenSharedItem("c:\testMsg.msg");

System.Runtime.InteropServices.Marshal.ReleaseComObject(outlookItem);

outlookItem = null;
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();

Thanks in Advance for any help!

Cheers

Damon
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenSharedItem and .MSG files SeekerOfTruths Microsoft Outlook Program Addins 3 18th Dec 2008 04:12 PM
OpenSharedItem - Exception Andre Maas Microsoft Outlook Program Addins 2 10th Oct 2007 03:29 PM
PictureBox leaving filehandle open Jeff Williams Microsoft C# .NET 1 26th Mar 2007 03:58 PM
explorer holds onto deleted files =?Utf-8?B?TWF0dA==?= Windows XP General 5 25th Jan 2005 11:45 AM
My outbox always holds onto one message =?Utf-8?B?QW5keUNhcA==?= Microsoft Outlook Discussion 0 27th Dec 2004 03:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:41 AM.