title: Strange Case of the missing method: SXS and Controls.Add results in "object doesn't support this property or method"?
body: <p>I have a project written in VB6 that uses a UserControl, The project runs fine when the OCX is registered, but if I run the same project with a side by side manifest it results in an error.</p>
  
  <p>I can use the Control with no problem as long as it's loaded statically (added before on the form) but if I add a dynamic control to form on any use of the new control (property or method) I get this error:</p>
  
  <blockquote>
    <p>Object doesn't support this property or method</p>
  </blockquote>
  
  <p>This error can be reproduced this way:</p>
  
  <ol>
  <li>Create an OCX project in VB6</li>
  <li>Add a user control</li>
  <li>Add a method, e.g. <code>DoSomething</code> to the control</li>
  <li>Create an exe project</li>
  <li>Add the control to form, e.g. <code>UserControl1</code></li>
  <li>In an event call <code>DoSomething</code></li>
  <li><p>Load dynamically Like:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim y As Control
  UserControl1.DoSomething        '&lt;-------- CASE(1) THIS IS ALLRIGHT!'
  Set y = Controls.Add("Project1.UserControl1", "y")
  y.DoSomething                   '&lt;---- (CASE 2) THIS WILL FAIL USING SXS'
  </code></pre></li>
  </ol>
  
  <p>I tracked the error in WinDbg back to <code>IDispatch::GetIDsOfNames</code> that when called in second case will fail.</p>
  
  <p>Any Idea?!</p>
  
  <p>Edit: My bad, Here is the manifest.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"&gt;
  
  &lt;assemblyIdentity name="client.exe" version="1.0.0.0" type="win32" processorArchitecture="x86"/&gt;
  
  &lt;file name="Project1.ocx"&gt;
   &lt;comClass
       clsid="{C8CF7991-A8F2-4360-9404-03C9A052C245}"
       description="Project1.UserControl1"
       tlbid="{47853CCC-7BE6-4377-9C82-38A0B7755F65}"
       threadingModel="apartment"
       miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst"
       progid="Project1.UserControl1"/&gt;
   &lt;typelib
       tlbid="{47853CCC-7BE6-4377-9C82-38A0B7755F65}"
       version="1.0"
       helpdir=""
       flags="control,hasdiskimage"/&gt;
  &lt;/file&gt;
  
  &lt;comInterfaceExternalProxyStub 
       iid="{0E4F313E-7EF3-4FE6-9591-9F7D2D819AEE}"
       name="UserControl1"
       proxyStubClsid32="{00020424-0000-0000-C000-000000000046}"/&gt;
  &lt;comInterfaceExternalProxyStub 
       iid="{53307849-4F14-4A59-B0CA-DE4950CE499D}"
       name="UserControl1"
       proxyStubClsid32="{00020420-0000-0000-C000-000000000046}"/&gt;
  
  &lt;/assembly&gt;
  </code></pre>