title: WinRT - Windows Store - WinRT Originate Error - How do decipher such an error?
body: <p>I'm working on a Windows Store app and I'm getting a WinRT error that doesn't really give me any information so I would like to know how to understand these sorts of errors.</p>
  
  <p>Basically I get the error on the following line which is called inside OnPointerPressed:</p>
  
  <pre><code>m_gestureRecognizer-&gt;ProcessDownEvent(args-&gt;GetCurrentPoint(nullptr));
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>First-chance exception at 0x76F54B32 (KernelBase.dll) in DXAML2.exe: 0x40080201: WinRT originate error (parameters: 0x80070057, 0x00000044, 0x03CEE72C).</p>
  </blockquote>
  
  <p>This error didn't used to appear, the only thing I've changed is that this line is now wrapped in an if clause which tests if the current pointer's PointerId is the same as one I've stored just using == such as:</p>
  
  <pre><code>if(args-&gt;GetCurrentPoint(nullptr)-&gt;PointerId == m_UIPointerID)
  </code></pre>
  
  <p>I have no idea why this has started happening.</p>
  
  <p>So my question is in two parts:</p>
  
  <ol>
  <li>More generally, how do I understand what an error such as the above means?</li>
  <li>And does anyone know this error has suddenly started happening now that I check the pointerId?</li>
  </ol>
  
  <p>Thanks for your time.</p>
  
  <p>P.S. I guess another thing that has changed is that there will already be 2 pointers on the screen (the one that gets pushed into this GestureRecognizer) as well as another one, hence the PointerId check.</p>