A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Crash in GetMAPIOBJECT + Outlook 2007



 
 
Thread Tools Search this Thread Display Modes
  #11  
Old June 15th 06, 12:06 PM posted to microsoft.public.outlook.program_addins
pete_42
external usenet poster
 
Posts: 9
Default Crash in GetMAPIOBJECT + Outlook 2007

Dmitry Streblechenko wrote:
I have never seen or heard about such a problem with MailItem.Save.
I strongly suspect that something happens in your code :-)


I know, it sounds very suspicious. (For me, too ;-) But now, when I
Save an Item that has not been saved previously I call ActiveWindow()
and GetCurrentItem() again (basically re-getting the pointer) and it
works. I've removed the QueryInterface-Call to the GetCurrentItem()
result, so there shouldn't be memory leaks.

Don't ask me why, but it works.

Dmitry, thanks a lot for all your help and comments!

Ads
  #12  
Old June 15th 06, 07:08 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Crash in GetMAPIOBJECT + Outlook 2007

So you call Save on an item that is being displayed?
Can you check the evalue of MailItem.Parent.Name before and after saving?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"pete_42" wrote in message
oups.com...
Dmitry Streblechenko wrote:
I have never seen or heard about such a problem with MailItem.Save.
I strongly suspect that something happens in your code :-)


I know, it sounds very suspicious. (For me, too ;-) But now, when I
Save an Item that has not been saved previously I call ActiveWindow()
and GetCurrentItem() again (basically re-getting the pointer) and it
works. I've removed the QueryInterface-Call to the GetCurrentItem()
result, so there shouldn't be memory leaks.

Don't ask me why, but it works.

Dmitry, thanks a lot for all your help and comments!



  #13  
Old June 15th 06, 10:44 PM posted to microsoft.public.outlook.program_addins
pete_42
external usenet poster
 
Posts: 9
Default Crash in GetMAPIOBJECT + Outlook 2007

Dmitry Streblechenko wrote:
So you call Save on an item that is being displayed?

Yes. Because I want it to have an PR_ENTRYID member.

Can you check the evalue of MailItem.Parent.Name before and after saving?

Didn't try that. But if you're really interested, I can do that.

My impression is that the Save() Call to an unsaved message makes the
MailItem-Pointer invalid (under Outlook 2007). Perhaps the item is
somehow moved/converted/copied, because I think the Problem occurs only
for a Save() call on an unsaved item. Because even Release() failed (on
the copy that I got with QueryInterface) I doubt that any other call
would succeed.

  #14  
Old June 16th 06, 01:35 PM posted to microsoft.public.outlook.program_addins
pete_42
external usenet poster
 
Posts: 9
Default Crash in GetMAPIOBJECT + Outlook 2007

Dmitry, did you notice that the tooltip for the OutlookSpy button
"Application" is multi-line for the main window, but not when the
button appears in a mail window?

Is that an Outlook 2007 bug?

Wouldn't be the only one. I've noticed that you don't get reasonable
values when you query a toolbar button's size or position...

  #15  
Old June 16th 06, 08:01 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Crash in GetMAPIOBJECT + Outlook 2007

It is an OutlookSpy bug :-)

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"pete_42" wrote in message
oups.com...
Dmitry, did you notice that the tooltip for the OutlookSpy button
"Application" is multi-line for the main window, but not when the
button appears in a mail window?

Is that an Outlook 2007 bug?

Wouldn't be the only one. I've noticed that you don't get reasonable
values when you query a toolbar button's size or position...



  #16  
Old June 19th 06, 09:37 AM posted to microsoft.public.outlook.program_addins
pete_42
external usenet poster
 
Posts: 9
Default Crash in GetMAPIOBJECT + Outlook 2007

Dmitry Streblechenko wrote:
It is an OutlookSpy bug :-)


How do you fix that? (I'm having the same problem... ;-)

  #17  
Old June 19th 06, 07:26 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Crash in GetMAPIOBJECT + Outlook 2007

You need to include the carriage return (0xD, 0xA) in the string that you
assign to the CommandBarButton.ToolTipText property.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"pete_42" wrote in message
oups.com...
Dmitry Streblechenko wrote:
It is an OutlookSpy bug :-)


How do you fix that? (I'm having the same problem... ;-)



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I insert an address from Outlook 2007 into Word 2007? Ron Perry Outlook - Using Contacts 2 June 6th 06 04:24 AM
Replying to a message induces Outlok to crash - Outlook 2007 beta Ben Outlook - Installation 2 June 3rd 06 07:04 PM
Outlook crash with new MSN Messenger Dianne Outlook Express 0 May 15th 06 07:28 AM
Outlook Crash webmaster Outlook - General Queries 0 February 24th 06 06:12 PM
Outlook Crash on Close? Mahmoud Outlook - General Queries 1 January 31st 06 11:26 AM


All times are GMT +1. The time now is 11:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.