Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Exchange Server / Development / July 2008

Tip: Looking for answers? Try searching our database.

I am getting  E_NOINTERFACE while using QueryInterfaceof for IID_IExchangeManageStore4.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sourabh jain - 18 Jul 2008 15:09 GMT
I am using following code for querying interfaces.

HResult hr = MAPILogonEx ( NULL, (LPTSTR)lpcszProfile, (LPTSTR) Password,
        MAPI_EXTENDED|MAPI_UNICODE|MAPI_NEW_SESSION|MAPI_NO_MAIL|MAPI_TIMEOUT_SHORT,
&m_pSession );
CByteArray baEntryID;
LPMAPITABLE pMsgStoresTable;
hr = pSession->GetMsgStoresTable ( 0, &pMsgStoresTable );
bool bFoundEntryID = false;
if (SUCCEEDED ( hr ) )
{
    static const SizedSPropTagArray ( 3L, spta ) =
    { 3L, { PR_DISPLAY_NAME_A, PR_ENTRYID, PR_MDB_PROVIDER } };
    LPSRowSet lprs;
    hr = HrQueryAllRows ( pMsgStoresTable, (LPSPropTagArray) &spta, NULL, NULL,
0, &lprs );
    if ( SUCCEEDED ( hr ) )
    {
        //Hunt for the one of interest (or present dialog for user to choose)
        for ( ULONG nIdx = 0; nIdx < lprs->cRows && ! bFoundEntryID; nIdx++ )
        {
            SRow& ThisRow = lprs->aRow[nIdx];

            SPropValue& DisplayNameProp = ThisRow.lpProps[0];
            SPropValue& EntryIDProp = ThisRow.lpProps[1];
            SPropValue& ProviderIDProp = ThisRow.lpProps[2];

            LPSTR lpszDisplayName = DisplayNameProp.Value.lpszA;
            SBinary binEntryID = EntryIDProp.Value.bin;
            SBinary binProviderID = ProviderIDProp.Value.bin;
            //check the provider ID to see if it is MS-Exchange based
            if ( sizeof(GUID) == binProviderID.cb ) //
            {
                if ( 0 == memcmp ( binProviderID.lpb, pbExchangeProviderPrimaryUserGuid,
sizeof(GUID) ) ||
                    0 == memcmp ( binProviderID.lpb, pbExchangeProviderDelegateGuid,
sizeof(GUID) ) ||
                    0 == memcmp ( binProviderID.lpb, pbExchangeProviderPublicGuid,
sizeof(GUID) ) ||
                    0 == memcmp ( binProviderID.lpb, pbExchangeProviderXportGuid,
sizeof(GUID) ) )
                {
                    baEntryID.SetSize ( binEntryID.cb );
                    CopyMemory ( baEntryID.GetData(), binEntryID.lpb, binEntryID.cb );
                    bFoundEntryID = true;
                }
            }
        }
    }
}
if (bFoundEntryID)
{
    LPMDB pMsgStore = NULL;
    hr = m_pSession->OpenMsgStore ( NULL, baEntryID.GetSize(), (LPENTRYID)
baEntryID.GetData(),
            &IID_IMsgStore, MDB_NO_DIALOG|MDB_NO_MAIL, &pMsgStore );
    if ( (SUCCEEDED ( m_hr )) || ( m_hr == MAPI_W_ERRORS_RETURNED && pMsgStore)
)
    {
        hr = pMsgStore->QueryInterface(IID_IExchangeManageStore4, (void **)
&m_pExMgStore);
        // here I get E_NOINTERFACE  
    }
}

I am using outlook 2007 profile and ESMMDB32.dll of version 12.0.6211.1000.

Please help me to resolve this problem of IID_IExchangeManageStore4.  

Thanks in advanced

url:http://www.ureader.com/gp/1173-1.aspx
Dmitry Streblechenko - 18 Jul 2008 18:33 GMT
AFAIK IExchangeManageStore4 is only supported by the Exchange version of
MAPI:
http://www.microsoft.com/downloads/details.aspx?FamilyID=e17e7f31-079a-43a9-bff2
-0a110307611e&DisplayLang=en

The client version of MAPI does not support it.

Signature

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

>I am using following code for querying interfaces.
>
[quoted text clipped - 71 lines]
>
> url:http://www.ureader.com/gp/1173-1.aspx
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.