PC Review


Reply
Thread Tools Rate Thread

C# 2.0 MAPI wrapper

 
 
=?Utf-8?B?R29uem8gTmV0?=
Guest
Posts: n/a
 
      24th Feb 2006
Has anyone got 2.0 C# working with MAPI and CDO. I can get it to work
with VB but not C#. Here is a sample of VB code:

Imports MAPI
Imports MAPI.CdoDefaultFolderTypes
______________________________________
Dim CdoMessages As MAPI.Messages
Dim cdoSession As MAPI.Session
Dim CdoFolder As Folder
Dim CdoMessage As MAPI.Message

cdoSession = New MAPI.Session
cdoSession.Logon("bomcng", , False, True)
CdoFolder = cdoSession.GetDefaultFolder(CdoDefaultFolderInbox)
CdoMessages = CdoFolder.Messages

Does anyone have a working comparable code snippet for C#?

Larry Jones

 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      24th Feb 2006
You're ahead of me. I have plenty of failures trying to use CDO 1.21 in VB.Net in VS 2005. Bottom line is that it's unsupported. Your mileage may vary.

If you want input on your C# approach, though, I'd suggest that you post the code that you've tried and point out what didn't seem to work.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Gonzo Net" <Gonzo (E-Mail Removed)> wrote in message news:C0218A25-67F9-43F1-AF63-(E-Mail Removed)...
> Has anyone got 2.0 C# working with MAPI and CDO. I can get it to work
> with VB but not C#. Here is a sample of VB code:
>
> Imports MAPI
> Imports MAPI.CdoDefaultFolderTypes
> ______________________________________
> Dim CdoMessages As MAPI.Messages
> Dim cdoSession As MAPI.Session
> Dim CdoFolder As Folder
> Dim CdoMessage As MAPI.Message
>
> cdoSession = New MAPI.Session
> cdoSession.Logon("bomcng", , False, True)
> CdoFolder = cdoSession.GetDefaultFolder(CdoDefaultFolderInbox)
> CdoMessages = CdoFolder.Messages
>
> Does anyone have a working comparable code snippet for C#?
>
> Larry Jones
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple MAPI vs Extended MAPI mephisties Microsoft Outlook Discussion 2 27th May 2008 09:46 AM
Giving one managed wrapper class access to the unmanged part of another managed wrapper class mschuck Microsoft VC .NET 1 31st Aug 2006 05:27 PM
wrapper for API cody@garcia-co.com Microsoft C# .NET 1 20th Jul 2006 05:06 PM
Lib Wrapper RF Microsoft C# .NET 1 14th Jul 2004 10:01 PM
C++ to C# Wrapper Kuba Florczyk Microsoft VC .NET 2 7th Oct 2003 10:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:47 PM.