problem compiling Managed Sink Wrapper for SMTP
- From: "Joel Aufgang" <aufgang@xxxxxxxxx>
- Date: Tue, 12 Apr 2005 16:19:05 -0400
(I've already posted wthis question to
microsoft.public.inetserver.iis.smtp_nntp, but i
think that perhaps this is a more approprite group for me to get a
response.)
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
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:
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.
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: Excel 2003 PIA not working right on non-developer PC
- Next by Date: adsi pia
- Previous by thread: Need help!!!System.InvalidCastException: QueryInterface for interf
- Next by thread: adsi pia
- Index(es):
Relevant Pages
|