I'm a complete programming novice, so apologies in advance ;)

I'm trying to design a simple app to take user input from a textbox (in this case, Outlook EntryID - a hexadecimal string) and use Redemption.DLL to return a set of MAPI properties from the container.

The button and general UI design isn't really a problem, but the whole 'concept' of importing a DLL is new to me as I only have experience with very basic scripting (QBASIC).

The step-by, based on what I've read is as follows :

1. install / register DLL (ahem)
2. add reference to DLL from within Visual Studio
3. then ...

do I
a) need to create / add reference to an interop DLL
b) or can I simply begin 'using' Outlook Redemption

the code snippet below comes from dimastr.com :

set Session = CreateObject("Redemption.RDOSession")
set Inbox = Session.GetDefaultFolder(olFolderInbox)
for each Msg in Inbox.Items

How does the above translate into C#, and where would it fit into the (very basic shell of an) application?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
    public partial class Form1 : Form
        public Form1()

        private void button1_Click(object sender, EventArgs e)


        private void txtInput_TextChanged(object sender, EventArgs e)


Any assistance will be genuinely appreciated.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.