title: P/Invoke. How to call unmanaged method with marshalling from C#?
body: <p>I've got a problem with P/Invoke. I'm calling .dll (implemented on c++) from c# code. There is a class, that contains the next methods:</p>
  
  <pre><code>virtual AudioFileList *API  CreateAudioFileList ()=0;
  virtual bool API  DisposeAudioFileList (AudioFileList *iAudioFileList)=0;
  </code></pre>
  
  <p><strong><code>AudioFileList</code></strong> class looks like:</p>
  
  <pre><code>virtual bool API  GetFile (long index, std::string *oPath, AudioFileInfo *fileInfo)=0;
  virtual long API  GetNumberFiles ()=0; 
  </code></pre>
  
  <p>So, the question is how can I call <strong><em><code>CreateAudioFileList</code></em></strong>  method and than pass the result to <strong><em><code>DisposeAudioFileList</code></em></strong> from C# code?
  Thanks!</p>