title: How to pass integer to CreateThread()?
body: <p>How to pass int parameter to CreateThread callback function? I try it:</p>
  
  <pre><code>DWORD WINAPI mHandler(LPVOID sId) {
  ...
  arr[(int)sId]
  ...
  }
  
  int id=1;
  CreateThread(NULL, NULL, mHandler, (LPVOID)id, NULL, NULL);
  </code></pre>
  
  <p>But I get warnings:</p>
  
  <pre><code>warning C4311: 'type cast' : pointer truncation from 'LPVOID' to 'int'
  warning C4312: 'type cast' : conversion from 'int' to 'LPVOID' of greater size
  </code></pre>