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

Accessing root folder using MAPI on Exchange 2007

 
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Development
Author Message
David



Joined: 06 Aug 2007
Posts: 8

PostPosted: Mon Jan 21, 2008 7:54 pm    Post subject: Accessing root folder using MAPI on Exchange 2007 Reply with quote

I am trying to open the root folder on Exchange 2007 using MAPI. If I
use the following...

HrMAPIOpenFolderEx(lpMailbox, '\\', szStoreFolderPath, &lpRootFolder)

I can open the @PR_IPM_INBOX_ENTRYID but when I try and open
@PR_IPM_SUBTREE_ENTRYID it fails. This works with Exchange 5.5 thru
2003. Did they change the name of the root folder? How do I access
the root folder for Exchange 2007 (on a client with MAPI support). If
I look at it in OutlookSpy it still says IPM_SUBTREE for the display
name property on the root folder.

Thanks, David

Archived from group: microsoft>public>exchange>development
Back to top
View user's profile Send private message
Dan Mitchell



Joined: 05 Aug 2007
Posts: 42

PostPosted: Mon Jan 21, 2008 6:06 pm    Post subject: Re: Accessing root folder using MAPI on Exchange 2007 Reply with quote

David wrote in @4ax.com:
> I am trying to open the root folder on Exchange 2007 using MAPI. If I
> use the following...
>
> HrMAPIOpenFolderEx(lpMailbox, '\\', szStoreFolderPath, &lpRootFolder)

HrMAPIOpenFolderEx is part of the EDK, which is bad:

http://blogs.msdn.com/jasonjoh/archive/2004/08/01/204585.aspx

I'd guess there's a bug in there somewhere. You have a couple of choices:

1. get the EDK source and trace through it to work out what's going on
2. just write code yourself to read PR_IPM_SUBTREE_ENTRYID and openentry
on that

(or use the source code from MFCMAPI as a newer place to get sample code
from -- that navigates down to top-of-info-store by opening the entryid
above. If MFCMAPI doesn't work, then something strange is going on).

-- dan
Back to top
View user's profile Send private message
David



Joined: 05 Aug 2007
Posts: 4

PostPosted: Tue Jan 22, 2008 4:05 pm    Post subject: Re: Accessing root folder using MAPI on Exchange 2007 Reply with quote

Dan,

Thanks for the suggestion. I started to play with the EDK source and
for the heck of it used the string "Top of Information Store" instead
of the @PR_IPM_SUBTREE_ENTRYID and it worked. Not sure if it will
cause me grief in other languages.

On Mon, 21 Jan 2008 13:06:37 -0800, Dan Mitchell
wrote:

>David wrote in
>@4ax.com:
>> I am trying to open the root folder on Exchange 2007 using MAPI. If I
>> use the following...
>>
>> HrMAPIOpenFolderEx(lpMailbox, '\\', szStoreFolderPath, &lpRootFolder)
>
> HrMAPIOpenFolderEx is part of the EDK, which is bad:
>
>http://blogs.msdn.com/jasonjoh/archive/2004/08/01/204585.aspx
>
> I'd guess there's a bug in there somewhere. You have a couple of choices:
>
> 1. get the EDK source and trace through it to work out what's going on
> 2. just write code yourself to read PR_IPM_SUBTREE_ENTRYID and openentry
>on that
>
> (or use the source code from MFCMAPI as a newer place to get sample code
>from -- that navigates down to top-of-info-store by opening the entryid
>above. If MFCMAPI doesn't work, then something strange is going on).
>
> -- dan

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Accessing mailbox root folder using @PR_IPM_SUBTREE_ENTRYID I have a C application that accesses the root folder of a user's the following... '\\', where I set equal to This has worked fine wi

EWS Exchange 2007 SP1 and Public Folder access Hi folks, i built an HTTP-Module which uses EWS to access public folders properties. I'm using Exchange 2007 SP1 (Beta 2) and each time i want to access a property of a public folder (custom property) with the FindFolder Method i get the following error f

Exchange 2003 and MAPI Hi everybody, i have the following situation: Exchange Server 2003 hosts an asp-file that just opens a MAPI-session. this works without a problem when i open the site from the exchange server (the site returns "Current username: but fails

Use Mapi in web service Hi. I develop an ASP.NET web service that calls COM Interop function which do some work by MAPI (change properties of some mails in a given users mailbox) .. The problem is when I put my web service under IIS the exception is thrown from Mapi it can't cr

Import MSG to PST using MAPI Hi, Which API do I use to import messages (MSG) into a PST ? I have LPMESSAGE object which I open using and the IMsgStore object returned from call. How do I import the message to the message store? Thanks a lot. Lee Messag
Post new topic   Reply to topic    exchangefreaks.com Forum Index -> MS Exchange Development 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