Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: IMsgServiceAdmin::AdminProviders fails with 0x80010104

Geek News

IMsgServiceAdmin::AdminProviders fails with 0x80010104
"Lars Iversen" <lars.iver[ at ]gmail.com> 8/22/2006 2:06:22 PM
Hi.

I take part in developing an exchange client extension for Outlook
based on extended MAPI. The application extends Outlook with commands,
a new message class and a form, uses advise sinks to listen to folders
for events, adds and removes message stores from the profile, etc. I
use VS2005 on different platforms.

Inside my implementation of IExchExt::Install, the extension accesses
the (outlook) profile, and adds and removes message stores as described
in http://support.microsoft.com/?kbid=171636. No problem, works fine.

However, when I try to access the profile in much the same way (just
for reading purposes) from my implementation of
IPersistMessage::InitNew, it fails. More specifically,
IMsgServiceAdmin::AdminProviders returns 0x80010104 (RPC could not call
the server or could not return the result of calling the server). I
have included pseudo code below. Any clue of what is going wrong?

Regards,
Lars

STDMETHODIMP MyForm::InitNew(IMAPIMessageSite* site, IMessage*)
{
CComPtr<IMAPISession> session;
site->GetSession(&session.p);
CComPtr<IMsgServiceAdmin> messageServiceAdministration;
session->AdminServices(0, &messageServiceAdministration.p);
CComPtr<IMAPITable> table;
messageServiceAdministration.GetMessageServiceTable(0, &table.p);
MAPIUID uid = ...; // the uid in the table with PR_SERVICE_NAME =
'MSEMS'
CComPtr<IProviderAdmin> providerAdmin;
HRESULT hr = messageServiceAdministration->AdminProviders(&uid, 0,
&providerAdmin.p); // hr has the value 0x80010104

Re: IMsgServiceAdmin::AdminProviders fails with 0x80010104
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 8/22/2006 5:25:41 PM
Is your form implemented in a separate exe or a dll?

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

"Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
news:1156255582.243789.265590[ at ]74g2000cwt.googlegroups.com...
[Quoted Text]
> Hi.
>
> I take part in developing an exchange client extension for Outlook
> based on extended MAPI. The application extends Outlook with commands,
> a new message class and a form, uses advise sinks to listen to folders
> for events, adds and removes message stores from the profile, etc. I
> use VS2005 on different platforms.
>
> Inside my implementation of IExchExt::Install, the extension accesses
> the (outlook) profile, and adds and removes message stores as described
> in http://support.microsoft.com/?kbid=171636. No problem, works fine.
>
> However, when I try to access the profile in much the same way (just
> for reading purposes) from my implementation of
> IPersistMessage::InitNew, it fails. More specifically,
> IMsgServiceAdmin::AdminProviders returns 0x80010104 (RPC could not call
> the server or could not return the result of calling the server). I
> have included pseudo code below. Any clue of what is going wrong?
>
> Regards,
> Lars
>
> STDMETHODIMP MyForm::InitNew(IMAPIMessageSite* site, IMessage*)
> {
> CComPtr<IMAPISession> session;
> site->GetSession(&session.p);
> CComPtr<IMsgServiceAdmin> messageServiceAdministration;
> session->AdminServices(0, &messageServiceAdministration.p);
> CComPtr<IMAPITable> table;
> messageServiceAdministration.GetMessageServiceTable(0, &table.p);
> MAPIUID uid = ...; // the uid in the table with PR_SERVICE_NAME =
> 'MSEMS'
> CComPtr<IProviderAdmin> providerAdmin;
> HRESULT hr = messageServiceAdministration->AdminProviders(&uid, 0,
> &providerAdmin.p); // hr has the value 0x80010104
>


Re: IMsgServiceAdmin::AdminProviders fails with 0x80010104
"Lars Iversen" <lars.iver[ at ]gmail.com> 8/23/2006 6:00:57 AM
It is implemented in a separate exe.

Dmitry Streblechenko wrote:
[Quoted Text]
> Is your form implemented in a separate exe or a dll?
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
> news:1156255582.243789.265590[ at ]74g2000cwt.googlegroups.com...
> > Hi.
> >
> > I take part in developing an exchange client extension for Outlook
> > based on extended MAPI. The application extends Outlook with commands,
> > a new message class and a form, uses advise sinks to listen to folders
> > for events, adds and removes message stores from the profile, etc. I
> > use VS2005 on different platforms.
> >
> > Inside my implementation of IExchExt::Install, the extension accesses
> > the (outlook) profile, and adds and removes message stores as described
> > in http://support.microsoft.com/?kbid=171636. No problem, works fine.
> >
> > However, when I try to access the profile in much the same way (just
> > for reading purposes) from my implementation of
> > IPersistMessage::InitNew, it fails. More specifically,
> > IMsgServiceAdmin::AdminProviders returns 0x80010104 (RPC could not call
> > the server or could not return the result of calling the server). I
> > have included pseudo code below. Any clue of what is going wrong?
> >
> > Regards,
> > Lars
> >
> > STDMETHODIMP MyForm::InitNew(IMAPIMessageSite* site, IMessage*)
> > {
> > CComPtr<IMAPISession> session;
> > site->GetSession(&session.p);
> > CComPtr<IMsgServiceAdmin> messageServiceAdministration;
> > session->AdminServices(0, &messageServiceAdministration.p);
> > CComPtr<IMAPITable> table;
> > messageServiceAdministration.GetMessageServiceTable(0, &table.p);
> > MAPIUID uid = ...; // the uid in the table with PR_SERVICE_NAME =
> > 'MSEMS'
> > CComPtr<IProviderAdmin> providerAdmin;
> > HRESULT hr = messageServiceAdministration->AdminProviders(&uid, 0,
> > &providerAdmin.p); // hr has the value 0x80010104
> >

Re: IMsgServiceAdmin::AdminProviders fails with 0x80010104
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 8/23/2006 6:31:10 AM
Try to move the implementation to a dll to make sure it is loaded in-proc:
IMAPISession has a few bugs when it comes to marshalling - profile sections
and ACLs are the two major problems (to be fixed in Outlook 2007).

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

"Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
news:1156312857.862892.233300[ at ]m73g2000cwd.googlegroups.com...
[Quoted Text]
> It is implemented in a separate exe.
>
> Dmitry Streblechenko wrote:
>> Is your form implemented in a separate exe or a dll?
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
>> news:1156255582.243789.265590[ at ]74g2000cwt.googlegroups.com...
>> > Hi.
>> >
>> > I take part in developing an exchange client extension for Outlook
>> > based on extended MAPI. The application extends Outlook with commands,
>> > a new message class and a form, uses advise sinks to listen to folders
>> > for events, adds and removes message stores from the profile, etc. I
>> > use VS2005 on different platforms.
>> >
>> > Inside my implementation of IExchExt::Install, the extension accesses
>> > the (outlook) profile, and adds and removes message stores as described
>> > in http://support.microsoft.com/?kbid=171636. No problem, works fine.
>> >
>> > However, when I try to access the profile in much the same way (just
>> > for reading purposes) from my implementation of
>> > IPersistMessage::InitNew, it fails. More specifically,
>> > IMsgServiceAdmin::AdminProviders returns 0x80010104 (RPC could not call
>> > the server or could not return the result of calling the server). I
>> > have included pseudo code below. Any clue of what is going wrong?
>> >
>> > Regards,
>> > Lars
>> >
>> > STDMETHODIMP MyForm::InitNew(IMAPIMessageSite* site, IMessage*)
>> > {
>> > CComPtr<IMAPISession> session;
>> > site->GetSession(&session.p);
>> > CComPtr<IMsgServiceAdmin> messageServiceAdministration;
>> > session->AdminServices(0, &messageServiceAdministration.p);
>> > CComPtr<IMAPITable> table;
>> > messageServiceAdministration.GetMessageServiceTable(0, &table.p);
>> > MAPIUID uid = ...; // the uid in the table with PR_SERVICE_NAME =
>> > 'MSEMS'
>> > CComPtr<IProviderAdmin> providerAdmin;
>> > HRESULT hr = messageServiceAdministration->AdminProviders(&uid, 0,
>> > &providerAdmin.p); // hr has the value 0x80010104
>> >
>


Re: IMsgServiceAdmin::AdminProviders fails with 0x80010104
"Lars Iversen" <lars.iver[ at ]gmail.com> 8/23/2006 1:10:28 PM
Thanks for the answer. Moving it to an in-proc dll is probably not an
option right now, but it is nice to know that it will be fixed in the
next version of Outlook.

Nice having you around!

Regards,
Lars

Dmitry Streblechenko wrote:
[Quoted Text]
> Try to move the implementation to a dll to make sure it is loaded in-proc:
> IMAPISession has a few bugs when it comes to marshalling - profile sections
> and ACLs are the two major problems (to be fixed in Outlook 2007).
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
> news:1156312857.862892.233300[ at ]m73g2000cwd.googlegroups.com...
> > It is implemented in a separate exe.
> >
> > Dmitry Streblechenko wrote:
> >> Is your form implemented in a separate exe or a dll?
> >>
> >> Dmitry Streblechenko (MVP)
> >> http://www.dimastr.com/
> >> OutlookSpy - Outlook, CDO
> >> and MAPI Developer Tool
> >>
> >> "Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
> >> news:1156255582.243789.265590[ at ]74g2000cwt.googlegroups.com...
> >> > Hi.
> >> >
> >> > I take part in developing an exchange client extension for Outlook
> >> > based on extended MAPI. The application extends Outlook with commands,
> >> > a new message class and a form, uses advise sinks to listen to folders
> >> > for events, adds and removes message stores from the profile, etc. I
> >> > use VS2005 on different platforms.
> >> >
> >> > Inside my implementation of IExchExt::Install, the extension accesses
> >> > the (outlook) profile, and adds and removes message stores as described
> >> > in http://support.microsoft.com/?kbid=171636. No problem, works fine.
> >> >
> >> > However, when I try to access the profile in much the same way (just
> >> > for reading purposes) from my implementation of
> >> > IPersistMessage::InitNew, it fails. More specifically,
> >> > IMsgServiceAdmin::AdminProviders returns 0x80010104 (RPC could not call
> >> > the server or could not return the result of calling the server). I
> >> > have included pseudo code below. Any clue of what is going wrong?
> >> >
> >> > Regards,
> >> > Lars
> >> >
> >> > STDMETHODIMP MyForm::InitNew(IMAPIMessageSite* site, IMessage*)
> >> > {
> >> > CComPtr<IMAPISession> session;
> >> > site->GetSession(&session.p);
> >> > CComPtr<IMsgServiceAdmin> messageServiceAdministration;
> >> > session->AdminServices(0, &messageServiceAdministration.p);
> >> > CComPtr<IMAPITable> table;
> >> > messageServiceAdministration.GetMessageServiceTable(0, &table.p);
> >> > MAPIUID uid = ...; // the uid in the table with PR_SERVICE_NAME =
> >> > 'MSEMS'
> >> > CComPtr<IProviderAdmin> providerAdmin;
> >> > HRESULT hr = messageServiceAdministration->AdminProviders(&uid, 0,
> >> > &providerAdmin.p); // hr has the value 0x80010104
> >> >
> >

Re: IMsgServiceAdmin::AdminProviders fails with 0x80010104
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 8/23/2006 5:05:54 PM
I obviously don't know how your code is structured, but you can combine the
ECE and the custom form implementation in the same dll. One less executable,
plus you can easily make the ECE and the MAPI form parts to interact with
each other through the global variables.

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

"Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
news:1156338628.878599.38060[ at ]p79g2000cwp.googlegroups.com...
[Quoted Text]
> Thanks for the answer. Moving it to an in-proc dll is probably not an
> option right now, but it is nice to know that it will be fixed in the
> next version of Outlook.
>
> Nice having you around!
>
> Regards,
> Lars
>
> Dmitry Streblechenko wrote:
>> Try to move the implementation to a dll to make sure it is loaded
>> in-proc:
>> IMAPISession has a few bugs when it comes to marshalling - profile
>> sections
>> and ACLs are the two major problems (to be fixed in Outlook 2007).
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
>> news:1156312857.862892.233300[ at ]m73g2000cwd.googlegroups.com...
>> > It is implemented in a separate exe.
>> >
>> > Dmitry Streblechenko wrote:
>> >> Is your form implemented in a separate exe or a dll?
>> >>
>> >> Dmitry Streblechenko (MVP)
>> >> http://www.dimastr.com/
>> >> OutlookSpy - Outlook, CDO
>> >> and MAPI Developer Tool
>> >>
>> >> "Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
>> >> news:1156255582.243789.265590[ at ]74g2000cwt.googlegroups.com...
>> >> > Hi.
>> >> >
>> >> > I take part in developing an exchange client extension for Outlook
>> >> > based on extended MAPI. The application extends Outlook with
>> >> > commands,
>> >> > a new message class and a form, uses advise sinks to listen to
>> >> > folders
>> >> > for events, adds and removes message stores from the profile, etc. I
>> >> > use VS2005 on different platforms.
>> >> >
>> >> > Inside my implementation of IExchExt::Install, the extension
>> >> > accesses
>> >> > the (outlook) profile, and adds and removes message stores as
>> >> > described
>> >> > in http://support.microsoft.com/?kbid=171636. No problem, works
>> >> > fine.
>> >> >
>> >> > However, when I try to access the profile in much the same way (just
>> >> > for reading purposes) from my implementation of
>> >> > IPersistMessage::InitNew, it fails. More specifically,
>> >> > IMsgServiceAdmin::AdminProviders returns 0x80010104 (RPC could not
>> >> > call
>> >> > the server or could not return the result of calling the server). I
>> >> > have included pseudo code below. Any clue of what is going wrong?
>> >> >
>> >> > Regards,
>> >> > Lars
>> >> >
>> >> > STDMETHODIMP MyForm::InitNew(IMAPIMessageSite* site, IMessage*)
>> >> > {
>> >> > CComPtr<IMAPISession> session;
>> >> > site->GetSession(&session.p);
>> >> > CComPtr<IMsgServiceAdmin> messageServiceAdministration;
>> >> > session->AdminServices(0, &messageServiceAdministration.p);
>> >> > CComPtr<IMAPITable> table;
>> >> > messageServiceAdministration.GetMessageServiceTable(0, &table.p);
>> >> > MAPIUID uid = ...; // the uid in the table with PR_SERVICE_NAME =
>> >> > 'MSEMS'
>> >> > CComPtr<IProviderAdmin> providerAdmin;
>> >> > HRESULT hr = messageServiceAdministration->AdminProviders(&uid, 0,
>> >> > &providerAdmin.p); // hr has the value 0x80010104
>> >> >
>> >
>


Re: IMsgServiceAdmin::AdminProviders fails with 0x80010104
"Lars Iversen" <lars.iver[ at ]gmail.com> 8/24/2006 6:37:54 AM
That is clearly the way I want to go, but the product I am developing
is more than 10 years old, thus it is not a trivial task. I hope to get
there and to get rid of a lot of problems related to having several
processes.

Dmitry Streblechenko wrote:
[Quoted Text]
> I obviously don't know how your code is structured, but you can combine the
> ECE and the custom form implementation in the same dll. One less executable,
> plus you can easily make the ECE and the MAPI form parts to interact with
> each other through the global variables.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
> news:1156338628.878599.38060[ at ]p79g2000cwp.googlegroups.com...
> > Thanks for the answer. Moving it to an in-proc dll is probably not an
> > option right now, but it is nice to know that it will be fixed in the
> > next version of Outlook.
> >
> > Nice having you around!
> >
> > Regards,
> > Lars
> >
> > Dmitry Streblechenko wrote:
> >> Try to move the implementation to a dll to make sure it is loaded
> >> in-proc:
> >> IMAPISession has a few bugs when it comes to marshalling - profile
> >> sections
> >> and ACLs are the two major problems (to be fixed in Outlook 2007).
> >>
> >> Dmitry Streblechenko (MVP)
> >> http://www.dimastr.com/
> >> OutlookSpy - Outlook, CDO
> >> and MAPI Developer Tool
> >>
> >> "Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
> >> news:1156312857.862892.233300[ at ]m73g2000cwd.googlegroups.com...
> >> > It is implemented in a separate exe.
> >> >
> >> > Dmitry Streblechenko wrote:
> >> >> Is your form implemented in a separate exe or a dll?
> >> >>
> >> >> Dmitry Streblechenko (MVP)
> >> >> http://www.dimastr.com/
> >> >> OutlookSpy - Outlook, CDO
> >> >> and MAPI Developer Tool
> >> >>
> >> >> "Lars Iversen" <lars.iver[ at ]gmail.com> wrote in message
> >> >> news:1156255582.243789.265590[ at ]74g2000cwt.googlegroups.com...
> >> >> > Hi.
> >> >> >
> >> >> > I take part in developing an exchange client extension for Outlook
> >> >> > based on extended MAPI. The application extends Outlook with
> >> >> > commands,
> >> >> > a new message class and a form, uses advise sinks to listen to
> >> >> > folders
> >> >> > for events, adds and removes message stores from the profile, etc. I
> >> >> > use VS2005 on different platforms.
> >> >> >
> >> >> > Inside my implementation of IExchExt::Install, the extension
> >> >> > accesses
> >> >> > the (outlook) profile, and adds and removes message stores as
> >> >> > described
> >> >> > in http://support.microsoft.com/?kbid=171636. No problem, works
> >> >> > fine.
> >> >> >
> >> >> > However, when I try to access the profile in much the same way (just
> >> >> > for reading purposes) from my implementation of
> >> >> > IPersistMessage::InitNew, it fails. More specifically,
> >> >> > IMsgServiceAdmin::AdminProviders returns 0x80010104 (RPC could not
> >> >> > call
> >> >> > the server or could not return the result of calling the server). I
> >> >> > have included pseudo code below. Any clue of what is going wrong?
> >> >> >
> >> >> > Regards,
> >> >> > Lars
> >> >> >
> >> >> > STDMETHODIMP MyForm::InitNew(IMAPIMessageSite* site, IMessage*)
> >> >> > {
> >> >> > CComPtr<IMAPISession> session;
> >> >> > site->GetSession(&session.p);
> >> >> > CComPtr<IMsgServiceAdmin> messageServiceAdministration;
> >> >> > session->AdminServices(0, &messageServiceAdministration.p);
> >> >> > CComPtr<IMAPITable> table;
> >> >> > messageServiceAdministration.GetMessageServiceTable(0, &table.p);
> >> >> > MAPIUID uid = ...; // the uid in the table with PR_SERVICE_NAME =
> >> >> > 'MSEMS'
> >> >> > CComPtr<IProviderAdmin> providerAdmin;
> >> >> > HRESULT hr = messageServiceAdministration->AdminProviders(&uid, 0,
> >> >> > &providerAdmin.p); // hr has the value 0x80010104
> >> >> >
> >> >
> >

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net