Hi Primpilus,
Did the sample work on your side?
Based on my research, after you download the sample and install it.
There will be a Microsoft.Exchange.Transport.EventInterop.snk file in the
directory below.
<Program Files>\Exchange SDK\ManagedSinksWP\Interop
Also there will be a Writing Managed Sinks for SMTP and Transport
Events.doc file in the directory below, you may try to follow the steps in
the doc file to build the wrapped assembly.
C:\Program Files\Exchange SDK\ManagedSinksWP
<quote>
To build the interop
1. From a command prompt, run \Program Files\Microsoft Visual Studio
.NET\Common7\Tools\vsvars32.bat.
2. Run nmake.exe from the directory of the interop
(\ManagedSinksWP\Interop).
//this will build a Microsoft.Exchange.Transport.EventInterop.dll in the
C:\Program Files\Exchange SDK\ManagedSinksWP\Interop\obj
To build the wrappers
1. Copy the interop DLL (Microsoft.Exchange.Transport.EventInterop.dll) to
the wrappers directory (\ManagedSinksWP\Wrappers).
2. In the same environment as the interop, run the following from the
wrappers directory:
csc /t:library /out:Microsoft.Exchange.Transport.EventWrappers.dll
/r:Microsoft.Exchange.Transport.EventInterop.dll *.cs /unsafe
</quote>
Writing managed sinks can be somewhat difficult, however, because event
sink interfaces were designed primarily for C++ programmers and are
therefore not very easy to use in a language such as C#. In addition, some
of the methods that are imported using Tlbimp.exe will not work unless they
are modified at the intermediate language (IL) level. However, these
inconsistencies in the imported assemblies have been fixed in the events'
primary interop assembly (PIA) provided, and other interfaces that were
inconvenient to use have also been wrapped so that they are easier to use
from managed code.
So we need to use the nmake command to build the
Microsoft.Exchange.Transport.EventInterop.dll.
You may have a try and let me know the result.
BTW, I have tried the sample which works well on my side by following the
steps in the doc above.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.