Hi everybody.
I try to build some Outlook 2000 / XP Addin,
It works fine with the XP version, but with OL 2k, nothing to do, it never
quits outlook (i can see it in the process list) I read in a microsoft
article that this could happen when all the Com_object instances are not set
to null. This is what i have done ((or seems to)) but it doesn't quit too.
So my questions are following :
1 . is there a way to see in one round alla the instances of the com_objects
2. is there something special to do with OL 2K to make it quit.
I hope smone will be able to help Me !!!
Thanks a lot even if you spent a bit of time reading this post and doesn't
have the answer
Pascal
her's mys code :
try
{
System.Runtime. InteropServices .Marshal.Releas eComObject(this .email_envoye);
}
catch(Exception ex)
{
//System.Windows. Forms.MessageBo x.Show(ex.ToStr ing());
}
try
{
System.Runtime. InteropServices .Marshal.Releas eComObject(this .email_recu);
}
catch(Exception ex)
{
//System.Windows. Forms.MessageBo x.Show(ex.ToStr ing());
}
try
{
System.Runtime. InteropServices .Marshal.Releas eComObject(this .emails_envoyes )
;
}
catch(Exception ex)
{
//System.Windows. Forms.MessageBo x.Show(ex.ToStr ing());
}
try
{
System.Runtime. InteropServices .Marshal.Releas eComObject(this .emails_recus);
}
catch(Exception ex)
{
//System.Windows. Forms.MessageBo x.Show(ex.ToStr ing());
}
try
{
this.espace = null;
System.Runtime. InteropServices .Marshal.Releas eComObject(this .espace);
}
catch(Exception ex)
{
//System.Windows. Forms.MessageBo x.Show(ex.ToStr ing());
}
try
{
System.Runtime. InteropServices .Marshal.Releas eComObject(this .inboxFolder);
}
catch(Exception ex)
{
//System.Windows. Forms.MessageBo x.Show(ex.ToStr ing());
}
try
{
System.Runtime. InteropServices .Marshal.Releas eComObject(this .outboxFolder);
}
catch(Exception ex)
{
//System.Windows. Forms.MessageBo x.Show(ex.ToStr ing());
}
this.email_envo ye = null;
this.email_recu = null;
this.emails_env oyes = null;
this.emails_rec us = null;
this.espace = null;
this.inboxFolde r = null;
this.outboxFold er = null;
this.addInInsta nce = null;
if(disconnectMo de != Extensibility.e xt_DisconnectMo de.ext_dm_HostS hutdown)
{
OnBeginShutdown (ref custom);
}
app = null;
try
{
this.app.Quit() ;
}
catch(Exception ex)
{
//System.Windows. Forms.MessageBo x.Show(ex.ToStr ing());
} 1 2454
palouf,
Have you looked over this site? http://www.microeye.com/resources/res_outlookvsnet.htm
It lists a number of resources available when using Outlook with .NET.
I've been reading ".NET and COM - The Complete Interoperabilit y Guide" by
Adam Nathan from SAMS. Two things he stated that makes sense.
1. ReleaseComObjec t items in the correct order, release child objects,
before you release parent objects.
2. Marshal.Release ComObject may actually need to be called multiple times,
He suggests calling Marshal.Release ComObject multiple times until it returns
zero.
Hope this helps
Jay
"palouf" <pa*****@hotmai l.com> wrote in message
news:OB******** ******@TK2MSFTN GP09.phx.gbl... Hi everybody. I try to build some Outlook 2000 / XP Addin, It works fine with the XP version, but with OL 2k, nothing to do, it never quits outlook (i can see it in the process list) I read in a microsoft article that this could happen when all the Com_object instances are not
set to null. This is what i have done ((or seems to)) but it doesn't quit too. So my questions are following : 1 . is there a way to see in one round alla the instances of the
com_objects 2. is there something special to do with OL 2K to make it quit.
I hope smone will be able to help Me !!! Thanks a lot even if you spent a bit of time reading this post and doesn't have the answer Pascal
her's mys code : try {
System.Runtime. InteropServices .Marshal.Releas eComObject(this .email_envoye); } catch(Exception ex) { //System.Windows. Forms.MessageBo x.Show(ex.ToStr ing()); } try { System.Runtime. InteropServices .Marshal.Releas eComObject(this .email_recu); } catch(Exception ex) { //System.Windows. Forms.MessageBo x.Show(ex.ToStr ing()); } try {
System.Runtime. InteropServices .Marshal.Releas eComObject(this .emails_envoyes ) ; } catch(Exception ex) { //System.Windows. Forms.MessageBo x.Show(ex.ToStr ing()); } try {
System.Runtime. InteropServices .Marshal.Releas eComObject(this .emails_recus); } catch(Exception ex) { //System.Windows. Forms.MessageBo x.Show(ex.ToStr ing()); } try { this.espace = null; System.Runtime. InteropServices .Marshal.Releas eComObject(this .espace); } catch(Exception ex) { //System.Windows. Forms.MessageBo x.Show(ex.ToStr ing()); } try { System.Runtime. InteropServices .Marshal.Releas eComObject(this .inboxFolder); } catch(Exception ex) { //System.Windows. Forms.MessageBo x.Show(ex.ToStr ing()); } try {
System.Runtime. InteropServices .Marshal.Releas eComObject(this .outboxFolder); } catch(Exception ex) { //System.Windows. Forms.MessageBo x.Show(ex.ToStr ing()); } this.email_envo ye = null; this.email_recu = null; this.emails_env oyes = null; this.emails_rec us = null; this.espace = null; this.inboxFolde r = null; this.outboxFold er = null; this.addInInsta nce = null;
if(disconnectMo de != Extensibility.e xt_DisconnectMo de.ext_dm_HostS hutdown) { OnBeginShutdown (ref custom); } app = null; try { this.app.Quit() ; } catch(Exception ex) { //System.Windows. Forms.MessageBo x.Show(ex.ToStr ing()); }
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Fritz Switzer |
last post by:
Can anyone provide a small snippet in C# that pulls out the Contacts in
Outlook XP.
I've seen a couple of examples in C++ and VB in previous newsgroup posts,
but either the originals didn't work or my conversion skills are weak. And
if I have to use tlbimp.exe what is the right file to use.
Thanks for the help.
--
Fritz
|
by: Kurt |
last post by:
Hi
We are developing an off-the-shelf software suite for a certain business sector. Most of the program is simply a GUI on top of some .mdb files. Its a .net application written in c#
One major requirement is "Outlook Integration". The Outlook contact folders are to be used for contact management
I want to know what is the standard way to do this these days. Most of the information in MSDN seems rather old
I first used the Outlook...
|
by: Nathan Carroll |
last post by:
Why am I able to use this in Outlook and not do the same from .Net.
My problems centers around the Items in the xp version of below i used the
interop references. Does something similar exist for 2000?
'this works fine in ol 2000
Dim item As Object
Dim items As Outlook.items
Dim itemcount As Integer
Dim subfolder As MAPIFolder
Dim mi As MailItem
|
by: John |
last post by:
Hi
When I open a new outlook email from vb.net, sometimes outlook is very slow
to appear or occasionally outlook freezes completely. I am targeting mixed
office2000/xp environments so I am using the office2000 interop dlls
generated by vs.net by adding office 2000 com reference.
Any one else noticed this problem when targeting office2000/xp mixed
environments? Is there a better, more robust way to do this? Am I better off
using late...
|
by: John |
last post by:
Hi
I am using outlook to display and send new mail message from within vb.net.
What is the correct way to close outlook after I am done? If I use
outlookapp.quit then any running outlook copy also closes which is
inconvenient for user. If I use outlookapp = nothing then strange things
happen afterwards, such as the mail message not being sent when pressing
Send button. Is there a way to close only the instance of outlook that was
opened...
| |
by: msnnews.msn.com |
last post by:
hi there,
i've got a form that populates a datagrid, and a button that calls a
function to export to an excel file.
All is well with the export, no errors are returned, but the Excel instance
doesnt want to terminate properly even when i set excelApp.Quit, and
excelApp = nothing.
has anyone else experienced a problem like this???
code below:
|
by: wizzbangca |
last post by:
Hi everyone. Having problems with a utility I am writing for work.
The previous IT Director thoughtfully allowed 3 (2000, xp, 2003)
versions of outlook to be installed rather than 1. Now I need the
utility to work for all 3 versions. A previous post suggested
creating objects to detect the version of outlook, which I tried with
success. But, that's as far as I can get. No one out there shows how
to go beyond version detection to...
|
by: andyoye |
last post by:
How can I launch Outlook on users machines when they click a button on a web
form (InfoPath)?
Thanks
|
by: 1andy1 |
last post by:
Hello,
I have a following problem.
Development environment Windows XP, VS 2008, Outlook 2003.
Deployment environment Small bussiness server, Outlook 2000.
I have created a small VB .Net program which forwards emails using Outlook application. This program is called from MS-SQL every 2 min.
At the end of the program I close all the resources, but Outlook.exe process is still displayed in the Task manager.
Here is the code I use for...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |