title: How to remove 'ImageList_Read' : inconsistent dll linkage warning?
body: <p>When I build my Visual C++ Solution ( 2005), I get the following warnings</p>
  
  <p>1>        c:\winddk\7000.0.winmain_win7beta.081212-1400\inc\api\commctrl.h(678) : see previous definition of 'ImageList_Read'</p>
  
  <p>1>e:\xml parse\development\gui\h\wtl4mfc.h(6) : warning C4273: 'ImageList_Write' : inconsistent dll linkage</p>
  
  <p>1>        c:\winddk\7000.0.winmain_win7beta.081212-1400\inc\api\commctrl.h(679) : see previous definition of 'ImageList_Write'</p>
  
  <p>1>e:\xml parse\development\gui\h\wtl4mfc.h(8) : warning C4273: 'ImageList_ReadEx' : inconsistent dll linkage</p>
  
  <p>1>        c:\winddk\7000.0.winmain_win7beta.081212-1400\inc\api\commctrl.h(686) : see previous definition of 'ImageList_ReadEx'</p>
  
  <p>1>e:\xml parse\development\gui\h\wtl4mfc.h(9) : warning C4273: 'ImageList_WriteEx' : inconsistent dll linkage</p>
  
  <p>1>        c:\winddk\7000.0.winmain_win7beta.081212-1400\inc\api\commctrl.h(687) : see previous definition of 'ImageList_WriteEx'</p>
  
  <p>When I checked these two files, I can see the following:</p>
  
  <p>****In wtl4mfc.h****</p>
  
  <p>extern "C"
  {
      HIMAGELIST WINAPI ImageList_Read(LPSTREAM pstm);
      BOOL       WINAPI ImageList_Write(HIMAGELIST himl, LPSTREAM pstm);</p>
  
  <p>#if (_WIN32_WINNT >= 0x0501)
      HRESULT WINAPI ImageList_ReadEx(DWORD dwFlags, LPSTREAM pstm, REFIID riid, PVOID* ppv);
      HRESULT WINAPI ImageList_WriteEx(HIMAGELIST himl, DWORD dwFlags, LPSTREAM pstm);</p>
  
  <p>#endif
  };</p>
  
  <p><strong>In commctrl.h</strong> file I can see the following:</p>
  
  <p>WINCOMMCTRLAPI HIMAGELIST  WINAPI ImageList_Read(__in struct IStream *pstm);
  WINCOMMCTRLAPI BOOL        WINAPI ImageList_Write(__in HIMAGELIST himl, __in struct IStream *pstm);</p>
  
  <p>I am a beginner in Visual C++ and this is from a code which is available for me to maintain. How can I remove these warnings? These warnings are not shown if I build the code where lower version of Winddk is installed.</p>
  
  <p>What is causing these warnings? How can I remove them?</p>