title: How to add a call to a non-static class member function to the threadpool?
body: <p>I'm looking for this <a href="https://stackoverflow.com/questions/6666259/how-to-get-windows-thread-pool-to-call-class-member-function">stackoverflow: How to get Windows thread pool to call class member function?</a> for C++/CLI:
  I have a ref class with a member function (a copy of that function is static for testing purposes):</p>
  
  <pre><code>ref class CTest
  {
  public:
    static void testFuncStatic( System::Object^ stateInfo )
    {
      // do work;
    }
    void testFunction( System::Object^ stateInfo )
    {
      // do work;
    }
  };
  </code></pre>
  
  <p>From main() I can easily add a call to the static function to the threadpool:</p>
  
  <pre><code>System::Threading::ThreadPool::QueueUserWorkItem (gcnew System::Threading::WaitCallback (&amp;CTest::testFuncStatic));
  </code></pre>
  
  <p>But I don't want to call the static function (which is more or less an object-independent global function), I want to call the member function <code>testFunction()</code> for several instances of the class CTest.<br>
  How can I achieve that?</p>