title: Passing parameters to C++ CORBA method implementation
body: <p>I'm new to using CORBA and I'm struggling with correctly passing the parameters to a method that I want to invoke. The method has the <code>IDL</code> signature</p>
  
  <pre><code>void addUpdateListener(out OpStatus opStatus, in IPlanningUpdateListener listener);
  </code></pre>
  
  <p><code>OpStatus</code> is a struct defined as</p>
  
  <pre><code>struct OpStatus {
      EComponent EComp;
      EStatus State;
      string Message;
  }
  enum EComponent { CompA, CompB, CompC };
  enum EStatus { SUCCESS, FAILURE, RETRY };
  </code></pre>
  
  <p>and <code>IPlanningUpdateListener</code> is itself an <code>IDL</code> interface. </p>
  
  <p>I've implemented the <code>_impl</code> of the class looks like</p>
  
  <pre><code>void addUpdateListener(OpStatus_out opStatus, _objref_IPlanningUpdateListener* listener)    {
      std::cout &lt;&lt; "addUpdateListener called\n";
  }
  </code></pre>
  
  <p>I've managed to register all my services with the ORB correctly and but I don't know how to actually call this method. I've got a pointer to the service that I want to be added as a listener but it's not of the correct type. Does anyone know why <code>omniidl</code> converts the existing OpStatus and IPlanningUpdateListener types in the <code>IDL</code> into the new <code>OpStatus_out</code> and <code>_objref_IPlanningUpdateListener</code> types. I thought for out parameters all I needed to do was pass a reference.</p>
  
  <pre><code>IPlanningUpdateListener_impl* listener // initialised and registered earlier
  OpStatus opStatus; 
  myClass-&gt;addUpdateListener(opStatus, listener);
  </code></pre>
  
  <p>My two questions are how do I get this method to accept my implementation of the IPlanningUpdateListener as a parameter and what do I need to do to convert the OpStatus struct into the OpStatus_out type that the <code>omniidl</code> has created?</p>