title: Pass TStringList to TOmniTask procedure
body: <p>I am using the OmniThreadLibrary in a Delphi 2007 app that utilises the global thread pool to preform some file operations (I need to try and make sure they are done in a specific order).</p>
  
  <p>I have the contents of a newly created Ini file that is stored in a TStringList.</p>
  
  <p>I then pass the TStringList to an instance of TOmniTask.</p>
  
  <pre><code>class procedure saveIniFile(const iniFile: TStringList);
      var
          task  : IOmniTaskControl;
      begin
          task := CreateTask(saveIniFileTask, 'saveIniFile')
                     .SetParameter('iniFile', iniFile)
                     .Unobserved
                     .Schedule;
      end;
  </code></pre>
  
  <p>I cannot figure out how to retrieve the TStringList in the TOmniTask instance</p>
  
  <pre><code>class procedure saveIniFileTask(const task: IOmniTask);
      var
          iniFile: TStringList;
      begin
          iniFile := task.Param['iniFile'];
      end;
  </code></pre>
  
  <p>The above would return an error:</p>
  
  <pre><code>Incompatible types: 'TStringList' and 'TOmniValue'
  </code></pre>
  
  <p>I have tried typecasting:</p>
  
  <pre><code>iniFile:= TStringList(task.Param['iniFile'].AsObject);
  </code></pre>
  
  <p>But get a compiler error:</p>
  
  <pre><code>F2084 Internal Error: C4310
  </code></pre>
  
  <p>I am using OmniThreadLibrary version 3.0 - I cant get 3.03b to compile in D2007</p>
  
  <p>If @gabr is about: Great piece of work OmniThreadLibray, thank you.</p>