title: why the type castings (UINT)(void*)(DWORD) are needed?
body: <p>This is a default HashKey function in MFC's CMap class.</p>
  
  <pre><code>AFX_INLINE UINT AFXAPI HashKey(ARG_KEY key)
  {
  　　// default identity hash - works for most primitive values
  　　return ((UINT)(void*)(DWORD)key) &gt;&gt; 4;
  }
  </code></pre>
  
  <p>My question is why the type casting <strong>(DWORD)</strong> and <strong>(void*)</strong> are needed?. I guess the (DWORD) may have some relationship with compatibility affairs for 16-bit machines. But I'm confused about the <strong>void*</strong>.</p>