<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re : IMessageFilter not triggering in custom DLLs in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/imessagefilter-not-triggering-in-custom-dlls/m-p/5766079#M39026</link>
    <description>&lt;P&gt;The app is not a console app. &amp;nbsp;My only thought is that there is a problem because all of the cad automation is happening through a DLL reference of our own making. &amp;nbsp;Because the CAD automation is in the DLL, so is the IMessageFilter code.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2015 14:53:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-11T14:53:35Z</dc:date>
    <item>
      <title>IMessageFilter not triggering in custom DLLs</title>
      <link>https://forums.autodesk.com/t5/net-forum/imessagefilter-not-triggering-in-custom-dlls/m-p/5764081#M39024</link>
      <description>&lt;P&gt;I'm trying to understand why IMessageFilter might not be working in my custom DLLs - I'm gettng all sorts of errors telling me that AutoCAD is busy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically my setup is that I have a business application utility. &amp;nbsp;This utility calls our own custom DLL, at one point, in order to automate AutoCAD and read drawing information -- i.e. it contains&amp;nbsp;methods for opening AutoCAD, and executing other AutoCAD related functions using COM. &amp;nbsp;The classes in the DLL Implement ImessageFilter (pretty much the method used here: &amp;nbsp;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2010/02/handling-com-calls-rejected-by-autocad-from-an-external-net-application.html)" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2010/02/handling-com-calls-rejected-by-autocad-from-an-external-net-application.html)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If AutCAD is not open, it opens it ---note that I haven't had the error&amp;nbsp;problems if the target drawing is already open, probably because AutoCAD isn't running any threads at that point; also note that when it opens a drawing and/or AutoCAD,&amp;nbsp;our AutoCAD has both lisp and .Net startup routines, so it's probably running a couple threads in addition to the native startup ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically my problem is that IMessageFilter does not appear to be triggering in the DLLs at all. &amp;nbsp;It may be possible that IMessageFilter is running in a couple tiers at times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone has seen this behavior and might know it's cause, any feedback is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2015 14:11:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/imessagefilter-not-triggering-in-custom-dlls/m-p/5764081#M39024</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-10T14:11:06Z</dc:date>
    </item>
    <item>
      <title>Re : IMessageFilter not triggering in custom DLLs</title>
      <link>https://forums.autodesk.com/t5/net-forum/imessagefilter-not-triggering-in-custom-dlls/m-p/5765486#M39025</link>
      <description>&lt;P&gt;If your utility is a console app, it's running in a multithreaded apartment (MTA) and this kind of application cannot have message filters. You have to add&amp;nbsp;the STAThread attribute on your Main method to tell the CLR to run your application in this kind of apartment. In the post of Kean, there is a comment about that :&amp;nbsp;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2010/02/handling-com-calls-rejected-by-autocad-from-an-external-net-application.html#comment-1292061209" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2010/02/handling-com-calls-rejected-by-autocad-from-an-external-net-application.html#comment-1292061209&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also read this :&amp;nbsp;&lt;A href="http://infosys.beckhoff.com/english.php?content=../content/1033/tc3_automationinterface/54043195771173899.html&amp;amp;id=" target="_blank"&gt;http://infosys.beckhoff.com/english.php?content=../content/1033/tc3_automationinterface/54043195771173899.html&amp;amp;id=&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 08:49:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/imessagefilter-not-triggering-in-custom-dlls/m-p/5765486#M39025</guid>
      <dc:creator>FRFR1426</dc:creator>
      <dc:date>2015-08-11T08:49:00Z</dc:date>
    </item>
    <item>
      <title>Re : IMessageFilter not triggering in custom DLLs</title>
      <link>https://forums.autodesk.com/t5/net-forum/imessagefilter-not-triggering-in-custom-dlls/m-p/5766079#M39026</link>
      <description>&lt;P&gt;The app is not a console app. &amp;nbsp;My only thought is that there is a problem because all of the cad automation is happening through a DLL reference of our own making. &amp;nbsp;Because the CAD automation is in the DLL, so is the IMessageFilter code.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 14:53:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/imessagefilter-not-triggering-in-custom-dlls/m-p/5766079#M39026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-11T14:53:35Z</dc:date>
    </item>
  </channel>
</rss>

