View Single Post
  #3  
Old July 17th 08, 08:00 PM posted to microsoft.public.outlook.program_addins
Johan Machielse[_2_]
external usenet poster
 
Posts: 11
Default C# Error when calling MAPI.Session.Logon()

Ken,

thank you for your quick answer, but now if you want to create an add-in for
Outlook 2003/2007 which changes the color labels of the appointments in a
calendar, what is than the best way to solve this (I want to use .NET to
create the plug-in, but CDO 1.21 is not supported...)?

Thank you in advance,

Johan Machielse
Avanade



"Ken Slovak - [MVP - Outlook]" wrote:

First of all CDO 1.21 is not supported for use with any managed code, so if
it doesn't work then you won't get any help.

That said, you could try using null strings instead of null for the first 2
arguments to Logon().

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Johan Machielse" Johan wrote in
message ...
Dear reader,

See next piece of code (written in C#):

MAPI.Session mapiSession = new MAPI.Session();
mapiSession.Logon(null, null, false, false, 0, false, "");

The call mapiSession.Logon() throws the following exception:
[Collaboration Data Objects - [E_INVALIDARG(80070057)]

What can I do to solve this problem; which arguments do I have to pass?

Thank you in advance,

Johan Machielse
Avanade




Ads