title: Pass a C++/CLI wrapper of a native type to another C++/CLI assembly
body: <p>Suppose I have the following simple wrapper of a NativeClassInstance.</p>
  
  <pre><code>public ref class Wrapper
  {
  private:
      NativeClass *_wrapped;
  public:
      Renderer()
      {
          _wrapped = new NativeClass();
      }
      ~Renderer()
      {
          delete _wrapped;
      }
      operator NativeClass*()
      {
          return _wrapped;
      }
  }
  </code></pre>
  
  <p>Now, I want to create an instance of Wrapper from C# with <code>Wrapper wrapper = new Wrapper()</code> and use it in another native functionalities wrapper that resides in <strong>another</strong> assembly with <code>Helper.Foo(wrapper)</code> (nothing strange having other functionalities not directly related to the wrapped classes in another assembly, IMO):</p>
  
  <pre><code>// Utilities is in another Assembly
  public ref class Helper
  {
  public:
      static Foo(Wrapper ^wrapper)
      {
          // Do something in native code with wrapper-&gt;_wrapped
      }
  }
  </code></pre>
  
  <p>The results with the implicit user conversion is:</p>
  
  <ul>
  <li>candidate function(s) not accessible</li>
  </ul>
  
  <p>If I make _wrapped public it is:</p>
  
  <ul>
  <li>cannot access private member declared in class ...</li>
  </ul>
  
  <p>Now, I've learnt that native type visibility is <a href="http://msdn.microsoft.com/en-us/library/4dffacbw.aspx" rel="nofollow">private</a> outside of the assembly. So, how I'm supposed to use the wrapped entity in native code outside the assembly it's defined? I've read of <a href="http://msdn.microsoft.com/en-us/library/ms235607%28v=vs.80%29.aspx" rel="nofollow">make_public</a> but you can't use with template types so it seems very limiting in the general case. Am I missing something? Is there a more correct solution?</p>