MAPI and upgrading vb

MAPI and upgrading vb

Post by Rob » Sat, 12 Apr 2003 16:32:08



I have a vb6.0 project that I am trying to load in VS.NET. When I open the
project it tells me I need to upgrade it. When it tries to upgrade I get the
following error.

Upgrade failed: Exception occured: The referenced componants
MAPIMessage
MAPISession
CommonDialog
are missing design time licenses.

Am I missing some SDK?

Rob

 
 
 

MAPI and upgrading vb

Post by Rupen Pate » Wed, 16 Apr 2003 06:41:46


I maybe mistaken, but I don't think you can load a vb6 project directly into
VS.NET.  Here is some sample C# sample code to get you started (given a
choice, I don't do VB, so you'll have to convert it yourself):

In the Solutions Explorer - Click References->Add Reference, select the COM
tab, and then find and select Microsoft CDO 1.21 Libarary.

If you can find 'CDO 1.21 Libarary', run the Outlook installer and install
it.  It is an optional component.

You should now see MAPI, listed in your References.

------
using System;
using System.Reflection;
using System.Text;

using MAPI;

namespace cdoTest
{

 public class cdo
 {
  protected StringBuilder sProfileInfo;
  protected Session oSession = null;
  protected AppointmentItem appItem;

  public cdo()
  {
   sProfileInfo = new StringBuilder();
   sProfileInfo.Append ("YOURSERVER\nUserAlias");
   oSession = new Session();
   oSession.Logon ("", "", false, true, 0, true, sProfileInfo.ToString());
  }

    public void doSomething()
    {
//        oSession.AddressLists("Global Address Lists");
//        ...
        System.Console.Out.WriteLine("Do other MAPI Stuff");
        }
    }

    class Class1
    {
        [STAThread]
        static void Main(string[] args)
        {
            cdo c = new cdo();
            c.doSomething();
        }
    }

}



Quote:> I have a vb6.0 project that I am trying to load in VS.NET. When I open the
> project it tells me I need to upgrade it. When it tries to upgrade I get
the
> following error.

> Upgrade failed: Exception occured: The referenced componants
> MAPIMessage
> MAPISession
> CommonDialog
> are missing design time licenses.

> Am I missing some SDK?

> Rob


 
 
 

1. VB Pro: How many books in VB Pro 2.0 upgrade?

Could anybody who upgrade his VB Pro from 1.0 to 2.0 please tell me how
many books(manuals) in the VB Pro 2.0 upgrade kit?

Thank you very much!!

--
===============================================================================
Yu-Fu Wu                                          National Tsing-Hua University

                                                                  Hsin-Chu City
Like MS Visual Basic most!                                          Taiwan, ROC
===============================================================================

2. Caption buttons

3. vb 6 to vb .net: cannot upgrade an user control project!

4. Printer setup

5. MS's (VB) MAPI Controls - Simple or Extended MAPI?

6. QTVR in FP2000

7. Upgrading TAPI without upgrading NT

8. Will using MSN 7.0 negate my POP3 mail from MSN?

9. Upgrading a sample TAPI 3 application to VB.NET

10. Upgrading from vb 3.0 to vb5.0

11. VB 5 upgrade to .Net

12. VB Upgrade

13. VB .NET Upgrade guide on MS site