Argh, this is killing me. I reformatted my dev server because I wanted to try my event sink without having Exchange installed and I can't get it to register again. Unfortunately I did not write down how I did it last time. The sink is the OnTransportSubmission kind 1. The VS2005 project has Register for COM interop and ComVisible both set to true. 2. I ran the regasm tool RegAsm.exe Microsoft.Exchange.Transport.EventWrappers.dll /codebase RegAsm.exe Microsoft.Exchange.Transport.EventInterop.dll /codebaseRegAsm.exe RegAsm.exe MyLib.dll /tlb: MyLib.tlb /codebase When I run RegAsm.exe MyLib.dll /tlb: MyLib.tlb /codebase I get this error message: Types registered successfully Type library exporter warning: Referenced type is defined in managed component, which is imported from a type library that could not be loaded because it was not registered (type: 'Microsoft.Exchange.Transport.EventInterop.IMailTransportSubmission'; component: 'C:\SMTPSinks\FileSink\Microsoft.Exchange.Transport.EventInterop.dll'). Type library exporter warning: Referenced type is defined in managed component, which is imported from a type library that could not be loaded because it was not registered (type: 'Microsoft.Exchange.Transport.EventInterop.IEventIsCacheable'; component: 'C:\SMTPSinks\FileSink\Microsoft.Exchange.Transport.EventInterop.dll'). Type library exporter warning: Referenced type is defined in managed component, which is imported from a type library that could not be loaded because it was not registered (type: 'Microsoft.Exchange.Transport.EventInterop.IMailMsgNotify'; component: 'C:\SMTPSinks\FileSink\Microsoft.Exchange.Transport.EventInterop.dll'). Assembly exported to 'C:\SMTPSinks\FileSink\ExgEventSink2.tlb', and the type library was registered successfully I also am getting this same warning in VS, but I don't understand why. Thanks dave
It sounds like this is to do with the dependencies have a look at http://www.ssw.com.au/SSW/KB/KB.aspx?KBID=Q1144956 which seems to answer you question. Cheers Glen "David A. Coursey" wrote in message news:A72742DB-6772-419F-8F4E-7761A3BD312D@microsoft.com... > Argh, this is killing me. I reformatted my dev server because I wanted to > try my event sink without having Exchange installed and I can't get it to > register again. Unfortunately I did not write down how I did it last > time. > The sink is the OnTransportSubmission kind > > 1. The VS2005 project has Register for COM interop and ComVisible both > set > to true. > 2. I ran the regasm tool > RegAsm.exe Microsoft.Exchange.Transport.EventWrappers.dll /codebase > RegAsm.exe Microsoft.Exchange.Transport.EventInterop.dll > /codebaseRegAsm.exe > RegAsm.exe MyLib.dll /tlb: MyLib.tlb /codebase > > When I run RegAsm.exe MyLib.dll /tlb: MyLib.tlb /codebase I get this > error > message: > > Types registered successfully > Type library exporter warning: Referenced type is defined in managed > component, which is imported from a type library that could not be loaded > because it was not registered (type: > 'Microsoft.Exchange.Transport.EventInterop.IMailTransportSubmission'; > component: > 'C:\SMTPSinks\FileSink\Microsoft.Exchange.Transport.EventInterop.dll'). > Type library exporter warning: Referenced type is defined in managed > component, which is imported from a type library that could not be loaded > because it was not registered (type: > 'Microsoft.Exchange.Transport.EventInterop.IEventIsCacheable'; component: > 'C:\SMTPSinks\FileSink\Microsoft.Exchange.Transport.EventInterop.dll'). > Type library exporter warning: Referenced type is defined in managed > component, which is imported from a type library that could not be loaded > because it was not registered (type: > 'Microsoft.Exchange.Transport.EventInterop.IMailMsgNotify'; component: > 'C:\SMTPSinks\FileSink\Microsoft.Exchange.Transport.EventInterop.dll'). > Assembly exported to 'C:\SMTPSinks\FileSink\ExgEventSink2.tlb', and the > type > library was registered successfully > > > I also am getting this same warning in VS, but I don't understand why. > > Thanks > dave >
I think this is on the right track, but not quite right. I opened my dll and the interop dll's in depends.exe and there is only one warning, for mpr.dll: At least one module has an unresolved import due to a missing export function in a delao-load module. My dll doesn't even show those exchange dll's as dependencies. Also, I don't get compile errors in VS, just warnings. Could this be a form of dll-hell? dave "Glen Scales [MVP]" wrote: > It sounds like this is to do with the dependencies have a look at > http://www.ssw.com.au/SSW/KB/KB.aspx?KBID=Q1144956 which seems to answer you > question. > > Cheers > Glen
Actually on second inspection that looks like it refers to Store event sinks. Exchange extends the base Microsoft Windows server operating systemsSMTP protocol engine so maybe there are some differences in the underlying dll's and interfaces that could be effecting this (probably because there are extra things added into the interop that aren't need when exchange isn't installed). Could also be VS 2005 / .net 2.0 issue have you tried this with 2003 / 1.x Cheers Glen "David A. Coursey" wrote in message news:FEB3DE59-B0E6-4ED5-A867-547BC2239443@microsoft.com... >I think this is on the right track, but not quite right. I opened my dll >and > the interop dll's in depends.exe and there is only one warning, for > mpr.dll: > At least one module has an unresolved import due to a missing export > function > in a delao-load module. My dll doesn't even show those exchange dll's as > dependencies. Also, I don't get compile errors in VS, just warnings. > > Could this be a form of dll-hell? > > dave > > > "Glen Scales [MVP]" wrote: > >> It sounds like this is to do with the dependencies have a look at >> http://www.ssw.com.au/SSW/KB/KB.aspx?KBID=Q1144956 which seems to answer >> you >> question. >> >> Cheers >> Glen >
Sometimes it seems like a VS/2.0 problem, but I had it working a week ago and my development workstation hasn't changed. All I did was reformat the dev smtp server. I have another server that has Exchange 2003 installed and I get the same error. Yesterday I rebuilt my solution from scratch with a new name and copied all the code over. I still get the same error, but only once now instead of three times - for the IMailMsgNotify section. Thanks again dave "Glen Scales [MVP]" wrote: > Actually on second inspection that looks like it refers to Store event > sinks. Exchange extends the base Microsoft Windows server operating > systemsSMTP protocol engine so maybe there are some differences in the > underlying dll's and interfaces that could be effecting this (probably > because there are extra things added into the interop that aren't need when > exchange isn't installed). Could also be VS 2005 / .net 2.0 issue have you > tried this with 2003 / 1.x > > Cheers > Glen
>All I did was reformat the dev > smtp server. I have another server that has Exchange 2003 installed and I > get the same error. That doesn't really make to much sense to me (your errors should be at least consistent if something is missing or wrong) it sounds like you've got more of a fundamental problem (eg something small at the start of the process has been changed and now it affecting everything at the end). The only thing I can really suggest is you start to backtrack to where it did work (this is why backups and versioning is extremely important) then try to go forward from there. Sorry if that's not much help Cheers Glen "David A. Coursey" wrote in message news:B58E1949-BB95-4345-A5E8-EFC231DFC1CB@microsoft.com... > Sometimes it seems like a VS/2.0 problem, but I had it working a week ago > and > my development workstation hasn't changed. All I did was reformat the dev > smtp server. I have another server that has Exchange 2003 installed and I > get the same error. > > Yesterday I rebuilt my solution from scratch with a new name and copied > all > the code over. I still get the same error, but only once now instead of > three times - for the IMailMsgNotify section. > > Thanks again > dave > > "Glen Scales [MVP]" wrote: > >> Actually on second inspection that looks like it refers to Store event >> sinks. Exchange extends the base Microsoft Windows server operating >> systemsSMTP protocol engine so maybe there are some differences in the >> underlying dll's and interfaces that could be effecting this (probably >> because there are extra things added into the interop that aren't need >> when >> exchange isn't installed). Could also be VS 2005 / .net 2.0 issue have >> you >> tried this with 2003 / 1.x >> >> Cheers >> Glen >