problem compiling Managed Sink Wrapper for SMTP
- From: "Joel Aufgang" <aufgang@xxxxxxxxx>
- Date: Thu, 14 Apr 2005 16:17:07 -0400
(I've already posted wthis question to a couple of other newsgroups but have
not had any luck recieving any responses. Perhaps ths is where is should
have posted in the first place.)
Our team needs to recieve SMTP mail from within a C# app, so we took the
approach described in the MSDN article "Writing Managed Sinks for SMTP and
Transport Events" at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsmtps/html/writingmngsinks.asp
After downloading the sample code and building the interop assembly as
described in the article, we then went to build the C# code for the managed
wrapper. Unfortunaltely this resulted in compiler errors due to some
datatype mismatches in the calls from the wrapper class to the interop DLL.
For example, the one of the wrapper classes (MailMsgPropertyBagWrapper.cs,
line 245) includes the following call:
hr = propBag.GetProperty(propId, 1, ref size, buffer);
where buffer is declared as an IntPtr. This line generates the following
compiler error:
The best overloaded method match for
'Microsoft.Exchange.Transport.EventInterop.IMailMsgPropertyBag.GetProperty(u
int, uint, out uint, out byte)' has some invalid arguments:
Argument '3': cannot convert from 'ref uint' to 'out uint'
Argument '4': cannot convert from 'System.IntPtr' to 'out byte'
There are about 20 similar errors generated when I compile the wrapper code.
Why is the wrapper using the wrong parameter types here? Is there something
wrong with the interop dll, or the wrapper code? All we're tryhing to do is
compile code downloaded from MSDN and we've followed the instructions step
by step, so we dont understand why this isnt working.
Is there anywhere I can just download a compiled managed wrapper assembly
and not have to deal with building it myself? Is there an easier way to
recieve SMTP mail within a C# app?
Any help or advice would be appreciated.
Thanks,
Joel.
.
- Prev by Date: Re: how to identify an attachment in CDOEX
- Next by Date: RE: cannot delete a sink event
- Previous by thread: WEBDAV and webservices
- Next by thread: repost: problem compiling Managed Sink Wrapper for SMTP
- Index(es):
Relevant Pages
|