msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OnConnection

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Programs Add-Ins
Author Message
MON205



Joined: 13 Aug 2007
Posts: 3

PostPosted: Sun Sep 02, 2007 10:56 am    Post subject: OnConnection Reply with quote

Hello,
I have a problem with my add-in, that some simple OOM or MAPI functions fail
in the context of the OnConnection event - my add-in inherited from the
_IDTExtensibility2.
As an example, the GetFolderFromID() function throws a_com_error exception
with unknown error( 0x96a40107 ). This occur with some folders in a PST.
Other folders and other PSTs don't have this problem.
The same function succeeded when I call it with the same EntryID & StoreID
but after leaving the context of the OnConnection event.
Now, simply, the question is, does all the PSTs loaded completely before
linking (calling OnConnection)with the add-ins?!!!

Archived from group: microsoft>public>outlook>program_addins
Back to top
View user's profile Send private message
Dmitry Streblechenko



Joined: 12 Aug 2007
Posts: 220

PostPosted: Mon Sep 03, 2007 7:37 pm    Post subject: Re: OnConnection Reply with quote

Use OnStartupComplete callback instead - by the time it is executed, Outlook
already has a valid MAPI session.

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

"MON205" wrote in message @microsoft.com...
> Hello,
> I have a problem with my add-in, that some simple OOM or MAPI functions
> fail
> in the context of the OnConnection event - my add-in inherited from the
> _IDTExtensibility2.
> As an example, the GetFolderFromID() function throws a_com_error exception
> with unknown error( 0x96a40107 ). This occur with some folders in a PST.
> Other folders and other PSTs don't have this problem.
> The same function succeeded when I call it with the same EntryID & StoreID
> but after leaving the context of the OnConnection event.
> Now, simply, the question is, does all the PSTs loaded completely before
> linking (calling OnConnection)with the add-ins?!!!
Back to top
View user's profile Send private message
MON205



Joined: 13 Aug 2007
Posts: 3

PostPosted: Tue Sep 04, 2007 4:30 am    Post subject: Re: OnConnection Reply with quote

Hello Dmitry,
I tried it and unfortunately it didn't work!!!
I think that my MAPI session already valid... The problem doesn't exist with
the two default PSTs (Personal&Archive).. but it is valid with another PST
that I added to the outlook... when I call the GetFolderFromID for any folder
it it within the OnConnection or OnStartupComplete; the exception triggered.
But when I call the GetFolderFromID of the same parameters within a call to a
button I added to the Outlook toolbar, the function succeedeed.
I think that this is one of many of the strange behaviors of the Outlook.

Thanks.

"Dmitry Streblechenko" wrote:

> Use OnStartupComplete callback instead - by the time it is executed, Outlook
> already has a valid MAPI session.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "MON205" wrote in message
> @microsoft.com...
> > Hello,
> > I have a problem with my add-in, that some simple OOM or MAPI functions
> > fail
> > in the context of the OnConnection event - my add-in inherited from the
> > _IDTExtensibility2.
> > As an example, the GetFolderFromID() function throws a_com_error exception
> > with unknown error( 0x96a40107 ). This occur with some folders in a PST.
> > Other folders and other PSTs don't have this problem.
> > The same function succeeded when I call it with the same EntryID & StoreID
> > but after leaving the context of the OnConnection event.
> > Now, simply, the question is, does all the PSTs loaded completely before
> > linking (calling OnConnection)with the add-ins?!!!
>
>
>
Back to top
View user's profile Send private message
Dmitry Streblechenko



Joined: 12 Aug 2007
Posts: 220

PostPosted: Tue Sep 04, 2007 1:43 pm    Post subject: Re: OnConnection Reply with quote

Do you specify *both* the folder and the store entry ids when calling
GetFolderFromID?

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

"MON205" wrote in message @microsoft.com...
> Hello Dmitry,
> I tried it and unfortunately it didn't work!!!
> I think that my MAPI session already valid... The problem doesn't exist
> with
> the two default PSTs (Personal&Archive).. but it is valid with another PST
> that I added to the outlook... when I call the GetFolderFromID for any
> folder
> it it within the OnConnection or OnStartupComplete; the exception
> triggered.
> But when I call the GetFolderFromID of the same parameters within a call
> to a
> button I added to the Outlook toolbar, the function succeedeed.
> I think that this is one of many of the strange behaviors of the Outlook.
>
> Thanks.
>
> "Dmitry Streblechenko" wrote:
>
>> Use OnStartupComplete callback instead - by the time it is executed,
>> Outlook
>> already has a valid MAPI session.
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "MON205" wrote in message
>> @microsoft.com...
>> > Hello,
>> > I have a problem with my add-in, that some simple OOM or MAPI functions
>> > fail
>> > in the context of the OnConnection event - my add-in inherited from the
>> > _IDTExtensibility2.
>> > As an example, the GetFolderFromID() function throws a_com_error
>> > exception
>> > with unknown error( 0x96a40107 ). This occur with some folders in a
>> > PST.
>> > Other folders and other PSTs don't have this problem.
>> > The same function succeeded when I call it with the same EntryID &
>> > StoreID
>> > but after leaving the context of the OnConnection event.
>> > Now, simply, the question is, does all the PSTs loaded completely
>> > before
>> > linking (calling OnConnection)with the add-ins?!!!
>>
>>
>>
Back to top
View user's profile Send private message
MON205



Joined: 13 Aug 2007
Posts: 3

PostPosted: Wed Sep 05, 2007 3:36 am    Post subject: Re: OnConnection Reply with quote

I always do that!!!

"Dmitry Streblechenko" wrote:

> Do you specify *both* the folder and the store entry ids when calling
> GetFolderFromID?
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "MON205" wrote in message
> @microsoft.com...
> > Hello Dmitry,
> > I tried it and unfortunately it didn't work!!!
> > I think that my MAPI session already valid... The problem doesn't exist
> > with
> > the two default PSTs (Personal&Archive).. but it is valid with another PST
> > that I added to the outlook... when I call the GetFolderFromID for any
> > folder
> > it it within the OnConnection or OnStartupComplete; the exception
> > triggered.
> > But when I call the GetFolderFromID of the same parameters within a call
> > to a
> > button I added to the Outlook toolbar, the function succeedeed.
> > I think that this is one of many of the strange behaviors of the Outlook.
> >
> > Thanks.
> >
> > "Dmitry Streblechenko" wrote:
> >
> >> Use OnStartupComplete callback instead - by the time it is executed,
> >> Outlook
> >> already has a valid MAPI session.
> >>
> >> Dmitry Streblechenko (MVP)
> >> http://www.dimastr.com/
> >> OutlookSpy - Outlook, CDO
> >> and MAPI Developer Tool
> >>
> >> "MON205" wrote in message
> >> @microsoft.com...
> >> > Hello,
> >> > I have a problem with my add-in, that some simple OOM or MAPI functions
> >> > fail
> >> > in the context of the OnConnection event - my add-in inherited from the
> >> > _IDTExtensibility2.
> >> > As an example, the GetFolderFromID() function throws a_com_error
> >> > exception
> >> > with unknown error( 0x96a40107 ). This occur with some folders in a
> >> > PST.
> >> > Other folders and other PSTs don't have this problem.
> >> > The same function succeeded when I call it with the same EntryID &
> >> > StoreID
> >> > but after leaving the context of the OnConnection event.
> >> > Now, simply, the question is, does all the PSTs loaded completely
> >> > before
> >> > linking (calling OnConnection)with the add-ins?!!!
> >>
> >>
> >>
>
>
>
Back to top
View user's profile Send private message
Dmitry Streblechenko



Joined: 12 Aug 2007
Posts: 220

PostPosted: Wed Sep 05, 2007 6:21 pm    Post subject: Re: OnConnection Reply with quote

The error looks like MAPI_E_INVALID_ENTRYID. Are you absolutely, 100%, sure
that the entry ids belong to a store that exists in the current session?
Where do these values come from?

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

"MON205" wrote in message @microsoft.com...
>I always do that!!!
>
> "Dmitry Streblechenko" wrote:
>
>> Do you specify *both* the folder and the store entry ids when calling
>> GetFolderFromID?
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
Back to top
View user's profile Send private message
MON205



Joined: 28 Sep 2007
Posts: 3

PostPosted: Thu Sep 06, 2007 4:36 am    Post subject: Re: OnConnection Reply with quote

I'm shocked just like you...
Yes 100%... I'm getting the StoreID and EntryID by looping for all PSTs and
sub folders. And to be sure, I copied the StoreID and EntryID from the
Outlook Spy -GREAT PRODUCT- and used them as constants(GetFolderFromID(
"xxx", "xxxxxx"), and the same error exist with this strange PST when calling
from OnConnection or OnStartupComp. And I used the same call to
GetFolderFromID in a handler for a button, and it succeeded.

"Dmitry Streblechenko" wrote:

> The error looks like MAPI_E_INVALID_ENTRYID. Are you absolutely, 100%, sure
> that the entry ids belong to a store that exists in the current session?
> Where do these values come from?
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "MON205" wrote in message
> @microsoft.com...
> >I always do that!!!
> >
> > "Dmitry Streblechenko" wrote:
> >
> >> Do you specify *both* the folder and the store entry ids when calling
> >> GetFolderFromID?
> >>
> >> Dmitry Streblechenko (MVP)
> >> http://www.dimastr.com/
> >> OutlookSpy - Outlook, CDO
> >> and MAPI Developer Tool
> >>
>
>
>
Back to top
View user's profile Send private message
Dmitry Streblechenko



Joined: 12 Aug 2007
Posts: 220

PostPosted: Thu Sep 06, 2007 1:38 pm    Post subject: Re: OnConnection Reply with quote

So it only happens for one particular PST, not for any other PST or mailbox,
right?
Is there anything different about that PST?

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

"MON205" wrote in message @microsoft.com...
> I'm shocked just like you...
> Yes 100%... I'm getting the StoreID and EntryID by looping for all PSTs
> and
> sub folders. And to be sure, I copied the StoreID and EntryID from the
> Outlook Spy -GREAT PRODUCT- and used them as constants(GetFolderFromID(
> "xxx", "xxxxxx"), and the same error exist with this strange PST when
> calling
> from OnConnection or OnStartupComp. And I used the same call to
> GetFolderFromID in a handler for a button, and it succeeded.
>
> "Dmitry Streblechenko" wrote:
>
>> The error looks like MAPI_E_INVALID_ENTRYID. Are you absolutely, 100%,
>> sure
>> that the entry ids belong to a store that exists in the current session?
>> Where do these values come from?
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "MON205" wrote in message
>> @microsoft.com...
>> >I always do that!!!
>> >
>> > "Dmitry Streblechenko" wrote:
>> >
>> >> Do you specify *both* the folder and the store entry ids when calling
>> >> GetFolderFromID?
>> >>
>> >> Dmitry Streblechenko (MVP)
>> >> http://www.dimastr.com/
>> >> OutlookSpy - Outlook, CDO
>> >> and MAPI Developer Tool
>> >>
>>
>>
>>
Back to top
View user's profile Send private message
MON205



Joined: 28 Sep 2007
Posts: 3

PostPosted: Sun Sep 09, 2007 9:06 am    Post subject: Re: OnConnection Reply with quote

Yes, one PST, and not always Smile
There is nothing different in this PST, unless it was empty, but I put some
mails in it and the same problem still. On another testing machine, the same
problem found with an OST file.

"Dmitry Streblechenko" wrote:

> So it only happens for one particular PST, not for any other PST or mailbox,
> right?
> Is there anything different about that PST?
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "MON205" wrote in message
> @microsoft.com...
> > I'm shocked just like you...
> > Yes 100%... I'm getting the StoreID and EntryID by looping for all PSTs
> > and
> > sub folders. And to be sure, I copied the StoreID and EntryID from the
> > Outlook Spy -GREAT PRODUCT- and used them as constants(GetFolderFromID(
> > "xxx", "xxxxxx"), and the same error exist with this strange PST when
> > calling
> > from OnConnection or OnStartupComp. And I used the same call to
> > GetFolderFromID in a handler for a button, and it succeeded.
> >
> > "Dmitry Streblechenko" wrote:
> >
> >> The error looks like MAPI_E_INVALID_ENTRYID. Are you absolutely, 100%,
> >> sure
> >> that the entry ids belong to a store that exists in the current session?
> >> Where do these values come from?
> >>
> >> Dmitry Streblechenko (MVP)
> >> http://www.dimastr.com/
> >> OutlookSpy - Outlook, CDO
> >> and MAPI Developer Tool
> >>
> >> "MON205" wrote in message
> >> @microsoft.com...
> >> >I always do that!!!
> >> >
> >> > "Dmitry Streblechenko" wrote:
> >> >
> >> >> Do you specify *both* the folder and the store entry ids when calling
> >> >> GetFolderFromID?
> >> >>
> >> >> Dmitry Streblechenko (MVP)
> >> >> http://www.dimastr.com/
> >> >> OutlookSpy - Outlook, CDO
> >> >> and MAPI Developer Tool
> >> >>
> >>
> >>
> >>
>
>
>
Back to top
View user's profile Send private message
Dmitry Streblechenko



Joined: 12 Aug 2007
Posts: 220

PostPosted: Mon Sep 10, 2007 2:28 pm    Post subject: Re: OnConnection Reply with quote

Is it password protected?

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

"MON205" wrote in message @microsoft.com...
> Yes, one PST, and not always Smile
> There is nothing different in this PST, unless it was empty, but I put
> some
> mails in it and the same problem still. On another testing machine, the
> same
> problem found with an OST file.
>
> "Dmitry Streblechenko" wrote:
>
>> So it only happens for one particular PST, not for any other PST or
>> mailbox,
>> right?
>> Is there anything different about that PST?
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "MON205" wrote in message
>> @microsoft.com...
>> > I'm shocked just like you...
>> > Yes 100%... I'm getting the StoreID and EntryID by looping for all PSTs
>> > and
>> > sub folders. And to be sure, I copied the StoreID and EntryID from the
>> > Outlook Spy -GREAT PRODUCT- and used them as constants(GetFolderFromID(
>> > "xxx", "xxxxxx"), and the same error exist with this strange PST when
>> > calling
>> > from OnConnection or OnStartupComp. And I used the same call to
>> > GetFolderFromID in a handler for a button, and it succeeded.
>> >
>> > "Dmitry Streblechenko" wrote:
>> >
>> >> The error looks like MAPI_E_INVALID_ENTRYID. Are you absolutely, 100%,
>> >> sure
>> >> that the entry ids belong to a store that exists in the current
>> >> session?
>> >> Where do these values come from?
>> >>
>> >> Dmitry Streblechenko (MVP)
>> >> http://www.dimastr.com/
>> >> OutlookSpy - Outlook, CDO
>> >> and MAPI Developer Tool
>> >>
>> >> "MON205" wrote in message
>> >> @microsoft.com...
>> >> >I always do that!!!
>> >> >
>> >> > "Dmitry Streblechenko" wrote:
>> >> >
>> >> >> Do you specify *both* the folder and the store entry ids when
>> >> >> calling
>> >> >> GetFolderFromID?
>> >> >>
>> >> >> Dmitry Streblechenko (MVP)
>> >> >> http://www.dimastr.com/
>> >> >> OutlookSpy - Outlook, CDO
>> >> >> and MAPI Developer Tool
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>
Back to top
View user's profile Send private message
MON205



Joined: 28 Sep 2007
Posts: 3

PostPosted: Tue Sep 11, 2007 3:26 am    Post subject: Re: OnConnection Reply with quote

No at all.
I left this issue now, and when I find anything new, I'll inform you.
Now, I have new questions and I'll put every question in a separated thread.
Thanks Dmitry.

"Dmitry Streblechenko" wrote:

> Is it password protected?
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "MON205" wrote in message
> @microsoft.com...
> > Yes, one PST, and not always Smile
> > There is nothing different in this PST, unless it was empty, but I put
> > some
> > mails in it and the same problem still. On another testing machine, the
> > same
> > problem found with an OST file.
> >
> > "Dmitry Streblechenko" wrote:
> >
> >> So it only happens for one particular PST, not for any other PST or
> >> mailbox,
> >> right?
> >> Is there anything different about that PST?
> >>
> >> Dmitry Streblechenko (MVP)
> >> http://www.dimastr.com/
> >> OutlookSpy - Outlook, CDO
> >> and MAPI Developer Tool
> >>
> >> "MON205" wrote in message
> >> @microsoft.com...
> >> > I'm shocked just like you...
> >> > Yes 100%... I'm getting the StoreID and EntryID by looping for all PSTs
> >> > and
> >> > sub folders. And to be sure, I copied the StoreID and EntryID from the
> >> > Outlook Spy -GREAT PRODUCT- and used them as constants(GetFolderFromID(
> >> > "xxx", "xxxxxx"), and the same error exist with this strange PST when
> >> > calling
> >> > from OnConnection or OnStartupComp. And I used the same call to
> >> > GetFolderFromID in a handler for a button, and it succeeded.
> >> >
> >> > "Dmitry Streblechenko" wrote:
> >> >
> >> >> The error looks like MAPI_E_INVALID_ENTRYID. Are you absolutely, 100%,
> >> >> sure
> >> >> that the entry ids belong to a store that exists in the current
> >> >> session?
> >> >> Where do these values come from?
> >> >>
> >> >> Dmitry Streblechenko (MVP)
> >> >> http://www.dimastr.com/
> >> >> OutlookSpy - Outlook, CDO
> >> >> and MAPI Developer Tool
> >> >>
> >> >> "MON205" wrote in message
> >> >> @microsoft.com...
> >> >> >I always do that!!!
> >> >> >
> >> >> > "Dmitry Streblechenko" wrote:
> >> >> >
> >> >> >> Do you specify *both* the folder and the store entry ids when
> >> >> >> calling
> >> >> >> GetFolderFromID?
> >> >> >>
> >> >> >> Dmitry Streblechenko (MVP)
> >> >> >> http://www.dimastr.com/
> >> >> >> OutlookSpy - Outlook, CDO
> >> >> >> and MAPI Developer Tool
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Outlook cached exchange mode question Hello. I have a question about Outlook 2003. I have computers in a 2003 networked environment. What I have noticed is that when I reply to a message with Outlook cache mode turned on the reply arrow shows up neext to the original message.

Onletterhead template and outlook Integration Hi All! I have installed onletterhead template for customizing email messages with graphics. It had placed another 'new' button in standard bar for sending emails. I have a problem while clicking on mail addresses on a web page. A new mail item is created

Send Page by Email I am using Windows Mail as my defaut email client. I am trying to send a web page by email, but it does not work. When doing the same in Outlook Express, a email window would open and oyur had to fill in the email address etc. and it worke

Automatic Replies to Myself Has Got To Stop!!! Morning, I had to reinstall Outlook 2007 when I reformatted my laptop. Upon reinstalling and importing my saved pst file, I am now Sending Replies to myself on EVERY SINGLE EMAIL! THis did not happen before and I have reformatted and reinstalled Outlook

e-mail like to record When I e-mail link to record the e-mail appears to make a copy of itself within the BCM contact. If I then delete the original e-mail - the copy appears to stay with the contact. Is this true? - I'd like to delete all mails that I've linked - but need to
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Programs Add-Ins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group