none
Warning when storport.h and wdm.h included in the same file RRS feed

  • Question

  • I'm developing  a SCSI mini port driver and i need to include both wdm.h and storport.h in a file. The code builds fine for Windows 8 Release x64 configuration, 

    but when tried to build for Windows 8 Release Win32 configuration, I'm getting the following warning 

    1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\storport.h(9867): error C2220: warning treated as error - no 'object' file generated
    1>C:\Program Files (x86)\Windows Kits\8.0\Include\KM\storport.h(9867): warning C4005: 'InterlockedCompareExchange64' : macro redefinition
    1>          C:\Program Files (x86)\Windows Kits\8.0\Include\KM\wdm.h(15443) : see previous definition of 'InterlockedCompareExchange64'

    Wednesday, September 19, 2012 1:08 PM

Answers

  • Why do you think you need both in the same file?  If this is a true storport you can only use funtions from storport.h, if this is a virtual storport the correct approach is to have a file with the storport callbacks that then calls a second file with the WDM services you are using.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, September 19, 2012 1:11 PM

All replies

  • Why do you think you need both in the same file?  If this is a true storport you can only use funtions from storport.h, if this is a virtual storport the correct approach is to have a file with the storport callbacks that then calls a second file with the WDM services you are using.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, September 19, 2012 1:11 PM
  • Only including <storport.h> creates it's own set of problems in the above mentioned configuration, starting at line 102 of storport.h. Clearly something else must be included with storport.h for this to work - what is it?
    Monday, October 15, 2012 2:44 AM