title: How to define and marshall BSTR* types
body: <p>i was wondering how to marshall string types to BSTR* types.
  just to elaborate, the C++ structure is as follows:</p>
  
  <pre><code>struct MyStruct
  {
       BSTR* string;
       int a;
  }
  </code></pre>
  
  <p>i need to define a new sturct in C# side, i tried both string[] and IntPtr[] but that didn't come up with a success.</p>
  
  <p>Thanks for your help!</p>
  
  <p>edit:
  c++ structure:</p>
  
  <pre><code>    struct HTTPTEXTRENDERERFILTERINFO {
          enum { UTC, GMT } eTimestamp;
          BOOL    bEnableCCIngest;
          LONG    lQueueSizeTreshold; 
          LONG    lSendTimeTreshold;  
          BYTE    btBroadcastUrlCount;
          BSTR*   pbstrBroadcastUrls;                                
          LONG    lInputPinsNum;      
      };
  </code></pre>
  
  <p>and the function's prototype:</p>
  
  <pre><code>HRESULT HTTPTextRendererFilter::SetConfig(IN const HTTPTEXTRENDERERFILTERINFO&amp; Config)
  </code></pre>
  
  <p>c# structure:</p>
  
  <blockquote>
    <p>[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
        public struct HttpTextRenderFilterInfo
        {
            public enum TimestampType : int { UTC, GMT };</p>
  
  <pre><code>    public TimestampType Timestamp;
      public int EnableCCIngest;
      public int QueueSizeTreshold; 
      public int SendTimeTreshold;  
      public byte BroadcastUrlCount;
      [MarshalAs(UnmanagedType.BStr)]
      public string pbstrBroadcastUrls;        
      public int lInputPinsNum;     
  };
  </code></pre>
  </blockquote>
  
  <p>prototype:</p>
  
  <pre><code>    [PreserveSig]
      int SetConfig([In] ref HttpTextRenderFilterInfo config);
  </code></pre>