repost: problem compiling Managed Sink Wrapper for SMTP
- From: Joel Aufgang <JoelAufgang@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Apr 2005 15:11:11 -0700
(I'm sorry to keep posting this question, but I only just figured out that I
need to post using the web interface and logged in to my MSDN account if I
want to be guranteed a response by Microsoft.. My previous posting was
through outlook)
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(uint, 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.
.
- Follow-Ups:
- RE: repost: problem compiling Managed Sink Wrapper for SMTP
- From: David A. Coursey
- RE: repost: problem compiling Managed Sink Wrapper for SMTP
- Prev by Date: RE: sink event firing again and again
- Next by Date: Re: WEBDAV and webservices
- Previous by thread: problem compiling Managed Sink Wrapper for SMTP
- Next by thread: RE: repost: problem compiling Managed Sink Wrapper for SMTP
- Index(es):
Relevant Pages
|