title: Mocking a COM+ wrapper with Moq is failing
body: <p>I have a wrapper class for a COM+ Interface and I need to mock it.</p>
  
  <p>This is the signature of that method on the Socket interface</p>
  
  <pre><code>int MakeRequest(object ServiceId, object Host, object Port,
                  object Request, ref object pResponse);
  </code></pre>
  
  <p>And I'm using Moq to try mock it, like this</p>
  
  <pre><code>object pResponse = String.Empty;
  var socket = new Mock&lt;Socket&gt;();
  socket.Setup(x =&gt; x.MakeRequest(It.IsAny&lt;int&gt;(), It.IsAny&lt;string&gt;(), 
                                  It.IsAny&lt;int&gt;(), It.IsAny&lt;string&gt;(),
                                  ref pResponse))
              .Returns((int i, string s, int ii, string ss, object o) =&gt; 
              { 
                  o = "Response";
                  return 0;
              });
  </code></pre>
  
  <p>But for the 'o' arguments in the Returns I get</p>
  
  <pre><code>The value passed to the method is never used because it is overwritten in the 
  method body before being read
  </code></pre>
  
  <p>What am I missing?</p>