<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Mike Francis: My Mobile Home - SMS</title>
    <link>http://blog.mjfnet.com/Blog/</link>
    <description>focusing on mobile application development...</description>
    <image>
      <url>http://www.mjfnet.com/blog/images/mikehead.jpg</url>
      <title>Mike Francis: My Mobile Home - SMS</title>
      <link>http://blog.mjfnet.com/Blog/</link>
    </image>
    <language>en-us</language>
    <copyright>Mike Francis</copyright>
    <lastBuildDate>Wed, 11 Nov 2009 20:03:06 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>mike@mjfnet.com</managingEditor>
    <webMaster>mike@mjfnet.com</webMaster>
    <item>
      <trackback:ping>http://blog.mjfnet.com/Blog/Trackback.aspx?guid=fb694c4b-c88f-4b26-a3e7-cbe3dd0a57ac</trackback:ping>
      <pingback:server>http://blog.mjfnet.com/Blog/pingback.aspx</pingback:server>
      <pingback:target>http://blog.mjfnet.com/Blog/PermaLink,guid,fb694c4b-c88f-4b26-a3e7-cbe3dd0a57ac.aspx</pingback:target>
      <dc:creator>Mike Francis</dc:creator>
      <wfw:comment>http://blog.mjfnet.com/Blog/CommentView,guid,fb694c4b-c88f-4b26-a3e7-cbe3dd0a57ac.aspx</wfw:comment>
      <wfw:commentRss>http://blog.mjfnet.com/Blog/SyndicationService.asmx/GetEntryCommentsRss?guid=fb694c4b-c88f-4b26-a3e7-cbe3dd0a57ac</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I’ve had a couple of clients that ran into a problem where their SMS Message interceptor
would fail to fire. (For an introduction to this pretty cool technology see <a href="http://msdn.microsoft.com/en-us/library/bb932385.aspx">here</a>.)
This was a hard to track down problem, because the interceptor would work on some
devices, and the emulator, but not on a handful of devices. Because this worked on
several devices, it seemed the code was without errors. 
</p>
        <p>
We resolved this by determining if any of the existing SMS interceptors were interfering
with this one. SMS Interceptors fire in a chain with each one handing off to the next.
That is they <i>should</i> hand-off. If you are implementing a native code interceptor
using <a href="http://msdn.microsoft.com/en-us/library/bb446125.aspx">IMailRuleClient</a>,
you can stop the message processing by setting the handled flag to <b><a href="http://msdn.microsoft.com/en-us/library/bb415362.aspx">MRC_HANDLED_DONTCONTINUE</a>. </b>This
prevents any further processing of the message. However, this flag should ONLY be
used if the message you are receiving is private to your application / interceptor.
If other interceptors could possibly process the message, you should set the handled
flag to <a href="http://msdn.microsoft.com/en-us/library/bb415362.aspx">MRC_HANDLED_CONTINUE</a> or <a href="http://msdn.microsoft.com/en-us/library/bb415362.aspx">MRC_NOTHANDLED</a>.
For managed code, if you would like the message to be available to other interceptor
applications, create the <strong><a href="http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.pocketoutlook.messageinterception.messageinterceptor.aspxmsdn.microsoft.com/en-us/library/microsoft.windowsmobile.pocketoutlook.message...">MessageInterceptor</a></strong>instance
passing the InterceptionAction.Notify enumeration value to the MessageInterceptor
constructor. 
</p>
        <p>
You can test for interfering interceptors by going to [HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\SMS\Rules]
and set each rule to ‘0’ until the problem goes away. The last rule you change to
‘0’ before the problem goes away will be the problematic rule. Note that you need
to soft reset the device after changing the registry key. 
</p>
        <p>
For example:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">[HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\SMS\Rules]</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">"{27E9801F-330B-4c6a-A7BF-A670D8C53C5D}"=dword:00000001</pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">"{E85FD9C3-4F5E-4c75-8C21-0F850274DEF5}"=dword:00000001 <span style="color: #0000ff">&lt;</span>-
Change to 0 to test</pre>
            <!--CRLF-->
          </div>
        </div>
        <p>
Once you have located the problematic rule, you can get more information on it (for
example, the DLL name) by searching for the GUID underneath HKEY_CLASSES_ROOT\CLSID.
</p>
        <p>
  
</p>
        <p>
Thanks, 
</p>
        <p>
Mike 
</p>
      </body>
      <title>Windows Mobile: Problem with Message Interception failing</title>
      <guid isPermaLink="false">http://blog.mjfnet.com/Blog/PermaLink,guid,fb694c4b-c88f-4b26-a3e7-cbe3dd0a57ac.aspx</guid>
      <link>http://blog.mjfnet.com/Blog/2009/11/11/WindowsMobileProblemWithMessageInterceptionFailing.aspx</link>
      <pubDate>Wed, 11 Nov 2009 20:03:06 GMT</pubDate>
      <description>&lt;p&gt;
I’ve had a couple of clients that ran into a problem where their SMS Message interceptor
would fail to fire. (For an introduction to this pretty cool technology see &lt;a href="http://msdn.microsoft.com/en-us/library/bb932385.aspx"&gt;here&lt;/a&gt;.)
This was a hard to track down problem, because the interceptor would work on some
devices, and the emulator, but not on a handful of devices. Because this worked on
several devices, it seemed the code was without errors. 
&lt;p&gt;
We resolved this by determining if any of the existing SMS interceptors were interfering
with this one. SMS Interceptors fire in a chain with each one handing off to the next.
That is they &lt;i&gt;should&lt;/i&gt; hand-off. If you are implementing a native code interceptor
using &lt;a href="http://msdn.microsoft.com/en-us/library/bb446125.aspx"&gt;IMailRuleClient&lt;/a&gt;,
you can stop the message processing by setting the handled flag to &lt;b&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb415362.aspx"&gt;MRC_HANDLED_DONTCONTINUE&lt;/a&gt;. &lt;/b&gt;This
prevents any further processing of the message. However, this flag should ONLY be
used if the message you are receiving is private to your application / interceptor.
If other interceptors could possibly process the message, you should set the handled
flag to &lt;a href="http://msdn.microsoft.com/en-us/library/bb415362.aspx"&gt;MRC_HANDLED_CONTINUE&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/library/bb415362.aspx"&gt;MRC_NOTHANDLED&lt;/a&gt;.
For managed code, if you would like the message to be available to other interceptor
applications, create the &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.pocketoutlook.messageinterception.messageinterceptor.aspxmsdn.microsoft.com/en-us/library/microsoft.windowsmobile.pocketoutlook.message..."&gt;MessageInterceptor&lt;/a&gt; &lt;/strong&gt;instance
passing the InterceptionAction.Notify enumeration value to the MessageInterceptor
constructor. 
&lt;p&gt;
You can test for interfering interceptors by going to [HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\SMS\Rules]
and set each rule to ‘0’ until the problem goes away. The last rule you change to
‘0’ before the problem goes away will be the problematic rule. Note that you need
to soft reset the device after changing the registry key. 
&lt;p&gt;
For example:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;[HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\SMS\Rules]&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;"{27E9801F-330B-4c6a-A7BF-A670D8C53C5D}"=dword:00000001&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;"{E85FD9C3-4F5E-4c75-8C21-0F850274DEF5}"=dword:00000001 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;-
Change to 0 to test&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
Once you have located the problematic rule, you can get more information on it (for
example, the DLL name) by searching for the GUID underneath HKEY_CLASSES_ROOT\CLSID.
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;p&gt;
Thanks, 
&lt;p&gt;Mike 
</description>
      <comments>http://blog.mjfnet.com/Blog/CommentView,guid,fb694c4b-c88f-4b26-a3e7-cbe3dd0a57ac.aspx</comments>
      <category>SMS</category>
      <category>Windows Mobile</category>
    </item>
  </channel>
</rss>