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

OnConnection



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 2nd 07, 02:56 PM posted to microsoft.public.outlook.program_addins
MON205
external usenet poster
 
Posts: 31
Default OnConnection

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?!!!
Ads
  #2  
Old September 3rd 07, 11:37 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default OnConnection

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
...
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?!!!



  #3  
Old September 4th 07, 08:30 AM posted to microsoft.public.outlook.program_addins
MON205
external usenet poster
 
Posts: 31
Default OnConnection

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
...
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?!!!




  #4  
Old September 4th 07, 05:43 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default OnConnection

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
...
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
...
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?!!!






  #5  
Old September 5th 07, 07:36 AM posted to microsoft.public.outlook.program_addins
MON205
external usenet poster
 
Posts: 31
Default OnConnection

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
...
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
...
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?!!!






  #6  
Old September 5th 07, 10:21 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default OnConnection

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
...
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



  #7  
Old September 6th 07, 08:36 AM posted to microsoft.public.outlook.program_addins
MON205[_2_]
external usenet poster
 
Posts: 33
Default OnConnection

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
...
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




  #8  
Old September 6th 07, 05:38 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default OnConnection

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
...
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
...
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






  #9  
Old September 9th 07, 01:06 PM posted to microsoft.public.outlook.program_addins
MON205[_2_]
external usenet poster
 
Posts: 33
Default OnConnection

Yes, one PST, and not always
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
...
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
...
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







  #10  
Old September 10th 07, 06:28 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default OnConnection

Is it password protected?

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

"MON205" wrote in message
...
Yes, one PST, and not always
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
...
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
...
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









 




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
Add in loads (but does not reach OnConnection) and then Outlook shuts down Saira Add-ins for Outlook 3 June 8th 06 02:36 PM


All times are GMT +1. The time now is 08:11 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.