title: CreateThread passing long to lpParameter
body: <p>Compiler is saying "illegal indirection" on line 3. The IDE says "expression must be a pointer to a complete object type"</p>
  
  <pre><code>001 DWORD WINAPI MyCallbackFunction( LPVOID lpvParam )
  002 {
  003    long value = (long) *lpvParam;
  004    ...
  005    return 0;
  006 }
  007
  008 BOOL StartMyThread( long value )
  009 {
  010    DWORD dwThreadId;
  011    BOOL result = FALSE;
  012    HANDLE hThread = NULL;
  013    hThread = CreateThread(NULL, 0, MyCallbackFunction, &amp;value, NULL, &amp;dwThreadId );
  014    result = (NULL == hThread);
  015    CloseHandle( hThread );
  016    return result;
  017 }
  </code></pre>
  
  <p>If I change line 3 to this, it compiles, but crashes... </p>
  
  <pre><code>long value = (long) lpvParam;
  </code></pre>