473,386 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ho to add reference to MAPI?

I tried to browse and add mapi32.dll (system32/mapi32.dll) but it
returns an error that the reference could not be added.

Any suggestions?
Jan 29 '08 #1
6 9716
Walter,

MAPI32 exposes functions, so you can't add a reference. You will need
to figure out which functions you want to call, and then declare the
functions to call through the P/Invoke layer.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Walter Sobchak" <wa****@yahoo.comwrote in message
news:fn**********@news.metronet.hr...
>I tried to browse and add mapi32.dll (system32/mapi32.dll) but it returns
an error that the reference could not be added.

Any suggestions?

Jan 29 '08 #2
MAPI32 exposes functions, so you can't add a reference. You will need
to figure out which functions you want to call, and then declare the
functions to call through the P/Invoke layer.
Note also that MAPI does not with With Windows MAIL so it cannot be used in
Vista.

Andrus.
Jan 29 '08 #3
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:%2****************@TK2MSFTNGP03.phx.gbl...
Walter,

MAPI32 exposes functions, so you can't add a reference. You will need
to figure out which functions you want to call, and then declare the
functions to call through the P/Invoke layer.
Use http://www.pinvoke.net as a starting point.

Jan 29 '08 #4
Hi,

MAPI is a native dll, you can only add references to COM dll.
You need to P/invoke the functions exported by MAPI

What are you trying to do?

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"Walter Sobchak" <wa****@yahoo.comwrote in message
news:fn**********@news.metronet.hr...
>I tried to browse and add mapi32.dll (system32/mapi32.dll) but it returns
an error that the reference could not be added.

Any suggestions?

Jan 29 '08 #5
I was stupid...
What I tried to do was find a Microsoft MAPI reference in references.
When I couldn't find it I tried with the dll.
Anyway what I want is to open the default mail client with the specified
attachement.
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

MAPI is a native dll, you can only add references to COM dll.
You need to P/invoke the functions exported by MAPI

What are you trying to do?
Jan 30 '08 #6
I found a useful articele on codeproject which works:

http://www.codeproject.com/KB/IP/SendFileToNET.aspx


Walter Sobchak wrote:
I was stupid...
What I tried to do was find a Microsoft MAPI reference in references.
When I couldn't find it I tried with the dll.
Anyway what I want is to open the default mail client with the specified
attachement.
Ignacio Machin ( .NET/ C# MVP ) wrote:
>Hi,

MAPI is a native dll, you can only add references to COM dll.
You need to P/invoke the functions exported by MAPI

What are you trying to do?
Jan 30 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Siegfried Heintze | last post by:
Does the Outlook API supersede MAPI? If I implement a SPAM filter using MAPI to automatically delete messages from the message store, will other clients like Eudora benefit? If I implement a...
4
by: Kurt | last post by:
Hi I am using CDO 1.21 from C# in order to iterate through the entries in a users outlook address book (as OOM was too slow). Basically I take the Name field from each "message" and insert it into...
5
by: eadams | last post by:
I've been tasked with writing an application in VB.Net that will manipulate messages in a user's Inbox. My Exchange admin prefers that I use MAPI; I don't really care, but I want this to be as...
7
by: Ottar | last post by:
I've made a program sorting incomming mail in public folder. The function runs every minute by using the form.timer event. In Access XP it runs for weeks, no problem. Access 2003 runs the same...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
2
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a...
1
by: netLynx | last post by:
Hi, I am rewriting code from VB6 using MAPI into VB.NET I need to read an attachment off an email on an Exchange Server. In the old VB6 (not written by me) they restrict the Messages.type to...
3
by: toyaxxx | last post by:
Hello guys, I have hit a dead end in trying to solve this problem. The thing is, I can't run the the program here because it has to run on a server which is in another place. All I receive here is...
1
by: ShwetaJain | last post by:
Hi i m getting error "mscorlib object reference not set to an instance of an object" in my programming when i am trying to retrieve the sender name or recipient name from folders in MAPI with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.