|
|
|
date: Sat, 26 Jan 2008 18:43:09 +0530,
group: microsoft.public.platformsdk.mapi
back
Re: List email accounts in a profile
This *is* an easy way :-)
I do not use C++, so I can't help you with the headers, sorry.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Ashutosh" <smbs_user@newsgroup.nospam> wrote in message
news:%23RD22PdYIHA.4160@TK2MSFTNGP03.phx.gbl...
> Hi Dmitry,
> Thanks for your reply...now I have some hope.
> I tried finding IOlkAccountManager in MSDN, but when I couldn't find it,
> tried searching it on the net, and I found it on online MSDN and also lots
> posts by you on forums.
>
> You mentioned that there doesn't exist a header for this interface. I
> tried defining this interface manually but to define it I need to define
> some more interface and I think the chain will continue.
>
> Isn't there an easy way???
>
> Regards,
> Ashutosh
>
>
> Dmitry Streblechenko wrote:
>> Use teh profile management API (IProfAdmin) and IOlkAccountManager (for
>> non-MAPI accounts).
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Ashutosh" <smbs_user@newsgroup.nospam> wrote in message
>> news:eg6p10BYIHA.5816@TK2MSFTNGP06.phx.gbl...
>>> Hi,
>>> Is it possible to list the email accounts in outlook profile using MAPI
>>> ?
>>> What are the APIs? I can access all other things using MAPI and know how
>>> to
>>> use them but I am unable to locate the APIs/Interface through which I
>>> can
>>> list the email accounts configured in a profile.
>>>
>>> I also posted this query at
>>> http://www.experts-exchange.com/Microsoft/Development/Microsoft_Programming/Q_23086947.html
>>> but no one replied :(
>>>
>>> Regards,
>>> Ashutosh
>>>
>>>
>>>
>>
date: Mon, 28 Jan 2008 11:01:43 -0700
author: Dmitry Streblechenko
Re: List email accounts in a profile
Hi Dmitry,
I have created all the headers and implemented the required classes. The
problem is that I can't create object of IOlkAccountManager.
MSDN says
------------------------------------------------------------------
Microsoft Office Outlook 2003 Integration API Reference
IOlkAccountManager [Outlook 2003 API Reference]
Manages access to accounts and sets up notifications about account changes.
Quick Info
Inherits from: IOlkErrorUnknown
Implemented by: Outlook
Provided by: CLSID_OlkAccountManager
Called by: Client
Interface identifier: IID_IOlkAccountManager
------------------------------------------------------------------
So, when creating the COM object, I pass in CLSID_OlkAccountManager &
IID_IOlkAccountManager, which is not defined/registered. I can define
them myself, but that way MAPI subsystem won't recognize it. So, how do
I create the objects??
Regards,
Ashutosh
==================================================================
Dmitry Streblechenko wrote:
> This *is* an easy way :-)
> I do not use C++, so I can't help you with the headers, sorry.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Ashutosh" <smbs_user@newsgroup.nospam> wrote in message
> news:%23RD22PdYIHA.4160@TK2MSFTNGP03.phx.gbl...
>> Hi Dmitry,
>> Thanks for your reply...now I have some hope.
>> I tried finding IOlkAccountManager in MSDN, but when I couldn't find it,
>> tried searching it on the net, and I found it on online MSDN and also lots
>> posts by you on forums.
>>
>> You mentioned that there doesn't exist a header for this interface. I
>> tried defining this interface manually but to define it I need to define
>> some more interface and I think the chain will continue.
>>
>> Isn't there an easy way???
>>
>> Regards,
>> Ashutosh
>>
>>
>> Dmitry Streblechenko wrote:
>>> Use teh profile management API (IProfAdmin) and IOlkAccountManager (for
>>> non-MAPI accounts).
>>>
>>> Dmitry Streblechenko (MVP)
>>> http://www.dimastr.com/
>>> OutlookSpy - Outlook, CDO
>>> and MAPI Developer Tool
>>>
>>> "Ashutosh" <smbs_user@newsgroup.nospam> wrote in message
>>> news:eg6p10BYIHA.5816@TK2MSFTNGP06.phx.gbl...
>>>> Hi,
>>>> Is it possible to list the email accounts in outlook profile using MAPI
>>>> ?
>>>> What are the APIs? I can access all other things using MAPI and know how
>>>> to
>>>> use them but I am unable to locate the APIs/Interface through which I
>>>> can
>>>> list the email accounts configured in a profile.
>>>>
>>>> I also posted this query at
>>>> http://www.experts-exchange.com/Microsoft/Development/Microsoft_Programming/Q_23086947.html
>>>> but no one replied :(
>>>>
>>>> Regards,
>>>> Ashutosh
>>>>
>>>>
>>>>
>
date: Fri, 28 Mar 2008 01:14:05 +0530
author: Ashutosh am
Re: List email accounts in a profile
Hi,
Please ignore my last post. I got the GUIDs for all the interfaces and
classes.
Thanks & Regards,
Ashutosh
Ashutosh wrote:
> Hi Dmitry,
>
> I have created all the headers and implemented the required classes. The
> problem is that I can't create object of IOlkAccountManager.
>
> MSDN says
> ------------------------------------------------------------------
> Microsoft Office Outlook 2003 Integration API Reference
> IOlkAccountManager [Outlook 2003 API Reference]
>
> Manages access to accounts and sets up notifications about account changes.
> Quick Info
> Inherits from: IOlkErrorUnknown
> Implemented by: Outlook
> Provided by: CLSID_OlkAccountManager
> Called by: Client
> Interface identifier: IID_IOlkAccountManager
> ------------------------------------------------------------------
>
> So, when creating the COM object, I pass in CLSID_OlkAccountManager &
> IID_IOlkAccountManager, which is not defined/registered. I can define
> them myself, but that way MAPI subsystem won't recognize it. So, how do
> I create the objects??
>
> Regards,
> Ashutosh
>
> ==================================================================
> Dmitry Streblechenko wrote:
>> This *is* an easy way :-)
>> I do not use C++, so I can't help you with the headers, sorry.
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Ashutosh" <smbs_user@newsgroup.nospam> wrote in message
>> news:%23RD22PdYIHA.4160@TK2MSFTNGP03.phx.gbl...
>>> Hi Dmitry,
>>> Thanks for your reply...now I have some hope.
>>> I tried finding IOlkAccountManager in MSDN, but when I couldn't find
>>> it, tried searching it on the net, and I found it on online MSDN and
>>> also lots posts by you on forums.
>>>
>>> You mentioned that there doesn't exist a header for this interface. I
>>> tried defining this interface manually but to define it I need to
>>> define some more interface and I think the chain will continue.
>>>
>>> Isn't there an easy way???
>>>
>>> Regards,
>>> Ashutosh
>>>
>>>
>>> Dmitry Streblechenko wrote:
>>>> Use teh profile management API (IProfAdmin) and IOlkAccountManager
>>>> (for non-MAPI accounts).
>>>>
>>>> Dmitry Streblechenko (MVP)
>>>> http://www.dimastr.com/
>>>> OutlookSpy - Outlook, CDO
>>>> and MAPI Developer Tool
>>>>
>>>> "Ashutosh" <smbs_user@newsgroup.nospam> wrote in message
>>>> news:eg6p10BYIHA.5816@TK2MSFTNGP06.phx.gbl...
>>>>> Hi,
>>>>> Is it possible to list the email accounts in outlook profile using
>>>>> MAPI ?
>>>>> What are the APIs? I can access all other things using MAPI and
>>>>> know how to
>>>>> use them but I am unable to locate the APIs/Interface through which
>>>>> I can
>>>>> list the email accounts configured in a profile.
>>>>>
>>>>> I also posted this query at
>>>>> http://www.experts-exchange.com/Microsoft/Development/Microsoft_Programming/Q_23086947.html
>>>>>
>>>>> but no one replied :(
>>>>>
>>>>> Regards,
>>>>> Ashutosh
>>>>>
>>>>>
>>>>>
>>
date: Fri, 28 Mar 2008 01:42:28 +0530
author: Ashutosh am
Re: List email accounts in a profile
#include "AccountManagerGUIDs.h"
//MIDL_INTERFACE("9240a6c0-af41-11d2-8C3B-00104B2A6676")
interface IOlkErrorUnknown: public IUnknown
{
HRESULT GetLastError( HRESULT hr, LPWSTR *ppwszError);
};
//MIDL_INTERFACE("9240a6cb-af41-11d2-8C3B-00104B2A6676")
interface IOlkAccountHelper: public IUnknown
{
HRESULT Placeholder1 (void*);
HRESULT GetIdentity ( LPWSTR pwszIdentity,DWORD *pcch);
HRESULT GetMapiSession(LPUNKNOWN *ppmsess);
HRESULT HandsOffSession( );
};
//MIDL_INTERFACE("9240a6c0-af41-11d2-8C3B-00104B2A6676")
interface IOlkEnum : IUnknown
{
HRESULT GetCount (DWORD *pulCount);
HRESULT Reset ();
HRESULT GetNext(LPUNKNOWN *ppunk);
HRESULT Skip( DWORD cSkip);
};
//MIDL_INTERFACE("9240a6c3-af41-11d2-8C3B-00104B2A6676")
interface IOlkAccountNotify : IUnknown
{
HRESULT Notify( DWORD dwNotify, DWORD dwAcctID, DWORD dwFlags);
};
typedef struct
{
DWORD cb;
BYTE * pb;
} ACCT_BIN;
typedef struct
{
DWORD dwType;
union
{
DWORD dw;
WCHAR *pwsz;
ACCT_BIN bin;
} Val;
} ACCT_VARIANT;
//MIDL_INTERFACE("9240a6d2-af41-11d2-8C3B-00104B2A6676")
interface IOlkAccount : IOlkErrorUnknown
{
void IOlkAccount_Placeholder1();
void IOlkAccount_Placeholder2();
void IOlkAccount_Placeholder3();
void IOlkAccount_Placeholder4();
void IOlkAccount_Placeholder5();
void IOlkAccount_Placeholder6();
HRESULT GetAccountInfo( CLSID *pclsidType,DWORD *pcCategories,CLSID **prgclsidCategory);
HRESULT GetProp( DWORD dwProp,ACCT_VARIANT *pVar);
HRESULT SetProp( DWORD dwProp,ACCT_VARIANT *pVar);
void IOlkAccount_Placeholder7();
void IOlkAccount_Placeholder8();
void IOlkAccount_Placeholder9();
HRESULT FreeMemory ( BYTE *pv);
void IOlkAccount_Placeholder10();
HRESULT SaveChanges ( DWORD dwFlags);
};
//MIDL_INTERFACE("9240a6cd-af41-11D2-8C3B-00104B2A6676")
interface IOlkAccountManager : IOlkErrorUnknown
{
HRESULT Init (IOlkAccountHelper *pAcctHelper, DWORD dwFlags);
void IOlkAccountManager_Placeholder1();
void IOlkAccountManager_Placeholder2();
void IOlkAccountManager_Placeholder3();
void IOlkAccountManager_Placeholder4();
void IOlkAccountManager_Placeholder5();
void IOlkAccountManager_Placeholder6();
HRESULT FindAccount ( DWORD dwProp, ACCT_VARIANT *pVar, IOlkAccount **ppAccount);
void IOlkAccountManager_Placeholder7();
void IOlkAccountManager_Placeholder8();
void IOlkAccountManager_Placeholder9();
HRESULT DeleteAccount ( DWORD dwAcctID);
void IOlkAccountManager_Placeholder10();
HRESULT SaveChanges (DWORD dwAcctID, DWORD dwFlags );
HRESULT GetOrder (const CLSID *pclsidCategory, DWORD *pcAccts, DWORD *prgAccts[]);
HRESULT SetOrder (const CLSID *pclsidCategory, DWORD *pcAccts, DWORD *prgAccts[]);
HRESULT EnumerateAccounts (const CLSID *pclsidCategory, const CLSID *pclsidType, DWORD dwFlags, IOlkEnum **ppEnum);
void IOlkAccountManager_Placeholder11();
void IOlkAccountManager_Placeholder12();
HRESULT FreeMemory (BYTE *pv);
HRESULT Advise ( IOlkAccountNotify *pNotify, DWORD *pdwCookie);
HRESULT Unadvise ( DWORD *pdwCookie);
void IOlkAccountManager_Placeholder13();
void IOlkAccountManager_Placeholder14();
void IOlkAccountManager_Placeholder15();
};
date: Tue, 08 Apr 2008 23:46:41 +0530
author: Ashutosh am
Re: List email accounts in a profile
I do not use C++, but it looks perfectly fine to me.
--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Ashutosh" <smbs_user@newsgroup.nospam> wrote in message
news:%23rseySamIHA.1680@TK2MSFTNGP06.phx.gbl...
> Hi Dmitry,
> I have created all the header files and defined the GUIDS, but when I
> include the code for creating an instance (CoCreateInstance) I get
> linker error.
>
> The code is:
> IOlkAccountManager * ppv;
> CoCreateInstance(CLSID_OlkAccountManager,NULL, 0,
> IID_IOlkAccountManager, (void**)&ppv);
>
>
> and the error I get is
>
> MAPI1Dlg.obj : error LNK2001: unresolved external symbol
> _CLSID_OlkAccountManager
> MAPI1Dlg.obj : error LNK2001: unresolved external symbol
> _IID_IOlkAccountManager
>
> The header files are attached, please have a look if you can.
>
> I think I need to include some library in the project. Currently I have
> these libraries included
>
> mapi32.lib, Edkguid.lib, Edkutils.lib, Edkmapi.lib, Addrlkup.lib,
> Edkdebug.lib, Version.lib, Mblogon.lib
>
> Please help!!!
>
> Regards,
> Ashutosh
>
> Dmitry Streblechenko wrote:
>> Use teh profile management API (IProfAdmin) and IOlkAccountManager (for
>> non-MAPI accounts).
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Ashutosh" <smbs_user@newsgroup.nospam> wrote in message
>> news:eg6p10BYIHA.5816@TK2MSFTNGP06.phx.gbl...
>>> Hi,
>>> Is it possible to list the email accounts in outlook profile using MAPI
>>> ?
>>> What are the APIs? I can access all other things using MAPI and know how
>>> to
>>> use them but I am unable to locate the APIs/Interface through which I
>>> can
>>> list the email accounts configured in a profile.
>>>
>>> I also posted this query at
>>> http://www.experts-exchange.com/Microsoft/Development/Microsoft_Programming/Q_23086947.html
>>> but no one replied :(
>>>
>>> Regards,
>>> Ashutosh
>>>
>>>
>>>
>>
>>
>
>
--------------------------------------------------------------------------------
> //#include <guiddef.h>
> //Use the DEFINE_GUID macro defined in the Platform SDK header file
> guiddef.h to associate the GUID symbolic name with its value.
>
> //{ed475410-b0d6-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(CLSID_OlkAccountManager, 0xed475410, 0xb0d6, 0x11d2, 0x8c,
> 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{ed475411-b0d6-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(CLSID_OlkPOP3Account, 0xed475411, 0xb0d6, 0x11d2, 0x8c, 0x3b,
> 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{ed475412-b0d6-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(CLSID_OlkIMAP4Account, 0xed475412, 0xb0d6, 0x11d2, 0x8c, 0x3b,
> 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{ed475414-b0d6-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(CLSID_OlkMAPIAccount, 0xed475414, 0xb0d6, 0x11d2, 0x8c, 0x3b,
> 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{ed475418-b0d6-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(CLSID_OlkMail, 0xed475418, 0xb0d6, 0x11d2, 0x8c, 0x3b, 0x0,
> 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{ed475419-b0d6-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(CLSID_OlkAddressBook, 0xed475419, 0xb0d6, 0x11d2, 0x8c, 0x3b,
> 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{ed475420-b0d6-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(CLSID_OlkStore, 0xed475420, 0xb0d6, 0x11d2, 0x8c, 0x3b, 0x0,
> 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{4db5cbf0-3b77-4852-bc8e-bb81908861f3}
>
> DEFINE_GUID(CLSID_OlkHotmailAccount, 0x4db5cbf0, 0x3b77, 0x4852, 0xbc,
> 0x8e, 0xbb, 0x81, 0x90, 0x88, 0x61, 0xf3);
>
> //{4db5cbf2-3b77-4852-bc8e-bb81908861f3}
>
> DEFINE_GUID(CLSID_OlkLDAPAccount, 0x4db5cbf2, 0x3b77, 0x4852, 0xbc, 0x8e,
> 0xbb, 0x81, 0x90, 0x88, 0x61, 0xf3);
>
> ///////////////////////////////////////////////////////////////////////
> //Interface Identifiers
> //----------------------
>
> //Use the DEFINE_GUID macro defined in the Platform SDK header file
> guiddef.h to associate the GUID symbolic name with its value.
>
> //{9240A6C0-AF41-11d2-8C3B-00104B2A6676}
>
> DEFINE_GUID(IID_IOlkErrorUnknown, 0x9240a6c0, 0xaf41, 0x11d2, 0x8c, 0x3b,
> 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{9240A6C1-AF41-11d2-8C3B-00104B2A6676 }
>
> DEFINE_GUID(IID_IOlkEnum, 0x9240a6c0, 0xaf41, 0x11d2, 0x8c, 0x3b, 0x0,
> 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{9240a6c3-af41-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(IID_IOlkAccountNotify, 0x9240a6c3, 0xaf41, 0x11d2, 0x8c, 0x3b,
> 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{9240a6cb-af41-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(IID_IOlkAccountHelper, 0x9240a6cb, 0xaf41, 0x11d2, 0x8c, 0x3b,
> 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{9240a6cd-af41-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(IID_IOlkAccountManager, 0x9240a6cd, 0xaf41, 0x11d2, 0x8c,
> 0x3b, 0x0, 0x10, 0x4b, 0x2a, 0x66, 0x76);
>
> //{9240a6d2-af41-11d2-8c3b-00104b2a6676}
>
> DEFINE_GUID(IID_IOlkAccount, 0x9240a6d2, 0xaf41, 0x11d2, 0x8c, 0x3b, 0x0,
> 0x10, 0x4b, 0x2a, 0x66, 0x76);
--------------------------------------------------------------------------------
> #include "AccountManagerGUIDs.h"
> //MIDL_INTERFACE("9240a6c0-af41-11d2-8C3B-00104B2A6676")
> interface IOlkErrorUnknown: public IUnknown
> {
> HRESULT GetLastError( HRESULT hr, LPWSTR *ppwszError);
> };
>
> //MIDL_INTERFACE("9240a6cb-af41-11d2-8C3B-00104B2A6676")
>
> interface IOlkAccountHelper: public IUnknown
> {
> HRESULT Placeholder1 (void*);
> HRESULT GetIdentity ( LPWSTR pwszIdentity,DWORD *pcch);
> HRESULT GetMapiSession(LPUNKNOWN *ppmsess);
> HRESULT HandsOffSession( );
> };
> //MIDL_INTERFACE("9240a6c0-af41-11d2-8C3B-00104B2A6676")
> interface IOlkEnum : IUnknown
> {
> HRESULT GetCount (DWORD *pulCount);
> HRESULT Reset ();
> HRESULT GetNext(LPUNKNOWN *ppunk);
> HRESULT Skip( DWORD cSkip);
> };
>
>
> //MIDL_INTERFACE("9240a6c3-af41-11d2-8C3B-00104B2A6676")
> interface IOlkAccountNotify : IUnknown
> {
> HRESULT Notify( DWORD dwNotify, DWORD dwAcctID, DWORD dwFlags);
> };
>
> typedef struct
> {
> DWORD cb;
> BYTE * pb;
> } ACCT_BIN;
> typedef struct
> {
> DWORD dwType;
> union
> {
> DWORD dw;
> WCHAR *pwsz;
> ACCT_BIN bin;
> } Val;
> } ACCT_VARIANT;
>
> //MIDL_INTERFACE("9240a6d2-af41-11d2-8C3B-00104B2A6676")
> interface IOlkAccount : IOlkErrorUnknown
> {
> void IOlkAccount_Placeholder1();
> void IOlkAccount_Placeholder2();
> void IOlkAccount_Placeholder3();
> void IOlkAccount_Placeholder4();
> void IOlkAccount_Placeholder5();
> void IOlkAccount_Placeholder6();
>
> HRESULT GetAccountInfo( CLSID *pclsidType,DWORD *pcCategories,CLSID
> **prgclsidCategory);
> HRESULT GetProp( DWORD dwProp,ACCT_VARIANT *pVar);
> HRESULT SetProp( DWORD dwProp,ACCT_VARIANT *pVar);
>
> void IOlkAccount_Placeholder7();
> void IOlkAccount_Placeholder8();
> void IOlkAccount_Placeholder9();
>
> HRESULT FreeMemory ( BYTE *pv);
>
> void IOlkAccount_Placeholder10();
>
> HRESULT SaveChanges ( DWORD dwFlags);
> };
>
>
> //MIDL_INTERFACE("9240a6cd-af41-11D2-8C3B-00104B2A6676")
> interface IOlkAccountManager : IOlkErrorUnknown
> {
> HRESULT Init (IOlkAccountHelper *pAcctHelper, DWORD dwFlags);
>
> void IOlkAccountManager_Placeholder1();
> void IOlkAccountManager_Placeholder2();
> void IOlkAccountManager_Placeholder3();
> void IOlkAccountManager_Placeholder4();
> void IOlkAccountManager_Placeholder5();
> void IOlkAccountManager_Placeholder6();
>
> HRESULT FindAccount ( DWORD dwProp, ACCT_VARIANT *pVar, IOlkAccount
> **ppAccount);
>
> void IOlkAccountManager_Placeholder7();
> void IOlkAccountManager_Placeholder8();
> void IOlkAccountManager_Placeholder9();
>
> HRESULT DeleteAccount ( DWORD dwAcctID);
>
> void IOlkAccountManager_Placeholder10();
>
> HRESULT SaveChanges (DWORD dwAcctID, DWORD dwFlags );
> HRESULT GetOrder (const CLSID *pclsidCategory, DWORD *pcAccts, DWORD
> *prgAccts[]);
> HRESULT SetOrder (const CLSID *pclsidCategory, DWORD *pcAccts, DWORD
> *prgAccts[]);
> HRESULT EnumerateAccounts (const CLSID *pclsidCategory, const CLSID
> *pclsidType, DWORD dwFlags, IOlkEnum **ppEnum);
>
> void IOlkAccountManager_Placeholder11();
> void IOlkAccountManager_Placeholder12();
>
> HRESULT FreeMemory (BYTE *pv);
> HRESULT Advise ( IOlkAccountNotify *pNotify, DWORD *pdwCookie);
> HRESULT Unadvise ( DWORD *pdwCookie);
>
> void IOlkAccountManager_Placeholder13();
> void IOlkAccountManager_Placeholder14();
> void IOlkAccountManager_Placeholder15();
> };
>
date: Wed, 9 Apr 2008 17:15:06 -0700
author: Dmitry Streblechenko
Re: List email accounts in a profile
Hi,
The linker issue I mentioned is now solved, but the CoCreateInstance
always fails, don't know why???
IOlkAccountManager * ppv = NULL;
HRESULT hr= CoCreateInstance(CLSID_OlkAccountManager,NULL, 0,
IID_IOlkAccountManager, (void**)&ppv);
Object creation has nothing to do with the interface definition. It just
need the class ID and Interface IDs. It's required only if the object is
used and as far as GUIDs are concerned, I don't think there is any
problem with them. So, whys isn't the object getting created? Can you
please check?
Regards,
Ashutosh
Dmitry Streblechenko wrote:
> No, I have not - I just looked at the docs and typed by own interface
> definitions and their GUIDs in Delphi.
>
date: Mon, 14 Apr 2008 23:01:50 +0530
author: Ashutosh am
Re: List email accounts in a profile
The error code is Class not registered (80040154)
Regards,
Ashutosh
SvenC wrote:
> Hi Ashutosh,
>
>> Hi,
>> The linker issue I mentioned is now solved, but the CoCreateInstance
>> always fails, don't know why???
>>
>> IOlkAccountManager * ppv = NULL;
>> HRESULT hr= CoCreateInstance(CLSID_OlkAccountManager,NULL, 0,
>> IID_IOlkAccountManager, (void**)&ppv);
>
> What value has hr?
>
> Did you call CoInitialize before using CoCreateInstance?
>
> --
> SvenC
>
date: Tue, 15 Apr 2008 07:46:07 +0530
author: Ashutosh am
|
|