summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Fenelon <[email protected]>2017-10-02 14:28:04 -0700
committerGitHub <[email protected]>2017-10-02 14:28:04 -0700
commitda3f6c88f40a062019089716ea360b964d71f4be (patch)
tree0c9d8e66f09e92e80b68efdbea546d6b4013ec86
parentc55397f675ffbb3b3fe11dcfa2d5686e36bc7f05 (diff)
parent5a706e661e678e33bac158c1f330836d7d2d6202 (diff)
Merge branch 'master' into master
-rw-r--r--README.md4
-rw-r--r--audio/sysvad/PhoneAudioSample/PhoneAudioSample.vcxproj26
-rw-r--r--audio/sysvad/README.md9
-rw-r--r--audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj26
-rw-r--r--audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj24
-rw-r--r--audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj26
-rw-r--r--audio/sysvad/common.cpp2
-rw-r--r--avstream/avscamera/README.md9
-rw-r--r--avstream/avshws/README.md9
-rw-r--r--avstream/avssamp/README.md9
-rw-r--r--avstream/samplemft0/README.md9
-rw-r--r--biometrics/README.md10
-rw-r--r--bluetooth/bthecho/README.md9
-rw-r--r--bluetooth/serialhcibus/README.md9
-rw-r--r--bluetooth/serialhcibus/WDK/SerialBusWdk.vcxproj26
-rw-r--r--filesys/cdfs/README.md10
-rw-r--r--filesys/fastfat/README.md11
-rw-r--r--filesys/miniFilter/MetadataManager/README.md10
-rw-r--r--filesys/miniFilter/NameChanger/README.md10
-rw-r--r--filesys/miniFilter/avscan/README.md10
-rw-r--r--filesys/miniFilter/cancelSafe/README.md10
-rw-r--r--filesys/miniFilter/cdo/README.md10
-rw-r--r--filesys/miniFilter/change/README.md10
-rw-r--r--filesys/miniFilter/ctx/README.md10
-rw-r--r--filesys/miniFilter/delete/README.md9
-rw-r--r--filesys/miniFilter/minispy/README.md10
-rw-r--r--filesys/miniFilter/nullFilter/README.md9
-rw-r--r--filesys/miniFilter/passThrough/README.md10
-rw-r--r--filesys/miniFilter/scanner/README.md10
-rw-r--r--filesys/miniFilter/simrep/README.md10
-rw-r--r--filesys/miniFilter/swapBuffers/README.md10
-rw-r--r--general/DCHU/README.md30
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base.sln19
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inxbin6664 -> 10398 bytes
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.vcxproj30
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_filter/osrfx2_DCHU_filter.vcxproj6
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_testapp/osrusbfx2.vcxproj2
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/CppWindowsService.cpp (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/CppWindowsService.cpp)0
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Main.cpp1217
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Main.h (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Main.h)85
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/SampleService.cpp (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/SampleService.cpp)24
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/SampleService.h (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/SampleService.h)13
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/ServiceBase.cpp (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/ServiceBase.cpp)0
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/ServiceBase.h (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/ServiceBase.h)0
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/ThreadPool.h (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/ThreadPool.h)0
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Utils.cpp (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Utils.cpp)0
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Utils.h (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Utils.h)0
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.filters (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.filters)0
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.inx (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.inx)bin3190 -> 3190 bytes
-rw-r--r--general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.vcxproj (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.vcxproj)20
-rw-r--r--general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx79
-rw-r--r--general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Main.cpp320
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.filters (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component/osrfx2_DCHU_component.filters)0
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.inx (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component/osrfx2_DCHU_component.inx)0
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.vcxproj (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component/osrfx2_DCHU_component.vcxproj)4
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp)0
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters)0
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj)12
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/stdafx.cpp (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/stdafx.cpp)0
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/stdafx.h (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/stdafx.h)0
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/targetver.h (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/targetver.h)0
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension.sln (renamed from general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component.sln)41
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters)0
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx54
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj266
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_component/osrfx2_DCHU_component.inx64
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp489
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters33
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj169
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/stdafx.cpp8
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/stdafx.h18
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/targetver.h8
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension.sln (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension.sln)40
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters14
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx55
-rw-r--r--general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj (renamed from general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj)20
-rw-r--r--general/PLX9x5x/README.md10
-rw-r--r--general/SystemDma/wdm/README.md10
-rw-r--r--general/cancel/README.md10
-rw-r--r--general/echo/kmdf/README.md10
-rw-r--r--general/echo/umdf/README.md10
-rw-r--r--general/echo/umdf2/README.md9
-rw-r--r--general/echo/umdfSocketEcho/README.md10
-rw-r--r--general/event/README.md10
-rw-r--r--general/filehistory/README.md10
-rw-r--r--general/filehistory/exe/fhsetup.vcxproj26
-rw-r--r--general/installwdf/README.md10
-rw-r--r--general/ioctl/kmdf/README.md10
-rw-r--r--general/ioctl/wdm/README.md10
-rw-r--r--general/obcallback/README.md10
-rw-r--r--general/pcidrv/README.md10
-rw-r--r--general/perfcounters/kcs/README.md10
-rw-r--r--general/perfcounters/kcs/kcs.vcxproj4
-rw-r--r--general/registry/regfltr/README.md10
-rw-r--r--general/toaster/toastDrv/README.md10
-rw-r--r--general/toaster/toastpkg/README.md14
-rw-r--r--general/toaster/umdf2/README.md10
-rw-r--r--general/tracing/SystemTraceControl/README.md10
-rw-r--r--general/tracing/SystemTraceControl/SystemTraceControl.vcxproj8
-rw-r--r--general/tracing/evntdrv/README.md10
-rw-r--r--general/tracing/tracedriver/README.md10
-rw-r--r--general/umdfSkeleton/README.md10
-rw-r--r--gpio/samples/README.md10
-rw-r--r--hid/firefly/README.md10
-rw-r--r--hid/hclient/README.md10
-rw-r--r--hid/hidusbfx2/README.md11
-rw-r--r--hid/hidusbfx2/sys/driver.c10
-rw-r--r--hid/hidusbfx2/sys/hid.c112
-rw-r--r--hid/hidusbfx2/sys/usb.c26
-rw-r--r--hid/vhidmini2/README.md11
-rw-r--r--input/hiddigi/SynapticsTouch/README.md19
-rw-r--r--input/kbfiltr/README.md10
-rw-r--r--input/layout/README.md10
-rw-r--r--input/moufiltr/README.md10
-rw-r--r--network/config/bindview/README.md10
-rw-r--r--network/modem/fakemodem/README.md9
-rw-r--r--network/ndis/extension/README.md10
-rw-r--r--network/ndis/filter/README.md10
-rw-r--r--network/ndis/mux/README.md10
-rw-r--r--network/ndis/ndisprot/6x/README.md16
-rw-r--r--network/ndis/ndisprot_kmdf/README.md17
-rw-r--r--network/ndis/netvmini/6x/README.md10
-rw-r--r--network/radio/HidSwitchDriverSample/README.md10
-rw-r--r--network/radio/HidSwitchDriverSample/driver.c10
-rw-r--r--network/radio/HidSwitchDriverSample/hid.c10
-rw-r--r--network/radio/HidSwitchDriverSample/usb.c12
-rw-r--r--network/radio/RadioManagerSample/README.md10
-rw-r--r--network/trans/WFPSampler/README.md10
-rw-r--r--network/trans/ddproxy/README.md10
-rw-r--r--network/trans/inspect/README.md10
-rw-r--r--network/trans/msnmntr/README.md10
-rw-r--r--network/trans/stmedit/README.md10
-rw-r--r--network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj6
-rw-r--r--network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.c1110
-rw-r--r--network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.c540
-rw-r--r--network/wsk/echosrv/README.md10
-rw-r--r--nfc/Simulator/README.md10
-rw-r--r--nfp/net/README.md10
-rw-r--r--pofx/PEP/README.md10
-rw-r--r--pofx/UMDF2/README.md10
-rw-r--r--pofx/WDF/README.md10
-rw-r--r--pos/drivers/MagneticStripeReader/README.md10
-rw-r--r--pos/drivers/barcodescanner/README.md10
-rw-r--r--print/SampleOpenXPS/README.md10
-rw-r--r--print/SampleXPS/README.md10
-rw-r--r--print/SimplePipelineFilter/README.md10
-rw-r--r--print/XPSDrvSmpl/README.md10
-rw-r--r--print/XPSDrvSmpl/src/common/pshndlr.cpp2
-rw-r--r--print/XPSDrvSmpl/src/common/ptquerybld.cpp3
-rw-r--r--print/XPSDrvSmpl/src/filters/color/cmimg.cpp2
-rw-r--r--print/XPSDrvSmpl/src/filters/common/ptmanage.cpp20
-rw-r--r--print/XPSDrvSmpl/src/filters/nup/nupsax.cpp4
-rw-r--r--print/XPSDrvSmpl/src/filters/watermark/wmvect.cpp3
-rw-r--r--print/XpsRasFilter/README.md11
-rw-r--r--print/autoconfig/README.md12
-rw-r--r--print/cpsuisam/README.md10
-rw-r--r--print/v4PrintDriverSamples/PrinterExtensionSample/README.md10
-rw-r--r--print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md10
-rw-r--r--print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver/README.md11
-rw-r--r--print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/README.md10
-rw-r--r--print/v4PrintDriverSamples/v4PrintDriver-WSDMon-Bidi-Extension/README.md10
-rw-r--r--sd/miniport/sdhc/README.md12
-rw-r--r--sd/sdiomars/README.md10
-rw-r--r--sd/sdiomars/mars.vcxproj26
-rw-r--r--security/elam/README.md10
-rw-r--r--security/elam/elamsample.c2
-rw-r--r--sensors/ADXL345Acc/ADXL345Acc.inxbin5282 -> 4986 bytes
-rw-r--r--sensors/ADXL345Acc/Gallery.xml161
-rw-r--r--sensors/ADXL345Acc/readme.md12
-rw-r--r--sensors/Activity/Activity.inxbin5078 -> 4790 bytes
-rw-r--r--sensors/Activity/Device.h4
-rw-r--r--sensors/Activity/Gallery.xml160
-rw-r--r--sensors/Activity/readme.md12
-rw-r--r--sensors/CustomSensors/CustomSensors.inxbin5352 -> 5054 bytes
-rw-r--r--sensors/CustomSensors/Device.h4
-rw-r--r--sensors/CustomSensors/Gallery.xml168
-rw-r--r--sensors/CustomSensors/HardwareSimulator.h2
-rw-r--r--sensors/CustomSensors/readme.md12
-rw-r--r--sensors/Fusion/Device.h195
-rw-r--r--sensors/Fusion/Driver.h19
-rw-r--r--sensors/Fusion/FusionSensor.ctl1
-rw-r--r--sensors/Fusion/FusionSensor.def6
-rw-r--r--sensors/Fusion/FusionSensor.inxbin0 -> 4990 bytes
-rw-r--r--sensors/Fusion/FusionSensor.sln28
-rw-r--r--sensors/Fusion/FusionSensor.vcxproj201
-rw-r--r--sensors/Fusion/FusionSensor.vcxproj.Filters43
-rw-r--r--sensors/Fusion/HardwareSimulator.h60
-rw-r--r--sensors/Fusion/SensorsTrace.h102
-rw-r--r--sensors/Fusion/client.cpp789
-rw-r--r--sensors/Fusion/device.cpp729
-rw-r--r--sensors/Fusion/driver.cpp76
-rw-r--r--sensors/Fusion/hardwaresimulator.cpp277
-rw-r--r--sensors/Fusion/readme.md12
-rw-r--r--sensors/Pedometer/Device.h2
-rw-r--r--sensors/Pedometer/Gallery.xml160
-rw-r--r--sensors/Pedometer/HardwareSimulator.h2
-rw-r--r--sensors/Pedometer/Pedometer.inxbin5130 -> 4840 bytes
-rw-r--r--sensors/Pedometer/readme.md12
-rw-r--r--sensors/SensorsComboDriver/SensorsComboDriver.inxbin5638 -> 5262 bytes
-rw-r--r--sensors/SensorsComboDriver/SensorsComboDriver.vcxproj6
-rw-r--r--sensors/SensorsComboDriver/readme.md12
-rw-r--r--sensors/SimpleDeviceOrientationSensor/Device.h2
-rw-r--r--sensors/SimpleDeviceOrientationSensor/Gallery.xml160
-rw-r--r--sensors/SimpleDeviceOrientationSensor/HardwareSimulator.h2
-rw-r--r--sensors/SimpleDeviceOrientationSensor/SimpleDeviceOrientationSensor.inxbin6302 -> 5972 bytes
-rw-r--r--sensors/SimpleDeviceOrientationSensor/readme.md12
-rw-r--r--serial/VirtualSerial/README.md10
-rw-r--r--serial/VirtualSerial2/README.md10
-rw-r--r--serial/serenum/README.md10
-rw-r--r--serial/serial/README.md10
-rw-r--r--setup/devcon/README.md10
-rw-r--r--setup/devcon/cmds.cpp73
-rw-r--r--setup/devcon/msg.mc21
-rw-r--r--simbatt/README.md12
-rw-r--r--smartcrd/README.md10
-rw-r--r--smartcrd/pscr/Pscr.vcxproj26
-rw-r--r--spb/SkeletonI2C/README.md12
-rw-r--r--spb/SpbTestTool/README.md10
-rw-r--r--storage/class/cdrom/README.md10
-rw-r--r--storage/class/classpnp/README.md10
-rw-r--r--storage/class/classpnp/src/srblib.c2
-rw-r--r--storage/class/disk/README.md10
-rw-r--r--storage/filters/addfilter/README.md10
-rw-r--r--storage/iscsi/README.md10
-rw-r--r--storage/miniports/lsi_u3/README.md10
-rw-r--r--storage/miniports/lsi_u3/src/lsi_u3.infbin5998 -> 6022 bytes
-rw-r--r--storage/miniports/storahci/README.md10
-rw-r--r--storage/msdsm/README.md10
-rw-r--r--storage/msdsm/src/intrface.c56
-rw-r--r--storage/ramdisk/README.md10
-rw-r--r--storage/sfloppy/README.md10
-rw-r--r--storage/tools/spti/README.md10
-rw-r--r--thermal/simsensor/README.md10
-rw-r--r--thermal/thermalclient/README.md10
-rw-r--r--tools/sdv/samples/DV-FailDriver-WDM/README.md10
-rw-r--r--tools/sdv/samples/SDV-FailDriver-KMDF/README.md10
-rw-r--r--tools/sdv/samples/SDV-FailDriver-NDIS/README.md10
-rw-r--r--tools/sdv/samples/SDV-FailDriver-STORPORT/README.md10
-rw-r--r--tools/sdv/samples/SDV-FailDriver-WDM/README.md10
-rw-r--r--usb/UcmCxUcsi/README.md10
-rw-r--r--usb/UcmCxUcsi/UcmCxUcsi.vcxproj3
-rw-r--r--usb/UcmTcpciCxClientSample/README.md10
-rw-r--r--usb/kmdf_enumswitches/README.md10
-rw-r--r--usb/kmdf_enumswitches/sys/kmdf_enumswitches.vcxproj26
-rw-r--r--usb/kmdf_fx2/README.md10
-rw-r--r--usb/kmdf_fx2/driver/osrusbfx2.vcxproj26
-rw-r--r--usb/ufxclientsample/README.md12
-rw-r--r--usb/umdf2_fx2/README.md11
-rw-r--r--usb/umdf2_fx2/driver/osrusbfx2um.vcxproj26
-rw-r--r--usb/umdf_filter_kmdf/README.md10
-rw-r--r--usb/umdf_filter_kmdf/kmdf_driver/osrusbfx2.vcxproj26
-rw-r--r--usb/umdf_filter_umdf/README.md10
-rw-r--r--usb/umdf_fx2/README.md10
-rw-r--r--usb/usbsamp/README.md10
-rw-r--r--usb/usbview/README.md10
-rw-r--r--usb/wdf_osrfx2_lab/README.md10
-rw-r--r--video/KMDOD/README.md9
-rw-r--r--video/pixlib/README.md10
-rw-r--r--wia/README.md12
-rw-r--r--wmi/wmiacpi/README.md10
-rw-r--r--wmi/wmisamp/README.md10
-rw-r--r--wpd/WpdBasicHardwareDriver/README.md10
-rw-r--r--wpd/WpdHelloWorldDriver/README.md10
-rw-r--r--wpd/WpdHelloWorldDriver/WpdHelloWorldDriver.inx1
-rw-r--r--wpd/WpdMultiTransportDriver/README.md10
-rw-r--r--wpd/WpdMultiTransportDriver/WpdMultiTransportDriver.inx1
-rw-r--r--wpd/WpdServiceSampleDriver/README.md16
-rw-r--r--wpd/WpdServiceSampleDriver/WpdServiceSampleDriver.inx1
-rw-r--r--wpd/WpdWudfSampleDriver/README.md10
-rw-r--r--wpd/WpdWudfSampleDriver/WpdWudfSampleDriver.inxbin4018 -> 4074 bytes
270 files changed, 7932 insertions, 2477 deletions
diff --git a/README.md b/README.md
index 190349c2..67fc57bd 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,7 @@
+<!---
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=616507
+--->
+
# Driver samples for Windows 10
These are the official Microsoft Windows Driver Kit (WDK) team driver code samples for Windows 10. They provide a foundation for Universal Windows driver support of all hardware form factors, from phones to desktop PCs. Use these samples with Visual Studio 2015 and Windows Driver Kit (WDK) 10.
diff --git a/audio/sysvad/PhoneAudioSample/PhoneAudioSample.vcxproj b/audio/sysvad/PhoneAudioSample/PhoneAudioSample.vcxproj
index f140a088..cf608ab0 100644
--- a/audio/sysvad/PhoneAudioSample/PhoneAudioSample.vcxproj
+++ b/audio/sysvad/PhoneAudioSample/PhoneAudioSample.vcxproj
@@ -83,19 +83,19 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</Midl>
@@ -105,19 +105,19 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</Midl>
@@ -127,19 +127,19 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</Midl>
@@ -149,19 +149,19 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
</Midl>
@@ -301,4 +301,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/audio/sysvad/README.md b/audio/sysvad/README.md
index 9dfc0193..8a5c7709 100644
--- a/audio/sysvad/README.md
+++ b/audio/sysvad/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: SysVAD Virtual Audio Device Driver Sample
+ platform: WDM
+ language: cpp
+ category: Audio
+ description: The Microsoft SysVAD Virtual Audio Device Driver (SYSVAD) shows how to develop a WDM audio driver that exposes support for multiple audio devices.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620183
+--->
+
SysVAD Virtual Audio Device Driver Sample
========================================
diff --git a/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj b/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj
index 563f6375..9737729a 100644
--- a/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj
+++ b/audio/sysvad/SwapAPO/APO/SwapAPO.vcxproj
@@ -134,18 +134,18 @@
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary />
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies>
@@ -158,18 +158,18 @@
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary />
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies>
@@ -182,18 +182,18 @@
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary />
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies>
@@ -206,18 +206,18 @@
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary />
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies>
@@ -247,4 +247,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj b/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj
index 68fd57b6..ee3db3f6 100644
--- a/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj
+++ b/audio/sysvad/SwapAPO/DelayAPO/DelayAPO.vcxproj
@@ -134,18 +134,18 @@
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary />
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies>
@@ -158,18 +158,18 @@
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary />
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies>
@@ -182,18 +182,18 @@
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary />
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies>
@@ -206,18 +206,18 @@
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary />
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_WINDLL;_USRDLL;UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..\inc;..\..\;.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);Kernel32.lib;ole32.lib;oleaut32.lib;advapi32.lib;user32.lib;uuid.lib;AudioBaseProcessingObjectV140.lib;audiomediatypecrt.lib;AudioEng.lib</AdditionalDependencies>
diff --git a/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj
index 8efc42cf..48c5665e 100644
--- a/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj
+++ b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj
@@ -185,7 +185,7 @@
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<DisableSpecificWarnings>4595;%(DisableSpecificWarnings)</DisableSpecificWarnings>
@@ -193,12 +193,12 @@
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -208,7 +208,7 @@
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<DisableSpecificWarnings>4595;%(DisableSpecificWarnings)</DisableSpecificWarnings>
@@ -216,12 +216,12 @@
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -231,7 +231,7 @@
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<DisableSpecificWarnings>4595;%(DisableSpecificWarnings)</DisableSpecificWarnings>
@@ -239,12 +239,12 @@
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -254,7 +254,7 @@
<ClCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
<DisableSpecificWarnings>4595;%(DisableSpecificWarnings)</DisableSpecificWarnings>
@@ -262,12 +262,12 @@
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon;.</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
@@ -296,4 +296,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/audio/sysvad/common.cpp b/audio/sysvad/common.cpp
index 2aadb5e6..a4c8f5e2 100644
--- a/audio/sysvad/common.cpp
+++ b/audio/sysvad/common.cpp
@@ -4281,6 +4281,7 @@ BthHfpDevice::GetBthHfpCodecId(_Out_ UCHAR * CodecId)
ASSERT(CodecId != NULL);
+#if !defined(NTDDI_WIN10_RS3)
typedef enum _HFP_BYPASS_CODEC_ID_VERSION {
REQ_HFP_BYPASS_CODEC_ID_V1 = 1,
} HFP_BYPASS_CODEC_ID_VERSION, *PHFP_BYPASS_CODEC_ID_VERSION;
@@ -4288,6 +4289,7 @@ BthHfpDevice::GetBthHfpCodecId(_Out_ UCHAR * CodecId)
typedef struct _HFP_BYPASS_CODEC_ID_V1 {
UCHAR CodecId;
} HFP_BYPASS_CODEC_ID_V1, *PHFP_BYPASS_CODEC_ID_V1;
+#endif
NTSTATUS ntStatus = STATUS_SUCCESS;
diff --git a/avstream/avscamera/README.md b/avstream/avscamera/README.md
index e6f79be6..ef956c88 100644
--- a/avstream/avscamera/README.md
+++ b/avstream/avscamera/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: AvsCamera - AVStream Camera Sample Driver
+ platform: WDM
+ language: cpp
+ category: Camera AVStream
+ description: Provides a pin-centric AVStream capture driver for a simulated front and back camera that performs simulated captures at 320x240 or 640x480 in RGB24, RGB32, YUY2 and NV12 formats at various frame rates.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620184
+--->
+
AvsCamera: AVStream Camera Sample Driver
========================================
The AvsCamera sample provides a pin-centric AVStream capture driver for a simulated front and back camera. The driver performs simulated captures at 320x240 or 640x480 in RGB24, RGB32, YUY2 and NV12 formats at various frame rates. The purpose of the sample is to demonstrate how to write a fully functional AVStream camera driver.
diff --git a/avstream/avshws/README.md b/avstream/avshws/README.md
index 240f9b6c..19019304 100644
--- a/avstream/avshws/README.md
+++ b/avstream/avshws/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: AVStream simulated hardware sample driver (Avshws)
+ platform: WDM
+ language: cpp
+ category: Camera
+ description: A simulated hardware sample driver providing a pin-centric capture driver to simulate AV capture hardware.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620185
+--->
+
AVStream simulated hardware sample driver (Avshws)
==================================================
diff --git a/avstream/avssamp/README.md b/avstream/avssamp/README.md
index 6188c5b3..979dda3c 100644
--- a/avstream/avssamp/README.md
+++ b/avstream/avssamp/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: AVStream filter-centric simulated capture sample driver (Avssamp)
+ platform: WDM
+ language: cpp
+ category: Camera
+ description: An AVStream filter-centric simulated capture sample driver with functional audio.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620186
+--->
+
AVStream filter-centric simulated capture sample driver (Avssamp)
=================================================================
diff --git a/avstream/samplemft0/README.md b/avstream/samplemft0/README.md
index 7f6e50f6..42f23db4 100644
--- a/avstream/samplemft0/README.md
+++ b/avstream/samplemft0/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: Driver MFT Sample
+ platform: WDM
+ language: cpp
+ category: Camera
+ description: A driver MFT for use with a camera's Windows Store device app.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617126
+--->
+
Driver MFT Sample
=================
diff --git a/biometrics/README.md b/biometrics/README.md
index 0a366501..102a94b8 100644
--- a/biometrics/README.md
+++ b/biometrics/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Windows Biometric Driver Samples (UMDF Version 1)
+ platform: UMDF1
+ language: cpp
+ category: Security Biometrics
+ description: Contains the Windows Biometric Driver Interface sample and the Windows Biometric Service Adapter samples.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620189
+--->
+
+
Windows Biometric Driver Samples (UMDF Version 1)
=================================================
diff --git a/bluetooth/bthecho/README.md b/bluetooth/bthecho/README.md
index 6c1a7a2f..be465a7e 100644
--- a/bluetooth/bthecho/README.md
+++ b/bluetooth/bthecho/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: Bluetooth Echo L2CAP Profile Driver
+ platform: WDM
+ language: cpp
+ category: Bluetooth
+ description: Demonstrates development of Bluetooth L2CAP profile drivers using the Bluetooth L2CAP DDIs.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617640
+--->
+
Bluetooth Echo L2CAP Profile Driver
===================================
diff --git a/bluetooth/serialhcibus/README.md b/bluetooth/serialhcibus/README.md
index 45f56512..9fc965b6 100644
--- a/bluetooth/serialhcibus/README.md
+++ b/bluetooth/serialhcibus/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: Bluetooth Serial HCI Bus Driver
+ platform: WDM
+ language: cpp
+ category: Bluetooth
+ description: Demonstrates how to implement a basic bus driver to support the new Bluetooth Extensibility transport DDIs over the UART transport.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617641
+--->
+
Bluetooth Serial HCI Bus Driver
===============================
diff --git a/bluetooth/serialhcibus/WDK/SerialBusWdk.vcxproj b/bluetooth/serialhcibus/WDK/SerialBusWdk.vcxproj
index 1aa3a43c..6319ca83 100644
--- a/bluetooth/serialhcibus/WDK/SerialBusWdk.vcxproj
+++ b/bluetooth/serialhcibus/WDK/SerialBusWdk.vcxproj
@@ -103,11 +103,11 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
@@ -115,7 +115,7 @@
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
</Midl>
<Link>
@@ -124,11 +124,11 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
@@ -136,7 +136,7 @@
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
</Midl>
<Link>
@@ -145,11 +145,11 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
@@ -157,7 +157,7 @@
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
</Midl>
<Link>
@@ -166,11 +166,11 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
@@ -178,7 +178,7 @@
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);RESHUB_USE_HELPER_ROUTINES</PreprocessorDefinitions>
</Midl>
<Link>
@@ -201,4 +201,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/filesys/cdfs/README.md b/filesys/cdfs/README.md
index 601b22bf..cbe8e4c4 100644
--- a/filesys/cdfs/README.md
+++ b/filesys/cdfs/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: CDFS File System Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: The CD-ROM file system driver (cdfs) sample is a file system driver for removable media.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617642
+--->
+
+
CDFS File System Driver
=======================
diff --git a/filesys/fastfat/README.md b/filesys/fastfat/README.md
index c5ef6b75..801e3f73 100644
--- a/filesys/fastfat/README.md
+++ b/filesys/fastfat/README.md
@@ -1,3 +1,14 @@
+<!---
+ name: fastfat File System Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: A file system driver based on the Windows inbox FastFAT file system used as a model for new file systems.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620305
+--->
+
+
+
fastfat File System Driver
==========================
diff --git a/filesys/miniFilter/MetadataManager/README.md b/filesys/miniFilter/MetadataManager/README.md
index 6df7bd91..2c56f719 100644
--- a/filesys/miniFilter/MetadataManager/README.md
+++ b/filesys/miniFilter/MetadataManager/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Metadata Manager File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: An example of how to use files for storing metadata that corresponds to minifilters.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617650
+--->
+
+
Metadata Manager File System Minifilter Driver
==============================================
diff --git a/filesys/miniFilter/NameChanger/README.md b/filesys/miniFilter/NameChanger/README.md
index 9a2e9929..71b857ef 100644
--- a/filesys/miniFilter/NameChanger/README.md
+++ b/filesys/miniFilter/NameChanger/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: NameChanger File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: Grafts a directory from one part of a volume's namespace to another part using a mapping.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617652
+--->
+
+
NameChanger File System Minifilter Driver
=========================================
diff --git a/filesys/miniFilter/avscan/README.md b/filesys/miniFilter/avscan/README.md
index 31954fec..d1159670 100644
--- a/filesys/miniFilter/avscan/README.md
+++ b/filesys/miniFilter/avscan/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: AvScan File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: This filter is a transaction-aware file scanner that examines data in files.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617644
+--->
+
+
AvScan File System Minifilter Driver
====================================
diff --git a/filesys/miniFilter/cancelSafe/README.md b/filesys/miniFilter/cancelSafe/README.md
index c8cacf28..3e4c7b06 100644
--- a/filesys/miniFilter/cancelSafe/README.md
+++ b/filesys/miniFilter/cancelSafe/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: CancelSafe File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: A minifilter demonstrating the use of cancel-safe queues.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617645
+--->
+
+
CancelSafe File System Minifilter Driver
========================================
diff --git a/filesys/miniFilter/cdo/README.md b/filesys/miniFilter/cdo/README.md
index 4f37890f..2c0a03fa 100644
--- a/filesys/miniFilter/cdo/README.md
+++ b/filesys/miniFilter/cdo/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: CDO File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: An example of using a control device object (CDO) with a minifilter.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617646
+--->
+
+
CDO File System Minifilter Driver
=================================
diff --git a/filesys/miniFilter/change/README.md b/filesys/miniFilter/change/README.md
index 6d541083..3e4af1db 100644
--- a/filesys/miniFilter/change/README.md
+++ b/filesys/miniFilter/change/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Change File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: A transaction-aware filter that monitors file changes in real time.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617647
+--->
+
+
Change File System Minifilter Driver
====================================
diff --git a/filesys/miniFilter/ctx/README.md b/filesys/miniFilter/ctx/README.md
index 7609985a..326c9221 100644
--- a/filesys/miniFilter/ctx/README.md
+++ b/filesys/miniFilter/ctx/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Ctx File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: Demonstrates how to attach contexts to instances, files, streams, and stream handles in your minifilter.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617648
+--->
+
+
Ctx File System Minifilter Driver
=================================
diff --git a/filesys/miniFilter/delete/README.md b/filesys/miniFilter/delete/README.md
index ad60db1a..b56eded0 100644
--- a/filesys/miniFilter/delete/README.md
+++ b/filesys/miniFilter/delete/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: Delete File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: Demonstrates how to detect deletions of files or streams.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617649
+--->
+
Delete File System Minifilter Driver
====================================
diff --git a/filesys/miniFilter/minispy/README.md b/filesys/miniFilter/minispy/README.md
index ca3749d3..075675b7 100644
--- a/filesys/miniFilter/minispy/README.md
+++ b/filesys/miniFilter/minispy/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Minispy File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: A tool to monitor and log any I/O and transaction activity that occurs in the system.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617651
+--->
+
+
Minispy File System Minifilter Driver
=====================================
diff --git a/filesys/miniFilter/nullFilter/README.md b/filesys/miniFilter/nullFilter/README.md
index 06d825eb..e0c2ff2e 100644
--- a/filesys/miniFilter/nullFilter/README.md
+++ b/filesys/miniFilter/nullFilter/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: NullFilter File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: A minifilter that demonstrates registration with the filter manager.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617653
+--->
+
NullFilter File System Minifilter Driver
========================================
diff --git a/filesys/miniFilter/passThrough/README.md b/filesys/miniFilter/passThrough/README.md
index 91230df5..7400c146 100644
--- a/filesys/miniFilter/passThrough/README.md
+++ b/filesys/miniFilter/passThrough/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: PassThrough File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: Demonstrates how to specify callback functions for different types of I/O requests.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617654
+--->
+
+
PassThrough File System Minifilter Driver
=========================================
diff --git a/filesys/miniFilter/scanner/README.md b/filesys/miniFilter/scanner/README.md
index 46009e9a..eb9d2bcd 100644
--- a/filesys/miniFilter/scanner/README.md
+++ b/filesys/miniFilter/scanner/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Scanner File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: A file data scanner example. Typically, anti-virus filters are of this type.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617655
+--->
+
+
Scanner File System Minifilter Driver
=====================================
diff --git a/filesys/miniFilter/simrep/README.md b/filesys/miniFilter/simrep/README.md
index fcf31965..df02b1f5 100644
--- a/filesys/miniFilter/simrep/README.md
+++ b/filesys/miniFilter/simrep/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SimRep File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: Demonstrates how a file system filter can simulate file-system like reparse-point behavior to redirect a file open to an alternate path.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617656
+--->
+
+
SimRep File System Minifilter Driver
====================================
diff --git a/filesys/miniFilter/swapBuffers/README.md b/filesys/miniFilter/swapBuffers/README.md
index e57b38a5..f2c48181 100644
--- a/filesys/miniFilter/swapBuffers/README.md
+++ b/filesys/miniFilter/swapBuffers/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SwapBuffer File System Minifilter Driver
+ platform: WDM
+ language: cpp
+ category: FileSystem
+ description: Demonstrates how to switch buffers between reads and writes of data. This technique is particularly useful for encryption filters.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617657
+--->
+
+
SwapBuffer File System Minifilter Driver
========================================
diff --git a/general/DCHU/README.md b/general/DCHU/README.md
index df571af6..bf74d451 100644
--- a/general/DCHU/README.md
+++ b/general/DCHU/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: DHCU - Driver package installation toolkit for universal drivers
+ platform: UMDF2
+ language: cpp
+ category: General DHCU
+ description: Illustrates DCHU principles of universal driver design.
+ samplefwlink: https://aka.ms/sceeqq
+--->
+
+
# Driver package installation toolkit for universal drivers
This sample illustrates the DCHU principles of universal driver design. The sample uses the [OSR FX2 learning kit](http://store.osr.com/product/osr-usb-fx2-learning-kit-v2/). For a detailed code walkthrough, see [Universal Driver Scenarios](https://docs.microsoft.com/windows-hardware/drivers/develop/universal-driver-scenarios).
@@ -6,22 +16,26 @@ There are three Visual Studio solutions in this sample. Each one represents a s
* `osrfx2_DCHU_base` : The driver for the OSR FX2 Learning Kit. This includes the device driver, an upper filter driver for the device (a no-op), a Win32 User Service that controls lights on the device, and a console app that can control the device.
-* `osrfx2_DCHU_extension`: An extension driver for the OSR FX2 device. This extension modifies some registry settings originally specified by the base driver (`osrfx2_DCHU_base`).
+* `osrfx2_DCHU_extension_loose`: An extension INF for the OSR FX2 device. This extension modifies some registry settings originally specified by the base driver (`osrfx2_DCHU_base`) and also uses AddComponent to create a Software Component. There is also a component INF project that would be a separate submission to DevCenter, which runs some simple software. These two projects are loosely coupled, and can be installed in any order on the machine.
+
+* `osrfx2_DCHU_extension_tight`: An extension INF for the OSR FX2 device. This extension mimics the behavior of `osrfx2_DCHU_extension_loose`; however, it does so in a tightly coupled manner. Using CopyINF, both the extension and component INF are placed into one driver package (and one submission to DevCenter). Here there is less flexibility with the base/component/extension relationship, but it ensures that the component INF is applied at the same time as the extension.
+
+Both `osrfx2_DCHU_extension_loose` and `osrfx2_DCHU_extension_tight` provide the same functionality, so installing both on the same OSR FX2 device is unnecessary. They are intended to show a different way to use extension and component INF's depending on a project's needs.
-* `osrfx2_DCHU_component`: A Software Component that installs on a device that the base driver package's INF (`osrfx2_DCHU_base.inf`) creates using the [INF AddComponent Directive](https://docs.microsoft.com/windows-hardware/drivers/install/inf-addcomponent-directive). This Software Component executes a legacy .exe to install a file in the `C:\Program Files\...` directory that reads the OSR FX2 device's registry settings applied in the base driver package's INF (`osrfx2_DCHU_base.inf`)
+NOTE: osrfx2_DCHU_extension_tight will not currently build on Windows 10 version 1703. You will see an error saying that the directive CopyINF does not work from extension INFs. This has been fixed for the Windows 10 Fall Creators Update.
Each of these solutions can be built with the latest WDK on Visual Studio 2015. Additionally, you can also download a [Universal Windows Platform app (UWP)](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CustomCapability) that controls the OSR FX2 Learning Kit's device. To learn how to pair a UWP app with a device, see [Hardware access for Universal Windows Platform apps](https://docs.microsoft.com/windows-hardware/drivers/devapps/hardware-access-for-universal-windows-platform-apps)
-The app and the contents of this sample can coexist, but on Windows 10, version 1703, to build the app with Visual Studio 2017, the computer cannot have the WDK installed.
+The app and the contents of this sample can coexist, but on Windows 10 version 1703, to build the app with Visual Studio 2017, the computer cannot have the WDK installed.
To install these driver packages, make sure that the target machine is in Test Mode, using `bcdedit /set testsigning on`.
-Then, use `pnputil /i /a <PATHTOINF>` to install each of the three driver packages. They should
+Then, use `pnputil /i /a <PATHTOINF>` to install each of the desired driver packages. They should
be installed in the following order:
- * `osrfx2_DCHU_base`
- * `osrfx2_DCHU_extension`
- * `osrfx2_DCHU_component`
+* `osrfx2_DCHU_base`
+* `osrfx2_DCHU_extension`
+* `osrfx2_DCHU_component`
Technically the order of `osrfx2_DCHU_extension` and `osrfx2_DCHU_component` doesn't matter, but the software within `osrfx2_DCHU_component` will read the registry set by the extension to show that an extension INF's settings are applied *after* the base INF's.
- \ No newline at end of file
+
diff --git a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base.sln b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base.sln
index ce0593e1..dfa90dbd 100644
--- a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base.sln
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base.sln
@@ -10,6 +10,7 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_base", "osrfx2_DCHU_base\osrfx2_DCHU_base.vcxproj", "{5B711254-3F53-4E1D-A1AD-CC81E34588B7}"
ProjectSection(ProjectDependencies) = postProject
{3CC42473-D121-41F4-AE26-1F2F0AC65E82} = {3CC42473-D121-41F4-AE26-1F2F0AC65E82}
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3} = {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_testapp", "osrfx2_DCHU_testapp\osrusbfx2.vcxproj", "{6EED5CDD-5526-40DC-97F9-582857E10187}"
@@ -18,6 +19,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_filter", "osrfx
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_filter", "osrfx2_DCHU_filter\osrfx2_DCHU_filter.vcxproj", "{3CC42473-D121-41F4-AE26-1F2F0AC65E82}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_usersvc", "osrfx2_DCHU_usersvc", "{DA04929E-1AFF-4EB7-935F-E9485C0316DB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_usersvc", "osrfx2_DCHU_usersvc\osrfx2_DCHU_usersvc.vcxproj", "{DE70E2D1-6A4D-4984-BD82-CE750889F0D3}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
@@ -42,6 +47,7 @@ Global
{5B711254-3F53-4E1D-A1AD-CC81E34588B7}.Release|ARM64.ActiveCfg = Release|Win32
{5B711254-3F53-4E1D-A1AD-CC81E34588B7}.Release|Win32.ActiveCfg = Release|Win32
{5B711254-3F53-4E1D-A1AD-CC81E34588B7}.Release|Win32.Build.0 = Release|Win32
+ {5B711254-3F53-4E1D-A1AD-CC81E34588B7}.Release|Win32.Deploy.0 = Release|Win32
{5B711254-3F53-4E1D-A1AD-CC81E34588B7}.Release|x64.ActiveCfg = Release|x64
{5B711254-3F53-4E1D-A1AD-CC81E34588B7}.Release|x64.Build.0 = Release|x64
{6EED5CDD-5526-40DC-97F9-582857E10187}.Debug|ARM.ActiveCfg = Debug|Win32
@@ -72,6 +78,18 @@ Global
{3CC42473-D121-41F4-AE26-1F2F0AC65E82}.Release|x64.ActiveCfg = Release|x64
{3CC42473-D121-41F4-AE26-1F2F0AC65E82}.Release|x64.Build.0 = Release|x64
{3CC42473-D121-41F4-AE26-1F2F0AC65E82}.Release|x64.Deploy.0 = Release|x64
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|ARM.ActiveCfg = Debug|Win32
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|ARM64.ActiveCfg = Debug|Win32
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|Win32.Build.0 = Debug|Win32
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|x64.ActiveCfg = Debug|x64
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|x64.Build.0 = Debug|x64
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|ARM.ActiveCfg = Release|Win32
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|ARM64.ActiveCfg = Release|Win32
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|Win32.ActiveCfg = Release|Win32
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|Win32.Build.0 = Release|Win32
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|x64.ActiveCfg = Release|x64
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -80,5 +98,6 @@ Global
{5B711254-3F53-4E1D-A1AD-CC81E34588B7} = {3B268182-F450-4AB8-B350-A2CF6495F756}
{6EED5CDD-5526-40DC-97F9-582857E10187} = {52ABC41E-9AAA-4DA8-8986-F6298E32C8A3}
{3CC42473-D121-41F4-AE26-1F2F0AC65E82} = {1665ED66-7966-4FE2-9BA5-B5843511E325}
+ {DE70E2D1-6A4D-4984-BD82-CE750889F0D3} = {DA04929E-1AFF-4EB7-935F-E9485C0316DB}
EndGlobalSection
EndGlobal
diff --git a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inx b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inx
index c4cead6a..4b37e644 100644
--- a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inx
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.inx
Binary files differ
diff --git a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.vcxproj b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.vcxproj
index 4a34c9dc..0c4dec56 100644
--- a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.vcxproj
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_base/osrfx2_DCHU_base.vcxproj
@@ -26,7 +26,7 @@
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<SampleGuid>{F915ED95-7BE9-4CDB-B09A-0D3F4C9657FE}</SampleGuid>
<ProjectName>osrfx2_DCHU_base</ProjectName>
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -63,7 +63,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
- <OutDir>$(IntDir)</OutDir>
+ <OutDir>$(SolutionDir)$(Platform)\$(ConfigurationName)\</OutDir>
</PropertyGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
@@ -137,6 +137,7 @@
</Midl>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\onecore.lib;$(SDK_LIB_PATH)\WppRecorderUM.lib</AdditionalDependencies>
+ <IgnoreSpecificDefaultLibraries />
</Link>
<Inf>
<TimeStamp>1.0.0.0</TimeStamp>
@@ -162,6 +163,7 @@
</Midl>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\onecore.lib;$(SDK_LIB_PATH)\WppRecorderUM.lib</AdditionalDependencies>
+ <IgnoreSpecificDefaultLibraries />
</Link>
<Inf>
<TimeStamp>1.0.0.0</TimeStamp>
@@ -187,6 +189,7 @@
</Midl>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\onecore.lib;$(SDK_LIB_PATH)\WppRecorderUM.lib</AdditionalDependencies>
+ <IgnoreSpecificDefaultLibraries />
</Link>
<Inf>
<TimeStamp>1.0.0.0</TimeStamp>
@@ -212,21 +215,30 @@
</Midl>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\onecore.lib;$(SDK_LIB_PATH)\WppRecorderUM.lib</AdditionalDependencies>
+ <IgnoreSpecificDefaultLibraries />
</Link>
<Inf>
<TimeStamp>1.0.0.0</TimeStamp>
</Inf>
</ItemDefinitionGroup>
<ItemGroup>
+ <FilesToPackage Include="$(SolutionDir)$(Platform)\$(ConfigurationName)\osrfx2_DCHU_base.dll" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PackageRelativeDirectory>
+ </PackageRelativeDirectory>
+ </FilesToPackage>
<FilesToPackage Include="$(SolutionDir)$(Platform)\$(ConfigurationName)\osrfx2_DCHU_filter.dll" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PackageRelativeDirectory>
</PackageRelativeDirectory>
</FilesToPackage>
+ <FilesToPackage Include="$(SolutionDir)$(Platform)\$(ConfigurationName)\osrfx2_DCHU_usersvc.exe" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <PackageRelativeDirectory>
+ </PackageRelativeDirectory>
+ </FilesToPackage>
<FilesToPackage Include="$(SolutionDir)$(Platform)\$(ConfigurationName)\osrfx2_DCHU_filter.dll" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PackageRelativeDirectory>
</PackageRelativeDirectory>
</FilesToPackage>
- <FilesToPackage Include="$(SolutionDir)$(Platform)\$(ConfigurationName)\osrfx2_DCHU_filter.dll" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <FilesToPackage Include="$(SolutionDir)$(Platform)\$(ConfigurationName)\osrfx2_DCHU_usersvc.exe" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PackageRelativeDirectory>
</PackageRelativeDirectory>
</FilesToPackage>
@@ -234,11 +246,19 @@
<PackageRelativeDirectory>
</PackageRelativeDirectory>
</FilesToPackage>
- <Inf Include="osrfx2_DCHU_base.inx" />
- <FilesToPackage Include="$(TargetPath)" Condition="'$(ConfigurationType)'=='Driver' or '$(ConfigurationType)'=='DynamicLibrary'">
+ <FilesToPackage Include="$(SolutionDir)$(Platform)\$(ConfigurationName)\osrfx2_DCHU_usersvc.exe" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PackageRelativeDirectory>
</PackageRelativeDirectory>
</FilesToPackage>
+ <FilesToPackage Include="$(SolutionDir)$(Platform)\$(ConfigurationName)\osrfx2_DCHU_filter.dll" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PackageRelativeDirectory>
+ </PackageRelativeDirectory>
+ </FilesToPackage>
+ <FilesToPackage Include="$(SolutionDir)$(Platform)\$(ConfigurationName)\osrfx2_DCHU_usersvc.exe" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <PackageRelativeDirectory>
+ </PackageRelativeDirectory>
+ </FilesToPackage>
+ <Inf Include="osrfx2_DCHU_base.inx" />
</ItemGroup>
<ItemGroup>
<None Exclude="@(None)" Include="*.txt;*.htm;*.html" />
diff --git a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_filter/osrfx2_DCHU_filter.vcxproj b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_filter/osrfx2_DCHU_filter.vcxproj
index 0ef42141..36d85583 100644
--- a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_filter/osrfx2_DCHU_filter.vcxproj
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_filter/osrfx2_DCHU_filter.vcxproj
@@ -27,7 +27,7 @@
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<SampleGuid>{1A4A32BA-1596-4F52-BC48-B85A6D8D5D12}</SampleGuid>
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<ProjectName>osrfx2_DCHU_filter</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -101,7 +101,7 @@
</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\onecore.lib</AdditionalDependencies>
+ <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)onecore.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\..\inc</AdditionalIncludeDirectories>
@@ -137,7 +137,7 @@
</ExceptionHandling>
</ClCompile>
<Link>
- <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\onecore.lib</AdditionalDependencies>
+ <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)onecore.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\..\inc</AdditionalIncludeDirectories>
diff --git a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_testapp/osrusbfx2.vcxproj b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_testapp/osrusbfx2.vcxproj
index e1450faf..225dcde2 100644
--- a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_testapp/osrusbfx2.vcxproj
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_testapp/osrusbfx2.vcxproj
@@ -25,7 +25,7 @@
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<SampleGuid>{F19E45AF-8B05-4204-A66B-9BDBFE333233}</SampleGuid>
<ProjectName>osrfx2_DCHU_testapp</ProjectName>
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/CppWindowsService.cpp b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/CppWindowsService.cpp
index 98a3975c..98a3975c 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/CppWindowsService.cpp
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/CppWindowsService.cpp
diff --git a/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Main.cpp b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Main.cpp
new file mode 100644
index 00000000..a02ac24a
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Main.cpp
@@ -0,0 +1,1217 @@
+/*++
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+ THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+ PURPOSE.
+
+Module Name:
+
+ Main.cpp
+
+Abstract:
+
+ Implements the functions to control the OSR USB FX2 device.
+
+Environment:
+
+ User mode
+
+--*/
+
+#include "Main.h"
+#include "Utils.h"
+
+//
+// Keep track of where the OSRFX2 device's bar graph currently is.
+//
+INT CurrentBar;
+BAR_GRAPH_STATE BarGraphState;
+
+/*++
+
+Routine Description:
+
+ Sets the variables in this service to their default values.
+
+Arguments:
+
+ VOID
+
+Return Value:
+
+ VOID
+
+--*/
+VOID
+SetVariables()
+{
+ CurrentBar = 0;
+}
+
+
+/*++
+
+Routine Description:
+
+ Retrieves the device path of a given interface.
+
+Arguments:
+
+ InterfaceGuid - The GUID of the interface to search for
+
+ DevicePath - The resulting device path
+
+ DevicePathLength - The length of DevicePath
+
+Return Value:
+
+ TRUE if the function succeeded and FALSE otherwise. Errors
+ are logged in the Application event log.
+
+--*/
+_Success_(return)
+BOOL
+GetDevicePath(
+ _In_ LPGUID InterfaceGuid,
+ _Out_writes_z_(DevicePathLength) PWCHAR DevicePath,
+ _In_ size_t DevicePathLength
+ )
+{
+ HRESULT hr = E_FAIL;
+ CONFIGRET cr = CR_SUCCESS;
+ PWSTR DeviceInterfaceList = NULL;
+ ULONG DeviceInterfaceListLength = 0;
+ PWSTR NextInterface;
+
+ //
+ // Determine if there are any interfaces that match the OSRFX2 device.
+ //
+ cr = CM_Get_Device_Interface_List_Size(&DeviceInterfaceListLength,
+ InterfaceGuid,
+ NULL,
+ CM_GET_DEVICE_INTERFACE_LIST_PRESENT);
+
+ if (cr != CR_SUCCESS)
+ {
+ WriteToErrorLog(L"CM_Get_DeviceInterface_List_Size",
+ CM_MapCrToWin32Err(cr, ERROR_FILE_NOT_FOUND));
+ goto cleanup;
+ }
+
+ if (DeviceInterfaceListLength < 1)
+ {
+ WriteToErrorLog(L"CM_Get_DeviceInterface_List_Size",
+ CM_MapCrToWin32Err(cr, ERROR_EMPTY));
+ goto cleanup;
+ }
+
+ DeviceInterfaceList = (PWSTR)malloc(DeviceInterfaceListLength * sizeof(WCHAR));
+
+ if (DeviceInterfaceList == NULL)
+ {
+ WriteToEventLog(L"Failed to allocate memory for the device interface list",
+ TRACE_LEVEL_ERROR);
+ goto cleanup;
+ }
+
+ cr = CM_Get_Device_Interface_List(InterfaceGuid,
+ NULL,
+ DeviceInterfaceList,
+ DeviceInterfaceListLength,
+ CM_GET_DEVICE_INTERFACE_LIST_PRESENT);
+
+ if (cr != CR_SUCCESS)
+ {
+ WriteToErrorLog(L"CM_Get_Device_Interface_List",
+ CM_MapCrToWin32Err(cr, ERROR_FILE_NOT_FOUND));
+ goto cleanup;
+ }
+
+ if (*DeviceInterfaceList == UNICODE_NULL)
+ {
+ WriteToEventLog(L"CM_Get_Device_Interface_List returned an empty list",
+ TRACE_LEVEL_ERROR);
+ }
+
+ //
+ // This sample only expects one interface for the OSRFX2 device. For other
+ // devices, though, it maybe necessary to sift through the interfaces
+ // from CM_Get_Device_Interface_List in order to find the correct device.
+ //
+ NextInterface = DeviceInterfaceList + wcslen(DeviceInterfaceList) + 1;
+
+ if (*NextInterface != UNICODE_NULL)
+ {
+ WriteToEventLog(L"More than one device interface instance found. "
+ "Selecting first matching device.",
+ TRACE_LEVEL_WARNING);
+ }
+
+ hr = StringCchCopy(DevicePath, DevicePathLength, DeviceInterfaceList);
+
+ if (FAILED(hr))
+ {
+ WriteToErrorLog(L"StringCchCopy", HRESULT_CODE(hr));
+ goto cleanup;
+ }
+
+cleanup:
+
+ if (DeviceInterfaceList != NULL)
+ {
+ free(DeviceInterfaceList);
+ }
+
+ return (cr == CR_SUCCESS);
+}
+
+
+/*++
+
+Routine Description:
+
+ Opens up the OSR USB FX2 device handle.
+
+Arguments:
+
+ Synchronous - Whether or not this device should be opened for syncrhonous
+ access
+
+Return Value:
+
+ The handle to the OSR USB FX2 device.
+
+--*/
+_Check_return_
+_Ret_notnull_
+_Success_(return != INVALID_HANDLE_VALUE)
+HANDLE
+OpenDevice(
+ _In_ BOOL Synchronous
+ )
+{
+ HANDLE DeviceHandle = INVALID_HANDLE_VALUE;
+ WCHAR DeviceName[MAX_DEVPATH_LENGTH];
+
+ if (!GetDevicePath((LPGUID)&GUID_DEVINTERFACE_OSRUSBFX2,
+ DeviceName,
+ sizeof(DeviceName) / sizeof(DeviceName[0])))
+ {
+ goto cleanup;
+ }
+
+ //
+ // Open a handle to the interface.
+ //
+ if (Synchronous)
+ {
+ DeviceHandle = CreateFile(DeviceName,
+ GENERIC_WRITE | GENERIC_READ,
+ FILE_SHARE_WRITE | FILE_SHARE_READ,
+ NULL, // default security
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL);
+ }
+ else
+ {
+ DeviceHandle = CreateFile(DeviceName,
+ GENERIC_WRITE | GENERIC_READ,
+ FILE_SHARE_WRITE | FILE_SHARE_READ,
+ NULL, // default security
+ OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
+ NULL);
+ }
+
+ if (DeviceHandle == INVALID_HANDLE_VALUE)
+ {
+ WriteToErrorLog(L"CreateFile", GetLastError());
+ }
+ else
+ {
+ WriteToEventLog(L"Opened Device Successfully", TRACE_LEVEL_INFORMATION);
+ }
+
+cleanup:
+
+ return DeviceHandle;
+}
+
+
+/*++
+
+Routine Description:
+
+ Handles an interface arrival notification.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+InterfaceArrivalAction(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+
+ //
+ // Now that the interface has arrived, open a handle to it, and then
+ // register that handle for device events.
+ //
+ EnterCriticalSection(&Context->Lock);
+
+ if (Context->DeviceInterfaceHandle != INVALID_HANDLE_VALUE)
+ {
+ //
+ // The handle was already retrieved.
+ //
+ Err = ERROR_SUCCESS;
+ goto cleanup;
+ }
+
+ Context->DeviceInterfaceHandle = OpenDevice(FALSE);
+
+ if (Context->DeviceInterfaceHandle == INVALID_HANDLE_VALUE)
+ {
+ Err = GetLastError();
+ WriteToErrorLog(L"Could not open device interface", Err);
+ goto cleanup;
+ }
+
+ Err = RegisterDeviceNotifications(Context);
+
+ if (Err != ERROR_SUCCESS)
+ {
+ WriteToErrorLog(L"Could not register device notifications", Err);
+ goto cleanup;
+ }
+
+cleanup:
+
+ LeaveCriticalSection(&Context->Lock);
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Handles an interface arrival notification.
+
+Arguments:
+
+ hNotify - The notification that fired the callback
+
+ hContext - The callback context
+
+ Action - The type of notification
+
+ EventData - Additional information about the callback
+
+ EventDataSize - The size of EventData
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+InterfaceCallback(
+ _In_ HCMNOTIFICATION hNotify,
+ _In_ PVOID hContext,
+ _In_ CM_NOTIFY_ACTION Action,
+ _In_ PCM_NOTIFY_EVENT_DATA EventData,
+ _In_ DWORD EventDataSize
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ PDEVICE_CONTEXT Context = (PDEVICE_CONTEXT)hContext;
+
+ //
+ // Validate Context.
+ //
+ if (Context == NULL)
+ {
+ goto cleanup;
+ }
+
+ if (Action == CM_NOTIFY_ACTION_DEVICEINTERFACEARRIVAL)
+ {
+ Err = InterfaceArrivalAction(Context);
+ }
+
+cleanup:
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Registers the service for notifications using the notification handle in
+ Context.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+RegisterInterfaceNotifications(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ CONFIGRET cr;
+ CM_NOTIFY_FILTER NotifyFilter = {0};
+
+ if (Context == NULL)
+ {
+ goto cleanup;
+ }
+
+ ZeroMemory(&NotifyFilter, sizeof(NotifyFilter));
+ NotifyFilter.cbSize = sizeof(NotifyFilter);
+ NotifyFilter.FilterType = CM_NOTIFY_FILTER_TYPE_DEVICEINTERFACE;
+ NotifyFilter.u.DeviceInterface.ClassGuid = GUID_DEVINTERFACE_OSRUSBFX2;
+
+ cr = CM_Register_Notification(&NotifyFilter,
+ (PVOID)Context,
+ (PCM_NOTIFY_CALLBACK)InterfaceCallback,
+ &Context->InterfaceNotificationHandle);
+
+ if (cr != CR_SUCCESS)
+ {
+ Err = CM_MapCrToWin32Err(cr, ERROR_INVALID_DATA);
+ WriteToErrorLog(L"CM_Register_Notification", Err);
+ goto cleanup;
+ }
+
+cleanup:
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Unregister for interface notifications. Note, this routine deadlocks
+ when called from an interface callback.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+UnregisterInterfaceNotifications(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ CONFIGRET cr;
+
+ if (Context->InterfaceNotificationHandle != NULL)
+ {
+ cr = CM_Unregister_Notification(Context->InterfaceNotificationHandle);
+
+ Context->InterfaceNotificationHandle = NULL;
+ }
+
+ return CM_MapCrToWin32Err(cr, ERROR_INVALID_DATA);
+}
+
+
+/*++
+
+Routine Description:
+
+ Callback for when a device is being query removed.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+DeviceQueryRemoveAction(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+
+ EnterCriticalSection(&Context->Lock);
+
+ if (Context->DeviceInterfaceHandle != INVALID_HANDLE_VALUE)
+ {
+ //
+ // Close open handles to allow the device to exit
+ //
+ CloseHandle(Context->DeviceInterfaceHandle);
+
+ Context->DeviceInterfaceHandle = INVALID_HANDLE_VALUE;
+ }
+
+ LeaveCriticalSection(&Context->Lock);
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ This callback avoids a deadlock when unregistering device notifications.
+ Rather than calling CM_Unregister_Notification from the callback, the
+ callback gives that work to a separate thread to avoid deadlock.
+
+Arguments:
+
+ Instance - The thread's callback instance
+
+ hContext - The callback context
+
+ pWork - The thread handle
+
+Return Value:
+
+ VOID
+
+--*/
+VOID
+CALLBACK
+UnregisterWorkerThreadCallback(
+ _Inout_ PTP_CALLBACK_INSTANCE Instance,
+ _Inout_opt_ PVOID hContext,
+ _Inout_ PTP_WORK pWork
+ )
+{
+ PDEVICE_CONTEXT Context = (PDEVICE_CONTEXT)hContext;
+
+ EnterCriticalSection(&Context->Lock);
+
+ UnregisterDeviceNotifications(Context);
+
+ //
+ // Close the device handle.
+ //
+ if (Context->DeviceInterfaceHandle != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(Context->DeviceInterfaceHandle);
+
+ Context->DeviceInterfaceHandle = INVALID_HANDLE_VALUE;
+ }
+
+ LeaveCriticalSection(&Context->Lock);
+}
+
+
+/*++
+
+Routine Description:
+
+ Handles a device query remove failed notification.
+
+Arguments:
+
+ hNotify - The notification that spurred this callback
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+DeviceQueryRemoveFailedAction(
+ _In_ HCMNOTIFICATION hNotify,
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+
+ EnterCriticalSection(&Context->Lock);
+
+ //
+ // In case this callback fires before the registration call returns, make
+ // sure the notification handle is properly set.
+ //
+ Context->InterfaceNotificationHandle = hNotify;
+
+ //
+ // Unregister the device callback, and then close the handle
+ //
+ if (!Context->Unregister)
+ {
+ Context->Unregister = TRUE;
+ SubmitThreadpoolWork(Context->Work);
+ }
+
+ LeaveCriticalSection(&Context->Lock);
+
+ //
+ // Wait for the callback and then re-register the device
+ //
+ WaitForThreadpoolWorkCallbacks(Context->Work, FALSE);
+
+ EnterCriticalSection(&Context->Lock);
+
+ if (Context->DeviceInterfaceHandle == INVALID_HANDLE_VALUE)
+ {
+ Context->DeviceInterfaceHandle = OpenDevice(FALSE);
+ }
+
+ if (Context->DeviceInterfaceHandle != INVALID_HANDLE_VALUE)
+ {
+ RegisterDeviceNotifications(Context);
+ }
+
+ LeaveCriticalSection(&Context->Lock);
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Handles a device remove pending notification.
+
+Arguments:
+
+ hNotify - The notification that spurred this callback
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+DeviceRemovePendingAction(
+ _In_ HCMNOTIFICATION hNotify,
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+
+ EnterCriticalSection(&Context->Lock);
+
+ //
+ // In case this callback fires before the registration call returns, make
+ // sure the notification handle is properly set.
+ //
+ Context->InterfaceNotificationHandle = hNotify;
+
+ //
+ // Unregister the device callback, and then close the handle
+ //
+ if (!Context->Unregister)
+ {
+ Context->Unregister = TRUE;
+ SubmitThreadpoolWork(Context->Work);
+ }
+
+ LeaveCriticalSection(&Context->Lock);
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Handles a device remove complete notification.
+
+Arguments:
+
+ hNotify - The notification that spurred this callback
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+DeviceRemoveCompleteAction(
+ _In_ HCMNOTIFICATION hNotify,
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+
+ EnterCriticalSection(&Context->Lock);
+
+ //
+ // In case this callback fires before the registration call returns, make
+ // sure the notification handle is properly set.
+ //
+ Context->InterfaceNotificationHandle = hNotify;
+
+ //
+ // Unregister the device callback, and then close the handle
+ //
+ if (!Context->Unregister)
+ {
+ Context->Unregister = TRUE;
+ SubmitThreadpoolWork(Context->Work);
+ }
+
+ LeaveCriticalSection(&Context->Lock);
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Handles device notifications.
+
+Arguments:
+
+ hNotify - The notification that spurred this callback
+
+ hContext - The callback context
+
+ Action - The type of callback
+
+ EventData - Additional information about this callback
+
+ EventDataSize - The size of EventData
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+DeviceCallback(
+ _In_ HCMNOTIFICATION hNotify,
+ _In_ PVOID hContext,
+ _In_ CM_NOTIFY_ACTION Action,
+ _In_ PCM_NOTIFY_EVENT_DATA EventData,
+ _In_ DWORD EventDataSize
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ PDEVICE_CONTEXT Context = (PDEVICE_CONTEXT)hContext;
+
+ //
+ // Validate Context.
+ //
+ if (Context == NULL)
+ {
+ goto cleanup;
+ }
+
+ switch (Action)
+ {
+ case CM_NOTIFY_ACTION_DEVICEQUERYREMOVE:
+ DeviceQueryRemoveAction(Context);
+ break;
+
+ case CM_NOTIFY_ACTION_DEVICEQUERYREMOVEFAILED:
+ DeviceQueryRemoveFailedAction(hNotify, Context);
+ break;
+
+ case CM_NOTIFY_ACTION_DEVICEREMOVEPENDING:
+ DeviceRemovePendingAction(hNotify, Context);
+ break;
+
+ case CM_NOTIFY_ACTION_DEVICEREMOVECOMPLETE:
+ DeviceRemoveCompleteAction(hNotify, Context);
+ break;
+ }
+
+cleanup:
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Register for device notifications.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+RegisterDeviceNotifications(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ CONFIGRET cr;
+ CM_NOTIFY_FILTER NotifyFilter = {0};
+
+ NotifyFilter.cbSize = sizeof(NotifyFilter);
+ NotifyFilter.FilterType = CM_NOTIFY_FILTER_TYPE_DEVICEHANDLE;
+ NotifyFilter.u.DeviceHandle.hTarget = Context->DeviceInterfaceHandle;
+
+ cr = CM_Register_Notification(&NotifyFilter,
+ (PVOID)Context,
+ (PCM_NOTIFY_CALLBACK)DeviceCallback,
+ &Context->DeviceNotificationHandle);
+
+ if (cr != CR_SUCCESS)
+ {
+ Err = CM_MapCrToWin32Err(cr, ERROR_INVALID_DATA);
+ WriteToEventLog(L"Could not register for notifications", TRACE_LEVEL_WARNING);
+ goto cleanup;
+ }
+
+ Context->Unregister = FALSE;
+
+cleanup:
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Unregister for device notifications.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+UnregisterDeviceNotifications(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ CONFIGRET cr;
+
+ if (Context->DeviceNotificationHandle != NULL)
+ {
+ cr = CM_Unregister_Notification(Context->DeviceNotificationHandle);
+
+ if (cr != CR_SUCCESS)
+ {
+ Err = CM_MapCrToWin32Err(cr, ERROR_INVALID_DATA);
+ WriteToEventLog(L"Could not unregister notifications", TRACE_LEVEL_WARNING);
+ }
+
+ Context->DeviceNotificationHandle = NULL;
+ }
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Initialize the given PDEVICE_CONTEXT.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+InitializeContext(
+ _Out_ PDEVICE_CONTEXT *Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ BOOL LockInitialized = FALSE;
+ BOOL LockEntered = FALSE;
+ BOOL InterfaceNotificationsInitialized = FALSE;
+ BOOL DeviceNotificationsInitialized = FALSE;
+ PDEVICE_CONTEXT DeviceContext;
+
+ DeviceContext = (PDEVICE_CONTEXT)malloc(sizeof(DEVICE_CONTEXT));
+
+ if (DeviceContext == NULL)
+ {
+ Err = ERROR_OUTOFMEMORY;
+ goto cleanup;
+ }
+
+ DeviceContext->DeviceInterfaceHandle = INVALID_HANDLE_VALUE;
+ DeviceContext->LockEnabled = FALSE;
+ DeviceContext->InterfaceNotificationsEnabled = FALSE;
+ DeviceContext->DeviceNotificationsEnabled = FALSE;
+
+ InitializeCriticalSection(&DeviceContext->Lock);
+ DeviceContext->LockEnabled = TRUE;
+
+ DeviceContext->Work = CreateThreadpoolWork(UnregisterWorkerThreadCallback, (PVOID)DeviceContext, NULL);
+
+ if (DeviceContext->Work == NULL)
+ {
+ Err = GetLastError();
+ WriteToErrorLog(L"Could not create worker thread callback", Err);
+ goto cleanup;
+ }
+
+ DeviceContext->DeviceNotificationHandle = NULL;
+ DeviceContext->InterfaceNotificationHandle = NULL;
+
+ //
+ // Register for device interface events to open and close the handle to
+ // the interface.
+ //
+ Err = RegisterInterfaceNotifications(DeviceContext);
+
+ if (Err != ERROR_SUCCESS)
+ {
+ WriteToErrorLog(L"Could not register notifications", Err);
+ goto cleanup;
+ }
+
+ DeviceContext->InterfaceNotificationsEnabled = TRUE;
+
+ EnterCriticalSection(&DeviceContext->Lock);
+ LockEntered = TRUE;
+
+ //
+ // The interface may already have arrived while registering for
+ // notifications. The lock could be moved earlier, but for sample
+ // purposes this is the proper way to initialize notifications.
+ //
+ if (DeviceContext->DeviceInterfaceHandle == INVALID_HANDLE_VALUE)
+ {
+ DeviceContext->DeviceInterfaceHandle = OpenDevice(FALSE);
+ }
+
+ if (DeviceContext->DeviceInterfaceHandle != INVALID_HANDLE_VALUE)
+ {
+ Err = RegisterDeviceNotifications(DeviceContext);
+
+ if (Err != ERROR_SUCCESS)
+ {
+ WriteToErrorLog(L"Could not register device notifications", Err);
+ goto cleanup;
+ }
+
+ DeviceContext->DeviceNotificationsEnabled = TRUE;
+ }
+
+ //
+ // If OpenDevice ends up returning INVALID_HANDLE_VALUE, that's fine
+ // since a notification for the interface will arrive later.
+ //
+
+cleanup:
+
+ if (LockEntered)
+ {
+ LeaveCriticalSection(&DeviceContext->Lock);
+ }
+
+ *Context = DeviceContext;
+ DeviceContext = NULL;
+
+ if (DeviceContext != NULL)
+ {
+ CloseContext(DeviceContext);
+ }
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Clean up the given PDEVICE_CONTEXT.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+CloseContext(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ BOOL Unregister = FALSE;
+
+ if (Context == NULL)
+ {
+ //
+ // Nothing to remove.
+ //
+ goto cleanup;
+ }
+
+ EnterCriticalSection(&Context->Lock);
+
+ if (!Context->Unregister)
+ {
+ //
+ // Unregister from the callback here.
+ //
+ Unregister = TRUE;
+ Context->Unregister = TRUE;
+ }
+
+ LeaveCriticalSection(&Context->Lock);
+
+ //
+ // Unregister from the interface first, so that re-appearance of the interface
+ // doesn't cause us to register device events again.
+ //
+ if (Context->InterfaceNotificationsEnabled)
+ {
+ Err = UnregisterInterfaceNotifications(Context);
+
+ if (Err != ERROR_SUCCESS)
+ {
+ WriteToErrorLog(L"Could not unregister interface notifications", Err);
+ }
+ }
+
+ if (Unregister)
+ {
+ if (Context->DeviceNotificationsEnabled)
+ {
+ Err = UnregisterDeviceNotifications(Context);
+
+ if (Err != ERROR_SUCCESS)
+ {
+ WriteToErrorLog(L"Could not unregister device notifications", Err);
+ }
+ }
+ }
+ else
+ {
+ WaitForThreadpoolWorkCallbacks(Context->Work, FALSE);
+ }
+
+ //
+ // No need to lock here, UnregisterDeviceNotifications will wait for all
+ // outstanding callbacks before returning.
+ //
+ if (Context->DeviceInterfaceHandle != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(Context->DeviceInterfaceHandle);
+
+ Context->DeviceInterfaceHandle = INVALID_HANDLE_VALUE;
+ }
+
+ if (Context->Work != NULL)
+ {
+ CloseThreadpoolWork(Context->Work);
+ }
+
+ DeleteCriticalSection(&Context->Lock);
+
+ free(Context);
+
+cleanup:
+
+ return Err;
+}
+
+/*++
+
+Routine Description:
+
+ Turns off all of the bar graph lights on the OSR USB FX2 device.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ VOID
+
+--*/
+DWORD
+ClearAllBars(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ ULONG BytesReturned;
+
+ BarGraphState.BarsAsUChar = 0;
+
+ if (!DeviceIoControl(Context->DeviceInterfaceHandle,
+ IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY,
+ &BarGraphState, // Pointer to InBuffer
+ sizeof(BAR_GRAPH_STATE), // Length of InBuffer
+ NULL, // Pointer to OutBuffer
+ 0, // Length of OutBuffer
+ &BytesReturned, // BytesReturned
+ 0)) // Pointer to Overlapped structure
+ {
+ Err = GetLastError();
+ WriteToErrorLog(L"DeviceIOControl", Err);
+ goto cleanup;
+ }
+
+cleanup:
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Lights the next bar on the OSR USB FX2 device.
+
+Arguments:
+
+ Context - The callback context
+
+Return Value:
+
+ VOID
+
+--*/
+DWORD
+LightNextBar(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ ULONG BytesReturned;
+
+ //
+ // Normalize to 0-7
+ //
+ CurrentBar += 1;
+
+ if (CurrentBar > 7)
+ {
+ CurrentBar = 0;
+ }
+
+ BarGraphState.BarsAsUChar = 1 << (UCHAR)CurrentBar;
+
+ if (!DeviceIoControl(Context->DeviceInterfaceHandle,
+ IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY,
+ &BarGraphState, // Pointer to InBuffer
+ sizeof(BAR_GRAPH_STATE), // Length of InBuffer
+ NULL, // Pointer to OutBuffer
+ 0, // Length of OutBuffer
+ &BytesReturned, // BytesReturned
+ 0)) // Pointer to Overlapped structure
+ {
+ Err = GetLastError();
+ WriteToErrorLog(L"DeviceIOControl", Err);
+ goto cleanup;
+ }
+
+cleanup:
+
+ return Err;
+}
+
+/*++
+
+Routine Description:
+
+ Lights the next bar on the OSRFX2 device.
+
+Arguments:
+
+ Context - The device context
+
+Return Value:
+
+ A Win32 error code.
+
+--*/
+DWORD
+ControlDevice(
+ _In_ PDEVICE_CONTEXT Context
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+
+ EnterCriticalSection(&Context->Lock);
+
+ Err = ClearAllBars(Context);
+
+ if (Err != ERROR_SUCCESS)
+ {
+ goto cleanup;
+ }
+
+ Err = LightNextBar(Context);
+
+ if (Err != ERROR_SUCCESS)
+ {
+ goto cleanup;
+ }
+
+cleanup:
+
+ LeaveCriticalSection(&Context->Lock);
+
+ return Err;
+} \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Main.h b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Main.h
index dcbd950e..3b8be711 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Main.h
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Main.h
@@ -50,6 +50,18 @@ DEFINE_GUID(GUID_DEVINTERFACE_OSRUSBFX2,
#pragma warning(disable:4201) // nameless struct/union
#pragma warning(disable:4214) // bit field types other than int
+typedef struct _DEVICE_CONTEXT {
+ HANDLE DeviceInterfaceHandle;
+ CRITICAL_SECTION Lock;
+ BOOL LockEnabled;
+ PTP_WORK Work;
+ BOOL Unregister;
+ HCMNOTIFICATION InterfaceNotificationHandle;
+ BOOL InterfaceNotificationsEnabled;
+ HCMNOTIFICATION DeviceNotificationHandle;
+ BOOL DeviceNotificationsEnabled;
+} DEVICE_CONTEXT, *PDEVICE_CONTEXT;
+
//
// Define the structures that will be used by the IOCTL
// interface to the driver
@@ -192,6 +204,25 @@ typedef struct _SWITCH_STATE {
Routine Description:
+Lights the next bar on the OSRFX2 device.
+
+Arguments:
+
+Context - The device context
+
+Return Value:
+
+A Win32 error code.
+
+--*/
+DWORD
+ControlDevice(PDEVICE_CONTEXT Context);
+
+
+/*++
+
+Routine Description:
+
Sets the variables in this service to their default values.
Arguments:
@@ -203,7 +234,7 @@ Return Value:
VOID
--*/
-VOID SetVariables();
+VOID SetVariables(VOID);
/*++
@@ -229,33 +260,69 @@ HANDLE OpenDevice(_In_ BOOL Synchronous);
Routine Description:
- Turns off all of the bar graph lights on the OSR USB FX2 device.
+Register for device notifications.
Arguments:
- DeviceHandle - The handle to the OSR USB FX2 device.
+Context - The callback context
Return Value:
- VOID
+A Win32 error code.
+
+--*/
+DWORD RegisterDeviceNotifications(PDEVICE_CONTEXT Context);
+
+
+/*++
+
+Routine Description:
+
+Unregister for device notifications.
+
+Arguments:
+
+Context - The callback context
+
+Return Value:
+
+A Win32 error code.
+
+--*/
+DWORD UnregisterDeviceNotifications(PDEVICE_CONTEXT Context);
+
+
+/*++
+
+Routine Description:
+
+Initialize the given PDEVICE_CONTEXT.
+
+Arguments:
+
+Context - The callback context
+
+Return Value:
+
+A Win32 error code.
--*/
-VOID ClearAllBars(HANDLE deviceHandle);
+DWORD InitializeContext(PDEVICE_CONTEXT* Context);
/*++
Routine Description:
- Lights the next bar on the OSR USB FX2 device.
+Clean up the given PDEVICE_CONTEXT.
Arguments:
- DeviceHandle - The handle to the OSR USB FX2 device.
+Context - The callback context
Return Value:
-VOID
+A Win32 error code.
--*/
-VOID LightNextBar(HANDLE deviceHandle); \ No newline at end of file
+DWORD CloseContext(PDEVICE_CONTEXT Context); \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/SampleService.cpp b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/SampleService.cpp
index c39e4838..fd3d497f 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/SampleService.cpp
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/SampleService.cpp
@@ -29,8 +29,6 @@ Environment:
#include "ThreadPool.h"
#pragma endregion
-HANDLE DeviceHandle;
-
/*++
Routine Description:
@@ -143,6 +141,8 @@ CSampleService::OnStart(
PWSTR *Argv
)
{
+ __debugbreak();
+
//
// Log a service start message to the Application log.
//
@@ -150,18 +150,14 @@ CSampleService::OnStart(
EVENTLOG_INFORMATION_TYPE);
//
- // Set variables in the base class
+ // Set up any variables the service needs.
//
+ SetVariables();
//
- // Open the device
+ // Set up the context, and register for notifications.
//
- DeviceHandle = OpenDevice(FALSE);
-
- if (DeviceHandle == INVALID_HANDLE_VALUE)
- {
- return;
- }
+ InitializeContext(&m_Context);
//
// Queue the main service function for execution in a worker thread.
@@ -198,8 +194,7 @@ CSampleService::ServiceWorkerThread()
// Perform main service function here...
//
- ClearAllBars(DeviceHandle);
- LightNextBar(DeviceHandle);
+ ControlDevice(m_Context);
::Sleep(2000); // Simulate some lengthy operations.
}
@@ -251,4 +246,9 @@ CSampleService::OnStop()
{
throw GetLastError();
}
+
+ //
+ // Clean up the context after the worker thread has finished.
+ //
+ CloseContext(m_Context);
} \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/SampleService.h b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/SampleService.h
index eee8a609..73be42e9 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/SampleService.h
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/SampleService.h
@@ -171,4 +171,17 @@ private:
// The handle to wait for a stop event.
//
HANDLE m_hStoppedEvent;
+
+ //
+ // The device context to manage notifications with.
+ //
+ // NOTE:
+ // Variables used for device notifications should normally be local. However,
+ // we must use a global variable here since there is a potential race condition
+ // when the service needs to restart during device installation that could
+ // cause the service to prevent the device from being restarted. So, this
+ // variable is global so that the service's OnStart and OnStart method can
+ // handle its creation and destruction.
+ //
+ PDEVICE_CONTEXT m_Context;
}; \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/ServiceBase.cpp b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/ServiceBase.cpp
index 4c20af2e..4c20af2e 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/ServiceBase.cpp
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/ServiceBase.cpp
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/ServiceBase.h b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/ServiceBase.h
index 106597e1..106597e1 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/ServiceBase.h
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/ServiceBase.h
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/ThreadPool.h b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/ThreadPool.h
index 3d851537..3d851537 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/ThreadPool.h
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/ThreadPool.h
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Utils.cpp b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Utils.cpp
index e8fc87ee..e8fc87ee 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Utils.cpp
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Utils.cpp
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Utils.h b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Utils.h
index b619f461..b619f461 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Utils.h
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/Utils.h
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.filters b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.filters
index 7f12a302..7f12a302 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.filters
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.filters
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.inx b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.inx
index 61e1e958..61e1e958 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.inx
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.inx
Binary files differ
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.vcxproj b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.vcxproj
index 111fd2bf..8547d303 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.vcxproj
+++ b/general/DCHU/osrfx2_DCHU_base/osrfx2_DCHU_usersvc/osrfx2_DCHU_usersvc.vcxproj
@@ -30,23 +30,23 @@
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v141</PlatformToolset>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v141</PlatformToolset>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v141</PlatformToolset>
+ <PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -93,7 +93,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <Optimization>Disabled</Optimization>
+ <Optimization>Full</Optimization>
<PreprocessorDefinitions>WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -112,7 +112,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
+ <Optimization>Full</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -136,7 +136,7 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
- <Optimization>Disabled</Optimization>
+ <Optimization>Full</Optimization>
<PreprocessorDefinitions>WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -162,10 +162,10 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
- <Optimization>MaxSpeed</Optimization>
+ <Optimization>Full</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx b/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
deleted file mode 100644
index d90c39f7..00000000
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
+++ /dev/null
@@ -1,79 +0,0 @@
-;/*++
-;
-;Copyright (c) Microsoft Corporation. All rights reserved.
-;
-; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
-; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
-; PURPOSE.
-;
-;Module Name:
-;
-; osrfx2_DCHU_extension.INF
-;
-;Abstract:
-;
-; Extension inf for the OSR FX2 Learning Kit
-;
-;--*/
-
-[Version]
-Signature = "$WINDOWS NT$"
-Class = Extension
-ClassGuid = {e2f84ce7-8efa-411c-aa69-97454ca4cb57}
-Provider = %ManufacturerName%
-ExtensionId = {3846ad8c-dd27-433d-ab89-453654cd542a}
-CatalogFile = osrfx2_DCHU_extension.cat
-DriverVer = 05/16/2017,15.14.36.721
-
-[Manufacturer]
-%ManufacturerName% = OsrFx2Extension, NT$ARCH$
-
-[OsrFx2Extension.NT$ARCH$]
-%OsrFx2.ExtensionDesc% = OsrFx2Extension_Install, USB\Vid_045e&Pid_94aa&mi_00
-%OsrFx2.ExtensionDesc% = OsrFx2Extension_Install, USB\Vid_0547&PID_1002
-
-[OsrFx2Extension_Install.NT]
-CopyInf=osrfx2_DCHU_usersvc.inf
-
-[OsrFx2Extension_Install.NT.HW]
-AddReg = OsrFx2Extension_AddReg
-AddReg = OsrFx2Extension_COMAddReg
-
-[OsrFx2Extension_AddReg]
-HKR, OSR, "OperatingParams",, "-Extended"
-HKR, OSR, "OperatingExceptions",, "x86"
-
-; Add all registry keys to successfully register the
-; In-Process ATL COM Server MSFT Sample.
-[OsrFx2Extension_COMAddReg]
-HKCR,AppID\ATLDllCOMServer.DLL,AppID,,"{9DD18FED-55F6-4741-AF25-798B90C4AED5}"
-HKCR,AppID\{9DD18FED-55F6-4741-AF25-798B90C4AED5},,,"ATLDllCOMServer"
-HKCR,ATLDllCOMServer.SimpleObject,,,"SimpleObject Class"
-HKCR,ATLDllCOMServer.SimpleObject\CLSID,,,"{92FCF37F-F6C7-4F8A-AA09-1A14BA118084}"
-HKCR,ATLDllCOMServer.SimpleObject\CurVer,,,"ATLDllCOMServer.SimpleObject.1"
-HKCR,ATLDllCOMServer.SimpleObject.1,,,"SimpleObject Class"
-HKCR,ATLDllCOMServer.SimpleObject.1\CLSID,,,"{92FCF37F-F6C7-4F8A-AA09-1A14BA118084}"
-HKCR,CLSID\{92FCF37F-F6C7-4F8A-AA09-1A14BA118084},,,"SimpleObject Class"
-HKCR,CLSID\{92FCF37F-F6C7-4F8A-AA09-1A14BA118084}\InprocServer32,,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\ATLDllCOMServer.dll"
-HKCR,CLSID\{92FCF37F-F6C7-4F8A-AA09-1A14BA118084}\InprocServer32,ThreadingModel,,"Apartment"
-HKCR,CLSID\{92FCF37F-F6C7-4F8A-AA09-1A14BA118084}\ProgID,,,"ATLDllCOMServer.SimpleObject.1"
-HKCR,CLSID\{92FCF37F-F6C7-4F8A-AA09-1A14BA118084}\Programmable,,%FLG_ADDREG_KEYONLY%
-HKCR,CLSID\{92FCF37F-F6C7-4F8A-AA09-1A14BA118084}\TypeLib,,,"{9B23EFED-A0C1-46B6-A903-218206447F3E}"
-HKCR,CLSID\{92FCF37F-F6C7-4F8A-AA09-1A14BA118084}\VersionIndependentProgID,,,"ATLDllCOMServer.SimpleObject"
-
-[OsrFx2Extension_Install.NT.Components]
-AddComponent = osrfx2_DCHU_component,,OsrFx2Extension_ComponentInstall
-AddComponent = osrfx2_DCHU_usersvc,,OsrFx2Extension_ComponentInstall_UserSvc
-
-[OsrFx2Extension_ComponentInstall]
-ComponentIds=VID_045e&PID_94ab
-
-[OsrFx2Extension_ComponentInstall_UserSvc]
-ComponentIds=VID_045e&PID_94ac
-
-[Strings]
-ManufacturerName = "Contoso"
-OsrFx2.ExtensionDesc = "OsrFx2 DCHU Device Extension"
-REG_EXPAND_SZ = 0x00020000
-FLG_ADDREG_KEYONLY = 0x00000010 \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Main.cpp b/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Main.cpp
deleted file mode 100644
index 157a6cb9..00000000
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_usersvc/Main.cpp
+++ /dev/null
@@ -1,320 +0,0 @@
-/*++
-
-Copyright (c) Microsoft Corporation. All rights reserved.
-
- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
- KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
- PURPOSE.
-
-Module Name:
-
- Main.cpp
-
-Abstract:
-
- Implements the functions to control the OSR USB FX2 device.
-
-Environment:
-
- User mode
-
---*/
-
-#include "Main.h"
-#include "Utils.h"
-
-INT CurrentBar;
-BAR_GRAPH_STATE BarGraphState;
-
-/*++
-
-Routine Description:
-
- Sets the variables in this service to their default values.
-
-Arguments:
-
- VOID
-
-Return Value:
-
- VOID
-
---*/
-VOID
-SetVariables()
-{
- CurrentBar = 0;
-}
-
-
-/*++
-
-Routine Description:
-
- Retrieves the device path of a given interface.
-
-Arguments:
-
- InterfaceGuid - The GUID of the interface to search for
-
- DevicePath - The resulting device path
-
- DevicePathLength - The length of DevicePath
-
-Return Value:
-
- TRUE if the function succeeded and FALSE otherwise. Errors
- are logged in the Application event log.
-
---*/
-_Success_(return)
-BOOL
-GetDevicePath(
- _In_ LPGUID InterfaceGuid,
- _Out_writes_z_(DevicePathLength) PWCHAR DevicePath,
- _In_ size_t DevicePathLength
- )
-{
- HRESULT hr = E_FAIL;
- BOOL Return = FALSE;
- CONFIGRET Status = CR_SUCCESS;
- PWSTR DeviceInterfaceList = NULL;
- ULONG DeviceInterfaceListLength = 0;
- PWSTR NextInterface;
-
- Status = CM_Get_Device_Interface_List_Size(&DeviceInterfaceListLength,
- InterfaceGuid,
- NULL,
- CM_GET_DEVICE_INTERFACE_LIST_PRESENT);
-
- if (Status != CR_SUCCESS)
- {
- WriteToErrorLog(L"CM_Get_DeviceInterface_List_Size",
- CM_MapCrToWin32Err(Status, ERROR_FILE_NOT_FOUND));
- goto clean0;
- }
-
- if (DeviceInterfaceListLength < 1)
- {
- WriteToErrorLog(L"CM_Get_DeviceInterface_List_Size",
- CM_MapCrToWin32Err(Status, ERROR_EMPTY));
- goto clean0;
- }
-
- DeviceInterfaceList = (PWSTR)malloc(DeviceInterfaceListLength * sizeof(WCHAR));
-
- if (DeviceInterfaceList == NULL)
- {
- WriteToEventLog(L"Failed to allocate memory for the device interface list",
- TRACE_LEVEL_ERROR);
- goto clean0;
- }
-
- ZeroMemory(DeviceInterfaceList, DeviceInterfaceListLength * sizeof(WCHAR));
-
- Status = CM_Get_Device_Interface_List(InterfaceGuid,
- NULL,
- DeviceInterfaceList,
- DeviceInterfaceListLength,
- CM_GET_DEVICE_INTERFACE_LIST_PRESENT);
-
- if (Status != CR_SUCCESS)
- {
- WriteToErrorLog(L"CM_Get_Device_Interface_List",
- CM_MapCrToWin32Err(Status, ERROR_FILE_NOT_FOUND));
- goto clean0;
- }
-
- if (*DeviceInterfaceList == UNICODE_NULL)
- {
- WriteToEventLog(L"CM_Get_Device_Interface_List returned an empty list",
- TRACE_LEVEL_ERROR);
- }
-
- NextInterface = DeviceInterfaceList + wcslen(DeviceInterfaceList) + 1;
-
- if (*NextInterface != UNICODE_NULL)
- {
- WriteToEventLog(L"More than one device interface instance found. "
- "Selecting first matching device.",
- TRACE_LEVEL_WARNING);
- }
-
- hr = StringCchCopy(DevicePath, DevicePathLength, DeviceInterfaceList);
-
- if (FAILED(hr))
- {
- WriteToErrorLog(L"StringCchCopy", HRESULT_CODE(hr));
- goto clean0;
- }
-
-clean0:
-
- if (DeviceInterfaceList != NULL)
- {
- free(DeviceInterfaceList);
- }
-
- if (Status == CR_SUCCESS)
- {
- Return = TRUE;
- }
-
- return Return;
-}
-
-
-/*++
-
-Routine Description:
-
- Opens up the OSR USB FX2 device handle.
-
-Arguments:
-
- Synchronous - Whether or not this device should be
- opened for synchronous access
-
-Return Value:
-
- The handle to the OSR USB FX2 device.
-
---*/
-_Check_return_
-_Ret_notnull_
-_Success_(return != INVALID_HANDLE_VALUE)
-HANDLE
-OpenDevice(
- _In_ BOOL Synchronous
- )
-{
- HANDLE DeviceHandle;
- WCHAR DeviceName[MAX_DEVPATH_LENGTH];
-
- if (!GetDevicePath((LPGUID)&GUID_DEVINTERFACE_OSRUSBFX2,
- DeviceName,
- sizeof(DeviceName) / sizeof(DeviceName[0])))
- {
- return INVALID_HANDLE_VALUE;
- }
-
- if (Synchronous)
- {
- DeviceHandle = CreateFile(DeviceName,
- GENERIC_WRITE | GENERIC_READ,
- FILE_SHARE_WRITE | FILE_SHARE_READ,
- NULL, // default security
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL,
- NULL);
- }
- else
- {
- DeviceHandle = CreateFile(DeviceName,
- GENERIC_WRITE | GENERIC_READ,
- FILE_SHARE_WRITE | FILE_SHARE_READ,
- NULL, // default security
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
- NULL);
- }
-
- if (DeviceHandle == INVALID_HANDLE_VALUE)
- {
- WriteToErrorLog(L"CreateFile", GetLastError());
- }
- else
- {
- WriteToEventLog(L"Opened Device Successfully", TRACE_LEVEL_INFORMATION);
- }
-
- return DeviceHandle;
-}
-
-
-/*++
-
-Routine Description:
-
- Turns off all of the bar graph lights on the OSR USB FX2 device.
-
-Arguments:
-
- DeviceHandle - The handle to the OSR USB FX2 device
-
-Return Value:
-
- VOID
-
---*/
-VOID
-ClearAllBars(
- _In_ HANDLE DeviceHandle
- )
-{
- ULONG BytesReturned;
-
- BarGraphState.BarsAsUChar = 0;
-
- if (!DeviceIoControl(DeviceHandle,
- IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY,
- &BarGraphState, // Pointer to InBuffer
- sizeof(BAR_GRAPH_STATE), // Length of InBuffer
- NULL, // Pointer to OutBuffer
- 0, // Length of OutBuffer
- &BytesReturned, // BytesReturned
- 0)) // Pointer to Overlapped structure
- {
- WriteToErrorLog(L"DeviceIOControl", GetLastError());
- }
-}
-
-
-/*++
-
-Routine Description:
-
- Lights the next bar on the OSR USB FX2 device.
-
-Arguments:
-
- DeviceHandle - The handle to the OSR USB FX2 device
-
-Return Value:
-
- VOID
-
---*/
-VOID
-LightNextBar(
- _In_ HANDLE DeviceHandle
- )
-{
- ULONG BytesReturned;
-
- //
- // Normalize to 0-7
- //
- CurrentBar += 1;
-
- if (CurrentBar > 7)
- {
- CurrentBar = 0;
- }
-
- BarGraphState.BarsAsUChar = 1 << (UCHAR)CurrentBar;
-
- if (!DeviceIoControl(DeviceHandle,
- IOCTL_OSRUSBFX2_SET_BAR_GRAPH_DISPLAY,
- &BarGraphState, // Pointer to InBuffer
- sizeof(BAR_GRAPH_STATE), // Length of InBuffer
- NULL, // Pointer to OutBuffer
- 0, // Length of OutBuffer
- &BytesReturned, // BytesReturned
- 0)) // Pointer to Overlapped structure
- {
- WriteToErrorLog(L"DeviceIOControl", GetLastError());
- }
-} \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component/osrfx2_DCHU_component.filters b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.filters
index fa953f4c..fa953f4c 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component/osrfx2_DCHU_component.filters
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.filters
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component/osrfx2_DCHU_component.inx b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
index 8baab1a0..8baab1a0 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component/osrfx2_DCHU_component.vcxproj b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.vcxproj
index fed7ddf4..bc19d287 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component/osrfx2_DCHU_component.vcxproj
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_component/osrfx2_DCHU_component.vcxproj
@@ -73,6 +73,7 @@
<ConfigurationType>Utility</ConfigurationType>
<DriverType>Package</DriverType>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -81,6 +82,7 @@
<ConfigurationType>Utility</ConfigurationType>
<DriverType>Package</DriverType>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -89,6 +91,7 @@
<ConfigurationType>Utility</ConfigurationType>
<DriverType>Package</DriverType>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -97,6 +100,7 @@
<ConfigurationType>Utility</ConfigurationType>
<DriverType>Package</DriverType>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp
index c14e66d1..c14e66d1 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters
index 395438fa..395438fa 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj
index 2bb8b05d..931646bb 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj
@@ -29,27 +29,27 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
+ <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
+ <PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v141</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/stdafx.cpp b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/stdafx.cpp
index 79325e21..79325e21 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/stdafx.cpp
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/stdafx.cpp
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/stdafx.h b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/stdafx.h
index edb61924..edb61924 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/stdafx.h
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/stdafx.h
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/targetver.h b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/targetver.h
index 87c0086d..87c0086d 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_componentsoftware/targetver.h
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_componentsoftware/targetver.h
diff --git a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component.sln b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension.sln
index e09b5650..6cc1d6b0 100644
--- a/general/DCHU/osrfx2_DCHU_component/osrfx2_DCHU_component.sln
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension.sln
@@ -1,17 +1,21 @@

Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
+# Visual Studio 15
+VisualStudioVersion = 15.0.26430.16
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_component", "osrfx2_DCHU_component", "{E498C537-BA1A-4E9D-8F1E-9DC7646D2E1A}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_extension", "osrfx2_DCHU_extension", "{4577857A-CCAE-42EB-BDE2-16C1E3DC7B14}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_componentsoftware", "osrfx2_DCHU_componentsoftware", "{E50E958C-B5D0-43E0-9D81-87F484F11E9F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_extension", "osrfx2_DCHU_extension\osrfx2_DCHU_extension.vcxproj", "{0588DF70-3923-42E6-8DC9-13C2C0186F20}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_component", "osrfx2_DCHU_component", "{E148C50E-31A6-423E-A867-526FD51DA164}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_component", "osrfx2_DCHU_component\osrfx2_DCHU_component.vcxproj", "{F90EFA96-B075-4531-B4E1-F406362D16BF}"
ProjectSection(ProjectDependencies) = postProject
{26D91630-B8FF-4102-A258-32F7D1C84E20} = {26D91630-B8FF-4102-A258-32F7D1C84E20}
EndProjectSection
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_componentsoftware", "osrfx2_DCHU_componentsoftware", "{272BE7AA-9011-46FA-96C9-2051C9526476}"
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_componentsoftware", "osrfx2_DCHU_componentsoftware\osrfx2_DCHU_componentsoftware.vcxproj", "{26D91630-B8FF-4102-A258-32F7D1C84E20}"
EndProject
Global
@@ -26,6 +30,30 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|ARM.ActiveCfg = Debug|ARM
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|ARM.Build.0 = Debug|ARM
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|ARM.Deploy.0 = Debug|ARM
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|ARM64.Build.0 = Debug|ARM64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|x64.ActiveCfg = Debug|x64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|x64.Build.0 = Debug|x64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|x64.Deploy.0 = Debug|x64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|x86.ActiveCfg = Debug|Win32
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|x86.Build.0 = Debug|Win32
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Debug|x86.Deploy.0 = Debug|Win32
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|ARM.ActiveCfg = Release|ARM
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|ARM.Build.0 = Release|ARM
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|ARM.Deploy.0 = Release|ARM
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|ARM64.ActiveCfg = Release|ARM64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|ARM64.Build.0 = Release|ARM64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|ARM64.Deploy.0 = Release|ARM64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|x64.ActiveCfg = Release|x64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|x64.Build.0 = Release|x64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|x64.Deploy.0 = Release|x64
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|x86.ActiveCfg = Release|Win32
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|x86.Build.0 = Release|Win32
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|x86.Deploy.0 = Release|Win32
{F90EFA96-B075-4531-B4E1-F406362D16BF}.Debug|ARM.ActiveCfg = Debug|ARM
{F90EFA96-B075-4531-B4E1-F406362D16BF}.Debug|ARM.Build.0 = Debug|ARM
{F90EFA96-B075-4531-B4E1-F406362D16BF}.Debug|ARM.Deploy.0 = Debug|ARM
@@ -67,7 +95,8 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {F90EFA96-B075-4531-B4E1-F406362D16BF} = {E498C537-BA1A-4E9D-8F1E-9DC7646D2E1A}
- {26D91630-B8FF-4102-A258-32F7D1C84E20} = {E50E958C-B5D0-43E0-9D81-87F484F11E9F}
+ {0588DF70-3923-42E6-8DC9-13C2C0186F20} = {4577857A-CCAE-42EB-BDE2-16C1E3DC7B14}
+ {F90EFA96-B075-4531-B4E1-F406362D16BF} = {E148C50E-31A6-423E-A867-526FD51DA164}
+ {26D91630-B8FF-4102-A258-32F7D1C84E20} = {272BE7AA-9011-46FA-96C9-2051C9526476}
EndGlobalSection
EndGlobal
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters
index 0ba1a59c..0ba1a59c 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters
diff --git a/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
new file mode 100644
index 00000000..702a176c
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
@@ -0,0 +1,54 @@
+;/*++
+;
+;Copyright (c) Microsoft Corporation. All rights reserved.
+;
+; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+; PURPOSE.
+;
+;Module Name:
+;
+; osrfx2_DCHU_extension.INF
+;
+;Abstract:
+;
+; Extension inf for the OSR FX2 Learning Kit
+;
+;--*/
+
+[Version]
+Signature = "$WINDOWS NT$"
+Class = Extension
+ClassGuid = {e2f84ce7-8efa-411c-aa69-97454ca4cb57}
+Provider = %ManufacturerName%
+ExtensionId = {zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz} ; replace with your own GUID
+CatalogFile = osrfx2_DCHU_extension.cat
+DriverVer = 05/16/2017,15.14.36.721
+
+[Manufacturer]
+%ManufacturerName% = OsrFx2Extension, NT$ARCH$
+
+[OsrFx2Extension.NT$ARCH$]
+%OsrFx2.ExtensionDesc% = OsrFx2Extension_Install, USB\Vid_045e&Pid_94aa&mi_00
+%OsrFx2.ExtensionDesc% = OsrFx2Extension_Install, USB\Vid_0547&PID_1002
+
+[OsrFx2Extension_Install.NT]
+; Empty
+
+[OsrFx2Extension_Install.NT.HW]
+AddReg = OsrFx2Extension_AddReg
+
+[OsrFx2Extension_AddReg]
+HKR, OSR, "OperatingParams",, "-Extended"
+HKR, OSR, "OperatingExceptions",, "x86"
+
+[OsrFx2Extension_Install.NT.Components]
+AddComponent = osrfx2_DCHU_component,,OsrFx2Extension_ComponentInstall
+
+[OsrFx2Extension_ComponentInstall]
+ComponentIds=VID_045e&PID_94ab
+
+[Strings]
+ManufacturerName = "Contoso"
+OsrFx2.ExtensionDesc = "OsrFx2 DCHU Device Extension"
diff --git a/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj
new file mode 100644
index 00000000..bfc7ded6
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_loose/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM">
+ <Configuration>Release</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|ARM64">
+ <Configuration>Debug</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
+ <Configuration>Release</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <Inf Include="osrfx2_DCHU_extension.inx" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{0588DF70-3923-42E6-8DC9-13C2C0186F20}</ProjectGuid>
+ <TemplateGuid>{4605da2c-74a5-4865-98e1-152ef136825f}</TemplateGuid>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
+ <Configuration>Debug</Configuration>
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+ <RootNamespace>osrfx2_DCHU_extension</RootNamespace>
+ <ProjectName>osrfx2_DCHU_extension</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Utility</ConfigurationType>
+ <DriverType>Package</DriverType>
+ <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Utility</ConfigurationType>
+ <DriverType>Package</DriverType>
+ <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Utility</ConfigurationType>
+ <DriverType>Package</DriverType>
+ <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Utility</ConfigurationType>
+ <DriverType>Package</DriverType>
+ <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Utility</ConfigurationType>
+ <DriverType>Package</DriverType>
+ <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Utility</ConfigurationType>
+ <DriverType>Package</DriverType>
+ <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Utility</ConfigurationType>
+ <DriverType>Package</DriverType>
+ <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Utility</ConfigurationType>
+ <DriverType>Package</DriverType>
+ <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
+ <HardwareIdString />
+ <CommandLine />
+ <DeployFiles />
+ <EnableVerifier>False</EnableVerifier>
+ <AllDrivers>False</AllDrivers>
+ <VerifyProjectOutput>True</VerifyProjectOutput>
+ <VerifyDrivers />
+ <VerifyFlags>133563</VerifyFlags>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
+ <HardwareIdString />
+ <CommandLine />
+ <DeployFiles />
+ <EnableVerifier>False</EnableVerifier>
+ <AllDrivers>False</AllDrivers>
+ <VerifyProjectOutput>True</VerifyProjectOutput>
+ <VerifyDrivers />
+ <VerifyFlags>133563</VerifyFlags>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
+ <HardwareIdString />
+ <CommandLine />
+ <DeployFiles />
+ <EnableVerifier>False</EnableVerifier>
+ <AllDrivers>False</AllDrivers>
+ <VerifyProjectOutput>True</VerifyProjectOutput>
+ <VerifyDrivers />
+ <VerifyFlags>133563</VerifyFlags>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
+ <HardwareIdString />
+ <CommandLine />
+ <DeployFiles />
+ <EnableVerifier>False</EnableVerifier>
+ <AllDrivers>False</AllDrivers>
+ <VerifyProjectOutput>True</VerifyProjectOutput>
+ <VerifyDrivers />
+ <VerifyFlags>133563</VerifyFlags>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
+ <HardwareIdString />
+ <CommandLine />
+ <DeployFiles />
+ <EnableVerifier>False</EnableVerifier>
+ <AllDrivers>False</AllDrivers>
+ <VerifyProjectOutput>True</VerifyProjectOutput>
+ <VerifyDrivers />
+ <VerifyFlags>133563</VerifyFlags>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
+ <HardwareIdString />
+ <CommandLine />
+ <DeployFiles />
+ <EnableVerifier>False</EnableVerifier>
+ <AllDrivers>False</AllDrivers>
+ <VerifyProjectOutput>True</VerifyProjectOutput>
+ <VerifyDrivers />
+ <VerifyFlags>133563</VerifyFlags>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
+ <HardwareIdString />
+ <CommandLine />
+ <DeployFiles />
+ <EnableVerifier>False</EnableVerifier>
+ <AllDrivers>False</AllDrivers>
+ <VerifyProjectOutput>True</VerifyProjectOutput>
+ <VerifyDrivers />
+ <VerifyFlags>133563</VerifyFlags>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
+ <HardwareIdString />
+ <CommandLine />
+ <DeployFiles />
+ <EnableVerifier>False</EnableVerifier>
+ <AllDrivers>False</AllDrivers>
+ <VerifyProjectOutput>True</VerifyProjectOutput>
+ <VerifyDrivers />
+ <VerifyFlags>133563</VerifyFlags>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <Inf>
+ <Architecture>$(InfArch)</Architecture>
+ <TimeStamp>1.0.0.0</TimeStamp>
+ </Inf>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
+ <Inf>
+ <Architecture>$(InfArch)</Architecture>
+ <TimeStamp>1.0.0.0</TimeStamp>
+ </Inf>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Inf>
+ <Architecture>$(InfArch)</Architecture>
+ <TimeStamp>1.0.0.0</TimeStamp>
+ </Inf>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Inf>
+ <Architecture>$(InfArch)</Architecture>
+ <TimeStamp>1.0.0.0</TimeStamp>
+ </Inf>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
+ <Inf>
+ <Architecture>$(InfArch)</Architecture>
+ <TimeStamp>1.0.0.0</TimeStamp>
+ </Inf>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
+ <Inf>
+ <Architecture>$(InfArch)</Architecture>
+ <TimeStamp>1.0.0.0</TimeStamp>
+ </Inf>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Inf>
+ <Architecture>$(InfArch)</Architecture>
+ <TimeStamp>1.0.0.0</TimeStamp>
+ </Inf>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Inf>
+ <Architecture>$(InfArch)</Architecture>
+ <TimeStamp>1.0.0.0</TimeStamp>
+ </Inf>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_component/osrfx2_DCHU_component.inx b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
new file mode 100644
index 00000000..8baab1a0
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_component/osrfx2_DCHU_component.inx
@@ -0,0 +1,64 @@
+;/*++
+;
+;Copyright (c) Microsoft Corporation. All rights reserved.
+;
+; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+; PURPOSE.
+;
+;Module Name:
+;
+; osrfx2_DCHU_component.INF
+;
+;Abstract:
+;
+; Installation inf for one of the OSR FX2 Learning Kit's
+; AddComponent directives
+;
+;--*/
+
+[Version]
+Signature = "$Windows NT$"
+Class = SoftwareComponent
+ClassGuid = {5c4c3332-344d-483c-8739-259e934c9cc8}
+Provider = %ManufacturerName%
+CatalogFile = osrfx2_DCHU_component.cat
+
+[Manufacturer]
+%ManufacturerName% = OsrFx2Component, NT$ARCH$
+
+[OsrFx2Component.NT$ARCH$]
+%DeviceName% = OsrFx2Component_Install, SWC\VID_045e&PID_94ab
+
+[SourceDisksFiles]
+osrfx2_DCHU_componentsoftware.exe = 1
+
+[SourceDisksNames]
+1 = %DiskName%
+
+[DestinationDirs]
+OsrFx2Component_CopyFiles = 13 ; copy to driverstore
+
+[OsrFx2Component_Install.NT]
+CopyFiles = OsrFx2Component_CopyFiles
+
+[OsrFx2Component_Install.NT.Services]
+AddService = , 0x00000002
+
+[OsrFx2Component_Install.NT.Software]
+AddSoftware = osrfx2_DCHU_componentsoftware,, OsrFx2Component_SoftwareInstall
+
+[OsrFx2Component_SoftwareInstall]
+SoftwareType = 1
+SoftwareBinary = osrfx2_DCHU_componentsoftware.exe
+SoftwareArguments = <<DeviceInstanceId>>
+SoftwareVersion = 1.0.0.0
+
+[OsrFx2Component_CopyFiles]
+osrfx2_DCHU_componentsoftware.exe
+
+[Strings]
+ManufacturerName = "Contoso"
+DiskName = "OsrFx2 DCHU Component Installation Disk"
+DeviceName = "OsrFx2 DCHU Component Device" \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp
new file mode 100644
index 00000000..c14e66d1
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.cpp
@@ -0,0 +1,489 @@
+/*++
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+ THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+ PURPOSE.
+
+Module Name:
+
+ osrfx2_DCHU_componentsoftware.cpp
+
+Abstract:
+
+ An example .exe to run using the AddSoftware directive within an INF.
+ Contains an example on how to obtain a handle to the primary device using
+ SoftwareArguments within an AddSoftware directive's section.
+
+Environment:
+
+ User mode
+
+--*/
+
+#include "stdafx.h"
+
+#define BUFFER_SIZE (128 * sizeof(WCHAR))
+#define DEVICE_REG_SUBKEY L"OSR"
+#define DEVICE_VALUE_OP_MODE L"OperatingMode"
+#define DEVICE_VALUE_OP_PARAMS L"OperatingParams"
+#define DEVICE_VALUE_OP_EXCEPTIONS L"OperatingExceptions"
+#define CONTOSO_FILEPATH L"C:\\Program Files\\Contoso"
+#define OSRFX2_DCHU_FILEPATH L"C:\\Program Files\\Contoso\\OsrFx2_DCHU"
+#define FILEPATH L"C:\\Program Files\\Contoso\\OsrFx2_DCHU\\AddSoftwareInstallationFile.txt"
+#define FILE_CONTENT L"Operating Mode: %ws\r\nOperating Params: %ws\r\nOperating Exceptions: %ws"
+
+
+/*++
+
+Routine Description:
+
+Arguments:
+
+Return Value:
+
+
+--*/
+DWORD
+WriteToFile(
+ _In_ PWSTR MessageText,
+ _In_ DWORD MessageTextLength
+ )
+{
+ DWORD Err = ERROR_SUCCESS;
+ BOOL ErrorFlag = FALSE;
+ HANDLE hFile = INVALID_HANDLE_VALUE;
+ DWORD BytesToWrite;
+ DWORD BytesWritten;
+
+ if (!CreateDirectory(CONTOSO_FILEPATH, NULL))
+ {
+ Err = GetLastError();
+
+ if (Err == ERROR_ALREADY_EXISTS)
+ {
+ Err = ERROR_SUCCESS;
+ }
+ else
+ {
+ goto cleanup;
+ }
+ }
+
+ if (!CreateDirectory(OSRFX2_DCHU_FILEPATH, NULL))
+ {
+ Err = GetLastError();
+
+ if (Err == ERROR_ALREADY_EXISTS)
+ {
+ Err = ERROR_SUCCESS;
+ }
+ else
+ {
+ goto cleanup;
+ }
+ }
+
+ hFile = CreateFile(FILEPATH,
+ GENERIC_WRITE,
+ 0,
+ NULL,
+ OPEN_ALWAYS,
+ FILE_ATTRIBUTE_NORMAL,
+ NULL);
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ {
+ Err = ERROR_INVALID_PARAMETER;
+ goto cleanup;
+ }
+
+ BytesToWrite = MessageTextLength * sizeof(WCHAR);
+
+ ErrorFlag = WriteFile(hFile,
+ MessageText,
+ BytesToWrite,
+ &BytesWritten,
+ NULL);
+
+ if ((!ErrorFlag) ||
+ (BytesToWrite != BytesWritten))
+ {
+ Err = GetLastError();
+ goto cleanup;
+ }
+
+cleanup:
+
+ if (hFile != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(hFile);
+ }
+
+ return Err;
+}
+
+
+/*++
+
+Routine Description:
+
+ Obtains the handle to the device that used a separate Software Component
+ INF to install software.
+
+Arguments:
+
+ Argc - The number of command line arguments
+
+ Argv - The array of command line arguments
+
+Return Value:
+
+ VOID
+
+--*/
+VOID
+__cdecl
+_tmain(
+ INT Argc,
+ TCHAR *Argv[])
+{
+ DWORD Err = ERROR_SUCCESS;
+ HRESULT hr = S_OK;
+ BOOL ErrorFlag = FALSE;
+ DWORD BytesToWrite = 0;
+ DWORD BytesWritten = 0;
+ PTSTR DeviceInstanceId;
+ HDEVINFO DevInfoList = INVALID_HANDLE_VALUE;
+ SP_DEVINFO_DATA DevInfoData;
+ WCHAR ParentDeviceInstanceId[MAX_DEVICE_ID_LEN];
+ DWORD RequiredSize;
+ DEVPROPTYPE DevPropType;
+ SP_DEVINFO_DATA ParentDevInfoData;
+ HKEY DevRegKey = NULL;
+ PWSTR OperatingMode = NULL;
+ PWSTR OperatingParams = NULL;
+ PWSTR OperatingExceptions = NULL;
+ DWORD ValueType;
+ DWORD ValueSize = BUFFER_SIZE;
+ HKEY DevOsrRegKey = NULL;
+ PWSTR FileText = NULL;
+ DWORD FileTextLength;
+
+ //
+ // Validate arguments.
+ //
+ if (Argc != 2)
+ {
+ Err = ERROR_INVALID_PARAMETER;
+ goto cleanup;
+ }
+
+ OperatingMode = (PWSTR)malloc(BUFFER_SIZE * sizeof(WCHAR));
+
+ if (OperatingMode == NULL)
+ {
+ Err = ERROR_OUTOFMEMORY;
+ goto cleanup;
+ }
+
+ OperatingParams = (PWSTR)malloc(BUFFER_SIZE * sizeof(WCHAR));
+
+ if (OperatingParams == NULL)
+ {
+ Err = ERROR_OUTOFMEMORY;
+ goto cleanup;
+ }
+
+ OperatingExceptions = (PWSTR)malloc(BUFFER_SIZE * sizeof(WCHAR));
+
+ if (OperatingExceptions == NULL)
+ {
+ Err = ERROR_OUTOFMEMORY;
+ goto cleanup;
+ }
+
+ //
+ // Argv[1] should be the device instance ID.
+ //
+ DeviceInstanceId = Argv[1];
+
+ //
+ // Create a device info list to store queried device handles.
+ //
+ DevInfoList = SetupDiCreateDeviceInfoList(NULL, NULL);
+
+ if (DevInfoList == INVALID_HANDLE_VALUE)
+ {
+ Err = ERROR_OUTOFMEMORY;
+ goto cleanup;
+ }
+
+ DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
+
+ //
+ // Add the Software Component device that called AddSoftware to the
+ // device info list, which will be used to find the primary device that
+ // called AddComponent in the first place.
+ //
+ if (!SetupDiOpenDeviceInfo(DevInfoList,
+ DeviceInstanceId,
+ NULL,
+ 0,
+ &DevInfoData))
+ {
+ Err = GetLastError();
+ goto cleanup;
+ }
+
+ //
+ // Get the device instance id of the opened device's parent.
+ //
+ if (!SetupDiGetDeviceProperty(DevInfoList,
+ &DevInfoData,
+ &DEVPKEY_Device_Parent,
+ &DevPropType,
+ (PBYTE)ParentDeviceInstanceId,
+ sizeof(ParentDeviceInstanceId),
+ &RequiredSize,
+ 0))
+ {
+ Err = GetLastError();
+ goto cleanup;
+ }
+
+ if ((DevPropType != DEVPROP_TYPE_STRING) ||
+ (RequiredSize < sizeof(WCHAR)))
+ {
+ Err = ERROR_INVALID_PARAMETER;
+ goto cleanup;
+ }
+
+ ParentDevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
+
+ //
+ // Get the parent of the device we retrieved first, which is the device
+ // that called AddComponent in its INF.
+ //
+ if (!SetupDiOpenDeviceInfoW(DevInfoList,
+ ParentDeviceInstanceId,
+ NULL,
+ 0,
+ &ParentDevInfoData))
+ {
+ Err = GetLastError();
+ goto cleanup;
+ }
+
+ //
+ // Open up the HW registry keys of the primary device.
+ //
+ DevRegKey = SetupDiOpenDevRegKey(DevInfoList,
+ &ParentDevInfoData,
+ DICS_FLAG_GLOBAL,
+ 0,
+ DIREG_DEV,
+ KEY_READ);
+
+ if (DevRegKey == INVALID_HANDLE_VALUE)
+ {
+ Err = GetLastError();
+ DevRegKey = NULL;
+ goto cleanup;
+ }
+
+ Err = RegOpenKeyEx(DevRegKey,
+ DEVICE_REG_SUBKEY,
+ 0,
+ KEY_QUERY_VALUE,
+ &DevOsrRegKey);
+
+ if (Err != ERROR_SUCCESS)
+ {
+ goto cleanup;
+ }
+
+ //
+ // Retrieve the registry values defined in the primary device's INF.
+ // Note that if the extension INF was applied, the extension INF would
+ // overwrite OperatingParams and create OperatingExceptions.
+ //
+ Err = RegQueryValueEx(DevOsrRegKey,
+ DEVICE_VALUE_OP_MODE,
+ NULL,
+ &ValueType,
+ (LPBYTE)OperatingMode,
+ &ValueSize);
+
+ while (Err == ERROR_MORE_DATA)
+ {
+ //
+ // Create a larger buffer.
+ //
+ OperatingMode = (PTSTR)realloc(OperatingMode, ValueSize);
+
+ Err = RegQueryValueEx(DevOsrRegKey,
+ DEVICE_VALUE_OP_MODE,
+ NULL,
+ &ValueType,
+ (LPBYTE)OperatingMode,
+ &ValueSize);
+ }
+
+ if (Err != ERROR_SUCCESS)
+ {
+ OperatingMode[0] = TEXT('\0');
+ }
+ else if ((ValueType != REG_SZ) ||
+ (ValueSize < sizeof(TCHAR)))
+ {
+ Err = ERROR_REGISTRY_CORRUPT;
+ OperatingMode[0] = TEXT('\0');
+ }
+
+ ValueSize = BUFFER_SIZE;
+
+ Err = RegQueryValueEx(DevOsrRegKey,
+ DEVICE_VALUE_OP_PARAMS,
+ NULL,
+ &ValueType,
+ (LPBYTE)OperatingParams,
+ &ValueSize);
+
+ while (Err == ERROR_MORE_DATA)
+ {
+ //
+ // Create a larger buffer.
+ //
+ OperatingParams = (PTSTR)realloc(OperatingParams, ValueSize);
+
+ Err = RegQueryValueEx(DevOsrRegKey,
+ DEVICE_VALUE_OP_MODE,
+ NULL,
+ &ValueType,
+ (LPBYTE)OperatingParams,
+ &ValueSize);
+ }
+
+ if (Err != ERROR_SUCCESS)
+ {
+ OperatingParams[0] = TEXT('\0');
+ }
+ else if ((ValueType != REG_SZ) ||
+ (ValueSize < sizeof(TCHAR)))
+ {
+ Err = ERROR_REGISTRY_CORRUPT;
+ OperatingParams[0] = TEXT('\0');
+ }
+
+ ValueSize = BUFFER_SIZE;
+
+ Err = RegQueryValueEx(DevOsrRegKey,
+ DEVICE_VALUE_OP_EXCEPTIONS,
+ NULL,
+ &ValueType,
+ (LPBYTE)OperatingExceptions,
+ &ValueSize);
+
+ while (Err == ERROR_MORE_DATA)
+ {
+ //
+ // Create a larger buffer.
+ //
+ OperatingExceptions = (PTSTR)realloc(OperatingExceptions, ValueSize);
+
+ Err = RegQueryValueEx(DevOsrRegKey,
+ DEVICE_VALUE_OP_EXCEPTIONS,
+ NULL,
+ &ValueType,
+ (LPBYTE)OperatingExceptions,
+ &ValueSize);
+ }
+
+ if (Err != ERROR_SUCCESS)
+ {
+ OperatingExceptions[0] = TEXT('\0');
+ }
+ else if ((ValueType != REG_SZ) ||
+ (ValueSize < sizeof(TCHAR)))
+ {
+ Err = ERROR_REGISTRY_CORRUPT;
+ OperatingExceptions[0] = TEXT('\0');
+ }
+
+ FileTextLength = (DWORD)wcslen(OperatingMode) +
+ (DWORD)wcslen(OperatingParams) +
+ (DWORD)wcslen(OperatingExceptions) +
+ (DWORD)wcslen(FILE_CONTENT) -
+ 9; // Subtract the 3 %ws
+
+ FileText = (PWSTR)malloc((FileTextLength + 1) * sizeof(WCHAR));
+
+ if (FileText == NULL)
+ {
+ Err = ERROR_OUTOFMEMORY;
+ goto cleanup;
+ }
+
+ hr = StringCchPrintf(FileText,
+ FileTextLength + 1,
+ FILE_CONTENT,
+ OperatingMode,
+ OperatingParams,
+ OperatingExceptions);
+
+ if (FAILED(hr))
+ {
+ Err = HRESULT_CODE(hr);
+ goto cleanup;
+ }
+
+ Err = WriteToFile(FileText, FileTextLength);
+
+ if (Err != ERROR_SUCCESS)
+ {
+ goto cleanup;
+ }
+
+cleanup:
+
+ if (FileText != NULL)
+ {
+ free(FileText);
+ }
+
+ if (OperatingExceptions != NULL)
+ {
+ free(OperatingExceptions);
+ }
+
+ if (OperatingParams != NULL)
+ {
+ free(OperatingParams);
+ }
+
+ if (OperatingMode != NULL)
+ {
+ free(OperatingMode);
+ }
+
+ if (DevOsrRegKey != NULL)
+ {
+ RegCloseKey(DevOsrRegKey);
+ }
+
+ if (DevRegKey != NULL)
+ {
+ RegCloseKey(DevRegKey);
+ }
+
+ if (DevInfoList != INVALID_HANDLE_VALUE)
+ {
+ SetupDiDestroyDeviceInfoList(DevInfoList);
+ }
+
+ return;
+}
+
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters
new file mode 100644
index 00000000..395438fa
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.filters
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="stdafx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="osrfx2_DCHU_componentsoftware.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj
new file mode 100644
index 00000000..931646bb
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/osrfx2_DCHU_componentsoftware.vcxproj
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{26D91630-B8FF-4102-A258-32F7D1C84E20}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>osrfx2_DCHU_componentsoftware</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
+ <ProjectName>osrfx2_DCHU_componentsoftware</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <TargetName>$(ProjectName)</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <TargetName>$(ProjectName)</TargetName>
+ <TargetExt>.exe</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>onecoreuap.lib;setupapi.lib;</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>onecoreuap.lib;setupapi.lib;</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>onecoreuap.lib;setupapi.lib;</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>onecoreuap.lib;setupapi.lib;</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="stdafx.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="osrfx2_DCHU_componentsoftware.cpp" />
+ <ClCompile Include="stdafx.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/stdafx.cpp b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/stdafx.cpp
new file mode 100644
index 00000000..79325e21
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/stdafx.cpp
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+// osrusbfx2umsoftware.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/stdafx.h b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/stdafx.h
new file mode 100644
index 00000000..edb61924
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/stdafx.h
@@ -0,0 +1,18 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently, but
+// are changed infrequently
+//
+
+#pragma once
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <tchar.h>
+#include <Windows.h>
+#include <initguid.h>
+#include <Devpkey.h>
+#include <SetupAPI.h>
+#include <strsafe.h>
+#include <cfgmgr32.h>
+
+// TODO: reference additional headers your program requires here
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/targetver.h b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/targetver.h
new file mode 100644
index 00000000..87c0086d
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_componentsoftware/targetver.h
@@ -0,0 +1,8 @@
+#pragma once
+
+// Including SDKDDKVer.h defines the highest available Windows platform.
+
+// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
+// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
+
+#include <SDKDDKVer.h>
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension.sln b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension.sln
index 386ba436..40b15034 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension.sln
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension.sln
@@ -1,18 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
+# Visual Studio 15
+VisualStudioVersion = 15.0.26430.16
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DHCU_extension", "osrfx2_DHCU_extension", "{4577857A-CCAE-42EB-BDE2-16C1E3DC7B14}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_usersvc", "osrfx2_DCHU_usersvc", "{D10B02D6-7E48-4F78-8AAE-20C93E77FA52}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_extension", "osrfx2_DCHU_extension", "{4577857A-CCAE-42EB-BDE2-16C1E3DC7B14}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_extension", "osrfx2_DCHU_extension\osrfx2_DCHU_extension.vcxproj", "{0588DF70-3923-42E6-8DC9-13C2C0186F20}"
ProjectSection(ProjectDependencies) = postProject
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3} = {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}
+ {26D91630-B8FF-4102-A258-32F7D1C84E20} = {26D91630-B8FF-4102-A258-32F7D1C84E20}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_usersvc", "osrfx2_DCHU_usersvc\osrfx2_DCHU_usersvc.vcxproj", "{DE70E2D1-6A4D-4984-BD82-CE750889F0D3}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osrfx2_DCHU_componentsoftware", "osrfx2_DCHU_componentsoftware", "{B327FC27-5816-4F28-959F-4C35F1D22678}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osrfx2_DCHU_componentsoftware", "osrfx2_DCHU_componentsoftware\osrfx2_DCHU_componentsoftware.vcxproj", "{26D91630-B8FF-4102-A258-32F7D1C84E20}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -50,24 +50,24 @@ Global
{0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|x86.ActiveCfg = Release|Win32
{0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|x86.Build.0 = Release|Win32
{0588DF70-3923-42E6-8DC9-13C2C0186F20}.Release|x86.Deploy.0 = Release|Win32
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|ARM.ActiveCfg = Debug|Win32
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|ARM64.ActiveCfg = Debug|Win32
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|x64.ActiveCfg = Debug|x64
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|x64.Build.0 = Debug|x64
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|x86.ActiveCfg = Debug|Win32
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Debug|x86.Build.0 = Debug|Win32
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|ARM.ActiveCfg = Release|Win32
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|ARM64.ActiveCfg = Release|Win32
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|x64.ActiveCfg = Release|x64
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|x64.Build.0 = Release|x64
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|x86.ActiveCfg = Release|Win32
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3}.Release|x86.Build.0 = Release|Win32
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Debug|ARM.ActiveCfg = Debug|Win32
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Debug|ARM64.ActiveCfg = Debug|Win32
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Debug|x64.ActiveCfg = Debug|x64
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Debug|x64.Build.0 = Debug|x64
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Debug|x86.ActiveCfg = Debug|Win32
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Debug|x86.Build.0 = Debug|Win32
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Release|ARM.ActiveCfg = Release|Win32
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Release|ARM64.ActiveCfg = Release|Win32
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Release|x64.ActiveCfg = Release|x64
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Release|x64.Build.0 = Release|x64
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Release|x86.ActiveCfg = Release|Win32
+ {26D91630-B8FF-4102-A258-32F7D1C84E20}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{0588DF70-3923-42E6-8DC9-13C2C0186F20} = {4577857A-CCAE-42EB-BDE2-16C1E3DC7B14}
- {DE70E2D1-6A4D-4984-BD82-CE750889F0D3} = {D10B02D6-7E48-4F78-8AAE-20C93E77FA52}
+ {26D91630-B8FF-4102-A258-32F7D1C84E20} = {B327FC27-5816-4F28-959F-4C35F1D22678}
EndGlobalSection
EndGlobal
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters
new file mode 100644
index 00000000..0ba1a59c
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.filters
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Driver Files">
+ <UniqueIdentifier>{8E41214B-6785-4CFE-B992-037D68949A14}</UniqueIdentifier>
+ <Extensions>inf;inv;inx;mof;mc;</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <Inf Include="osrfx2_DCHU_extension.inx">
+ <Filter>Driver Files</Filter>
+ </Inf>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
new file mode 100644
index 00000000..570cd389
--- /dev/null
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.inx
@@ -0,0 +1,55 @@
+;/*++
+;
+;Copyright (c) Microsoft Corporation. All rights reserved.
+;
+; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
+; KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+; IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
+; PURPOSE.
+;
+;Module Name:
+;
+; osrfx2_DCHU_extension.INF
+;
+;Abstract:
+;
+; Extension inf for the OSR FX2 Learning Kit
+;
+;--*/
+
+[Version]
+Signature = "$WINDOWS NT$"
+Class = Extension
+ClassGuid = {e2f84ce7-8efa-411c-aa69-97454ca4cb57}
+Provider = %ManufacturerName%
+ExtensionId = {zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz} ; replace with your own GUID
+CatalogFile = osrfx2_DCHU_extension.cat
+DriverVer = 05/16/2017,15.14.36.721
+
+[Manufacturer]
+%ManufacturerName% = OsrFx2Extension, NT$ARCH$
+
+[OsrFx2Extension.NT$ARCH$]
+%OsrFx2.ExtensionDesc% = OsrFx2Extension_Install, USB\Vid_045e&Pid_94aa&mi_00
+%OsrFx2.ExtensionDesc% = OsrFx2Extension_Install, USB\Vid_0547&PID_1002
+
+[OsrFx2Extension_Install.NT]
+CopyInf=osrfx2_DCHU_component.inf
+
+[OsrFx2Extension_Install.NT.HW]
+AddReg = OsrFx2Extension_AddReg
+AddReg = OsrFx2Extension_COMAddReg
+
+[OsrFx2Extension_AddReg]
+HKR, OSR, "OperatingParams",, "-Extended"
+HKR, OSR, "OperatingExceptions",, "x86"
+
+[OsrFx2Extension_Install.NT.Components]
+AddComponent = osrfx2_DCHU_component,,OsrFx2Extension_ComponentInstall
+
+[OsrFx2Extension_ComponentInstall]
+ComponentIds=VID_045e&PID_94ab
+
+[Strings]
+ManufacturerName = "Contoso"
+OsrFx2.ExtensionDesc = "OsrFx2 DCHU Device Extension"
diff --git a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj
index 232cfa89..4542c3a7 100644
--- a/general/DCHU/osrfx2_DCHU_extension/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj
+++ b/general/DCHU/osrfx2_DCHU_extension_tight/osrfx2_DCHU_extension/osrfx2_DCHU_extension.vcxproj
@@ -35,23 +35,11 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
- <Inf Include="..\osrfx2_DCHU_usersvc\osrfx2_DCHU_usersvc.inx" />
+ <Inf Include="..\osrfx2_DCHU_component\osrfx2_DCHU_component.inx" />
<Inf Include="osrfx2_DCHU_extension.inx" />
</ItemGroup>
<ItemGroup>
- <FilesToPackage Include="$(SolutionDir)$(Platform)\$(Configuration)\osrfx2_DCHU_usersvc.exel" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <PackageRelativeDirectory>
- </PackageRelativeDirectory>
- </FilesToPackage>
- <FilesToPackage Include="$(SolutionDir)$(Platform)\$(Configuration)\osrfx2_DCHU_usersvc.exe" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <PackageRelativeDirectory>
- </PackageRelativeDirectory>
- </FilesToPackage>
- <FilesToPackage Include="$(SolutionDir)$(Platform)\$(Configuration)\osrfx2_DCHU_usersvc.exe" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <PackageRelativeDirectory>
- </PackageRelativeDirectory>
- </FilesToPackage>
- <FilesToPackage Include="$(SolutionDir)$(Platform)\$(Configuration)\osrfx2_DCHU_usersvc.exe" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <FilesToPackage Include="C:\Users\mamont\Documents\GitHub\Windows-driver-samples\general\DCHU\osrfx2_DCHU_extension_tight\x64\Release\osrfx2_DCHU_componentsoftware.exe">
<PackageRelativeDirectory>
</PackageRelativeDirectory>
</FilesToPackage>
@@ -74,6 +62,7 @@
<ConfigurationType>Utility</ConfigurationType>
<DriverType>Package</DriverType>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -82,6 +71,7 @@
<ConfigurationType>Utility</ConfigurationType>
<DriverType>Package</DriverType>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -90,6 +80,7 @@
<ConfigurationType>Utility</ConfigurationType>
<DriverType>Package</DriverType>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
@@ -98,6 +89,7 @@
<ConfigurationType>Utility</ConfigurationType>
<DriverType>Package</DriverType>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
diff --git a/general/PLX9x5x/README.md b/general/PLX9x5x/README.md
index a706b7d0..e665839b 100644
--- a/general/PLX9x5x/README.md
+++ b/general/PLX9x5x/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: PLX9x5x PCI Driver
+ platform: KMDF
+ language: cpp
+ category: General PCI WDF
+ description: Demonstrates how to write a driver for a generic PCI device using Windows Driver Frameworks (WDF).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617719
+--->
+
+
PLX9x5x PCI Driver
==================
diff --git a/general/SystemDma/wdm/README.md b/general/SystemDma/wdm/README.md
index a077fe8d..ad7d9dbc 100644
--- a/general/SystemDma/wdm/README.md
+++ b/general/SystemDma/wdm/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: System DMA sample
+ platform: WDM
+ language: cpp
+ category: General
+ description: Demonstrates how a driver could use a system DMA controller to write data to a hardware location using V3 System DMA.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617722
+--->
+
+
System DMA
==========
diff --git a/general/cancel/README.md b/general/cancel/README.md
index 2a1be648..491ef673 100644
--- a/general/cancel/README.md
+++ b/general/cancel/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Cancel-Safe IRP Queue Sample
+ platform: WDM
+ language: cpp
+ category: General
+ description: Demonstrates the use of the cancel-safe queue routines.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617705
+--->
+
+
Cancel-Safe IRP Queue Sample
============================
diff --git a/general/echo/kmdf/README.md b/general/echo/kmdf/README.md
index 3b89850c..2ed4518a 100644
--- a/general/echo/kmdf/README.md
+++ b/general/echo/kmdf/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: KMDF Echo Sample
+ platform: KMDF
+ language: cpp
+ category: General WDF
+ description: Demonstrates how to use a sequential queue to serialize read and write requests presented to the driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617706
+--->
+
+
KMDF Echo Sample
================
diff --git a/general/echo/umdf/README.md b/general/echo/umdf/README.md
index e2123cd3..af4818d4 100644
--- a/general/echo/umdf/README.md
+++ b/general/echo/umdf/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Echo Sample (UMDF Version 1)
+ platform: UMDF1
+ language: cpp
+ category: General WDF
+ description: Demonstrates how to use UMDF version 1 to write a driver and demonstrates best practices.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617707
+--->
+
+
Echo Sample (UMDF Version 1)
============================
diff --git a/general/echo/umdf2/README.md b/general/echo/umdf2/README.md
index ba3ffa36..a9ec9e76 100644
--- a/general/echo/umdf2/README.md
+++ b/general/echo/umdf2/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: Echo Sample (UMDF Version 2)
+ platform: UMDF2
+ language: cpp
+ category: General WDF
+ description: Demonstrates how to use UMDF 2 to write a driver and to employ best practices.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617708
+--->
+
Echo Sample (UMDF Version 2)
============================
diff --git a/general/echo/umdfSocketEcho/README.md b/general/echo/umdfSocketEcho/README.md
index 06819a47..26cd5a7e 100644
--- a/general/echo/umdfSocketEcho/README.md
+++ b/general/echo/umdfSocketEcho/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: UMDF SocketEcho Sample (UMDF Version 1)
+ platform: UMDF1
+ language: cpp
+ category: General WDF
+ description: Demonstrates how to use UMDF version 1 to write a driver and demonstrates best practices.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617709
+--->
+
+
UMDF SocketEcho Sample (UMDF Version 1)
=======================================
diff --git a/general/event/README.md b/general/event/README.md
index c091af5a..68da1666 100644
--- a/general/event/README.md
+++ b/general/event/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Hardware Event Sample
+ platform: WDM
+ language: cpp
+ category: General
+ description: Demonstrates different ways a kernel-mode driver can notify an application about a hardware event.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617711
+--->
+
+
Hardware Event Sample
=====================
diff --git a/general/filehistory/README.md b/general/filehistory/README.md
index 3e29b08e..7ed723d8 100644
--- a/general/filehistory/README.md
+++ b/general/filehistory/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: File History Sample
+ platform: WDM
+ language: cpp
+ category: General
+ description: A console application that starts the file history service, if it is stopped, and schedules regular backups.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617712
+--->
+
+
File History Sample
==================
diff --git a/general/filehistory/exe/fhsetup.vcxproj b/general/filehistory/exe/fhsetup.vcxproj
index fdb347e1..e6e78377 100644
--- a/general/filehistory/exe/fhsetup.vcxproj
+++ b/general/filehistory/exe/fhsetup.vcxproj
@@ -97,15 +97,15 @@
<WarningLevel>Level4</WarningLevel>
<ExceptionHandling>Sync</ExceptionHandling>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);shell32.lib;shlwapi.lib;Ole32.lib;Oleaut32.lib;User32.lib;fhsvcctl.lib</AdditionalDependencies>
@@ -117,15 +117,15 @@
<WarningLevel>Level4</WarningLevel>
<ExceptionHandling>Sync</ExceptionHandling>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);shell32.lib;shlwapi.lib;Ole32.lib;Oleaut32.lib;User32.lib;fhsvcctl.lib</AdditionalDependencies>
@@ -137,15 +137,15 @@
<WarningLevel>Level4</WarningLevel>
<ExceptionHandling>Sync</ExceptionHandling>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);shell32.lib;shlwapi.lib;Ole32.lib;Oleaut32.lib;User32.lib;fhsvcctl.lib</AdditionalDependencies>
@@ -157,15 +157,15 @@
<WarningLevel>Level4</WarningLevel>
<ExceptionHandling>Sync</ExceptionHandling>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</ClCompile>
<Midl>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</Midl>
<ResourceCompile>
<PreprocessorDefinitions>%(PreprocessorDefinitions);UNICODE;_UNICODE</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);.</AdditionalIncludeDirectories>
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);shell32.lib;shlwapi.lib;Ole32.lib;Oleaut32.lib;User32.lib;fhsvcctl.lib</AdditionalDependencies>
@@ -187,4 +187,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/general/installwdf/README.md b/general/installwdf/README.md
index 429957d5..df9e8445 100644
--- a/general/installwdf/README.md
+++ b/general/installwdf/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WDF Installation Package
+ platform: Tool
+ language: cpp
+ category: General WDF
+ description: Demonstrates how to install WDF packages on a system.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617713
+--->
+
+
WDF Installation Package
========================
diff --git a/general/ioctl/kmdf/README.md b/general/ioctl/kmdf/README.md
index c9a10365..9c3d80d4 100644
--- a/general/ioctl/kmdf/README.md
+++ b/general/ioctl/kmdf/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Non-PnP Driver Sample
+ platform: KMDF
+ language: cpp
+ category: General WDF
+ description: Demonstrates how to write a non-PnP driver using the Kernel Mode Driver Framework.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620307
+--->
+
+
Non-PnP Driver Sample
====================
diff --git a/general/ioctl/wdm/README.md b/general/ioctl/wdm/README.md
index fcbf71f2..e9e2e57d 100644
--- a/general/ioctl/wdm/README.md
+++ b/general/ioctl/wdm/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: IOCTL
+ platform: WDM
+ language: cpp
+ category: General
+ description: Demonstrates usage of four different types of IOCTLs
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617715
+--->
+
+
IOCTL
=====
diff --git a/general/obcallback/README.md b/general/obcallback/README.md
index ca4069a2..37326565 100644
--- a/general/obcallback/README.md
+++ b/general/obcallback/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: ObCallback Callback Registration Driver
+ platform: WDM
+ language: cpp
+ category: General
+ description: Demonstrates the use of registered callbacks for process protection.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617716
+--->
+
+
ObCallback Callback Registration Driver
=======================================
diff --git a/general/pcidrv/README.md b/general/pcidrv/README.md
index 04bf35b5..2fa15558 100644
--- a/general/pcidrv/README.md
+++ b/general/pcidrv/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: PCIDRV - WDF Driver for PCI Device
+ platform: KMDF
+ language: cpp
+ category: General PCI WDF
+ description: Demonstrates how to write a KMDF driver for a PCI device.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617717
+--->
+
+
PCIDRV - WDF Driver for PCI Device
==================================
diff --git a/general/perfcounters/kcs/README.md b/general/perfcounters/kcs/README.md
index 1cbd3ac0..2e7553e5 100644
--- a/general/perfcounters/kcs/README.md
+++ b/general/perfcounters/kcs/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Kernel Counter Sample (Kcs)
+ platform: WDM
+ language: cpp
+ category: General
+ description: Demonstrates the use of the kernel-mode performance library.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617718
+--->
+
+
Kernel Counter Sample (Kcs)
===========================
diff --git a/general/perfcounters/kcs/kcs.vcxproj b/general/perfcounters/kcs/kcs.vcxproj
index 5f30eb23..e97abb07 100644
--- a/general/perfcounters/kcs/kcs.vcxproj
+++ b/general/perfcounters/kcs/kcs.vcxproj
@@ -151,7 +151,7 @@
<PropertyGroup>
<CTRPP_ODIR>$([System.IO.Path]::GetDirectoryName($(ProjectDir)\$(IntDir)))</CTRPP_ODIR>
</PropertyGroup>
- <Exec Command="&quot;$(WDKContentRoot)\bin\x86\ctrpp.exe&quot; kcs.man -prefix Kcs -o &quot;$(CTRPP_ODIR)\KcsCounters.h&quot; -ch &quot;$(CTRPP_ODIR)\KcsCounters_counters.h&quot; -rc &quot;$(CTRPP_ODIR)\KcsCounters.rc&quot;" WorkingDirectory="$(MSBuildProjectDirectory)" />
+ <Exec Command="&quot;ctrpp.exe&quot; kcs.man -prefix Kcs -o &quot;$(CTRPP_ODIR)\KcsCounters.h&quot; -ch &quot;$(CTRPP_ODIR)\KcsCounters_counters.h&quot; -rc &quot;$(CTRPP_ODIR)\KcsCounters.rc&quot;" WorkingDirectory="$(MSBuildProjectDirectory)" />
</Target>
<ItemGroup>
<ClCompile Include="Kcs.c" />
@@ -170,4 +170,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/general/registry/regfltr/README.md b/general/registry/regfltr/README.md
index 9e5a0740..40fe7011 100644
--- a/general/registry/regfltr/README.md
+++ b/general/registry/regfltr/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: RegFltr Sample Driver
+ platform: WDM
+ language: cpp
+ category: General
+ description: Demonstrates how to write a registry filter driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617720
+--->
+
+
RegFltr Sample Driver
=====================
diff --git a/general/toaster/toastDrv/README.md b/general/toaster/toastDrv/README.md
index 326d40a9..9e9a469a 100644
--- a/general/toaster/toastDrv/README.md
+++ b/general/toaster/toastDrv/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Toaster Sample Driver
+ platform: KMDF UMDF1
+ language: cpp
+ category: General WDF
+ description: An iterative series of samples that demonstrate KDMF and UDMF1 driver development.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620309
+--->
+
+
Toaster Sample Driver
=====================
The Toaster collection is an iterative series of samples that demonstrate fundamental aspects of Windows driver development for both Kernel-Mode Driver Framework (KMDF) and User-Mode Driver Framework (UMDF) version 1.
diff --git a/general/toaster/toastpkg/README.md b/general/toaster/toastpkg/README.md
index 326d40a9..a4763177 100644
--- a/general/toaster/toastpkg/README.md
+++ b/general/toaster/toastpkg/README.md
@@ -1,5 +1,15 @@
-Toaster Sample Driver
-=====================
+<!---
+ name: Toaster Package Sample Driver
+ platform: WDM
+ language: cpp
+ category: General
+ description: Simulates hardware-first and software-first installation of the toaster sample driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617723
+--->
+
+
+Toaster Package Sample Driver
+=============================
The Toaster collection is an iterative series of samples that demonstrate fundamental aspects of Windows driver development for both Kernel-Mode Driver Framework (KMDF) and User-Mode Driver Framework (UMDF) version 1.
All the samples work with a hypothetical toaster bus, over which toaster devices can be connected to a PC.
diff --git a/general/toaster/umdf2/README.md b/general/toaster/umdf2/README.md
index 9dcdd158..75cf882b 100644
--- a/general/toaster/umdf2/README.md
+++ b/general/toaster/umdf2/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Toaster Sample (UMDF version 2)
+ platform: UMDF2
+ language: cpp
+ category: General WDF
+ description: An iterative series of samples that demonstrate driver development using UMDF version 2.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620310
+--->
+
+
Toaster Sample (UMDF Version 2)
===============================
The Toaster (UMDF version 2) sample is an iterative series of samples that demonstrate fundamental aspects of Windows driver development.
diff --git a/general/tracing/SystemTraceControl/README.md b/general/tracing/SystemTraceControl/README.md
index eb044ddb..b45ae788 100644
--- a/general/tracing/SystemTraceControl/README.md
+++ b/general/tracing/SystemTraceControl/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: System Trace Control
+ platform: Application
+ language: cpp
+ category: General Tracing
+ description: Demonstrates how to use event tracing control APIs to collect events from the system trace provider.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617725
+--->
+
+
SystemTraceProvider
===================
diff --git a/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj b/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj
index 7669ebaa..1d635e7e 100644
--- a/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj
+++ b/general/tracing/SystemTraceControl/SystemTraceControl.vcxproj
@@ -26,22 +26,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
diff --git a/general/tracing/evntdrv/README.md b/general/tracing/evntdrv/README.md
index 4e64ecae..41359ad1 100644
--- a/general/tracing/evntdrv/README.md
+++ b/general/tracing/evntdrv/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Eventdrv
+ platform: Application
+ language: cpp
+ category: General Tracing
+ description: Demonstrates the use of the Event Tracing for Windows (ETW) API in a driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617724
+--->
+
+
Eventdrv
========
diff --git a/general/tracing/tracedriver/README.md b/general/tracing/tracedriver/README.md
index 064fb133..358053a1 100644
--- a/general/tracing/tracedriver/README.md
+++ b/general/tracing/tracedriver/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Tracedrv
+ platform: Application
+ language: cpp
+ category: General Tracing
+ description: A sample driver instrumented for software tracing.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617726
+--->
+
+
Tracedrv
========
diff --git a/general/umdfSkeleton/README.md b/general/umdfSkeleton/README.md
index 923f44df..022722c1 100644
--- a/general/umdfSkeleton/README.md
+++ b/general/umdfSkeleton/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: UMDF Driver Skeleton Sample (UMDF version 1)
+ platform: UMDF1
+ language: cpp
+ category: General WDF
+ description: Demonstrates how to use UDMF to write a minimal driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617727
+--->
+
+
UMDF Driver Skeleton Sample (UMDF Version 1)
============================================
diff --git a/gpio/samples/README.md b/gpio/samples/README.md
index dcf5ca64..ba05c2f6 100644
--- a/gpio/samples/README.md
+++ b/gpio/samples/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: GPIO Sample Drivers
+ platform: KMDF UMDF1
+ language: cpp
+ category: GPIO
+ description: Illustrates how to write a GPIO controller driver that works in conjunction with the GPIO framework extension (GpioClx).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617729
+--->
+
+
GPIO Sample Drivers
===================
diff --git a/hid/firefly/README.md b/hid/firefly/README.md
index 306d816f..cd526150 100644
--- a/hid/firefly/README.md
+++ b/hid/firefly/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: KMDF filter driver for a HID device
+ platform: KMDF
+ language: cpp
+ category: HID
+ description: Illustrates using remote I/O target interfaces to open a HID collection in kernel-mode and send IOCTL requests to set and get feature reports.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620192
+--->
+
+
KMDF filter driver for a HID device
===================================
Firefly is a KMDF-based filter driver for a HID device. Along with illustrating how to write a filter driver, this sample shows how to use remote I/O target interfaces to open a HID collection in kernel-mode and send IOCTL requests to set and get feature reports, as well as how an application can use WMI interfaces to send commands to a filter driver.
diff --git a/hid/hclient/README.md b/hid/hclient/README.md
index b98902fe..192f4f90 100644
--- a/hid/hclient/README.md
+++ b/hid/hclient/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: HClient sample application
+ platform: WDM
+ language: cpp
+ category: HID
+ description: Demonstrates how to write a user-mode client application that communicates with HID devices.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617730
+--->
+
+
HClient sample application
==========================
diff --git a/hid/hidusbfx2/README.md b/hid/hidusbfx2/README.md
index bd0b88a9..20eb2001 100644
--- a/hid/hidusbfx2/README.md
+++ b/hid/hidusbfx2/README.md
@@ -1,3 +1,14 @@
+<!---
+ name: HIDUSBFX2 sample driver
+ platform: KMDF
+ language: cpp
+ category: HID
+ description: Demonstrates mapping of a non-HID USB device to a HID device.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620190
+--->
+
+
+
HIDUSBFX2 sample driver
=======================
The HIDUSBFX2 sample driver (hidusbfx2.sys) demonstrates how to map a non-HID USB device to a HID device.
diff --git a/hid/hidusbfx2/sys/driver.c b/hid/hidusbfx2/sys/driver.c
index 825c803f..5ec4a441 100644
--- a/hid/hidusbfx2/sys/driver.c
+++ b/hid/hidusbfx2/sys/driver.c
@@ -26,7 +26,7 @@ Revision History:
--*/
-#include <hidusbfx2.h>
+#include "hidusbfx2.h"
#if defined(EVENT_TRACING)
//
@@ -110,7 +110,7 @@ Return Value:
if (!NT_SUCCESS(status)) {
TraceEvents(TRACE_LEVEL_ERROR, DBG_INIT,
"WdfDriverCreate failed with status 0x%x\n", status);
-
+
WPP_CLEANUP(DriverObject);
}
@@ -160,7 +160,7 @@ Return Value:
"HidFx2EvtDeviceAdd called\n");
//
- // Tell framework this is a filter driver. Filter drivers by default are
+ // Tell framework this is a filter driver. Filter drivers by default are
// not power policy owners. This works well for this driver because
// HIDclass driver is the power policy owner for HID minidrivers.
//
@@ -202,7 +202,7 @@ Return Value:
}
devContext = GetDeviceContext(hDevice);
-
+
WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(&queueConfig, WdfIoQueueDispatchParallel);
queueConfig.EvtIoInternalDeviceControl = HidFx2EvtInternalDeviceControl;
@@ -246,7 +246,7 @@ Return Value:
}
//
- // Create a timer to handle debouncing of switchpack
+ // Create a timer to handle debouncing of switchpack
//
WDF_TIMER_CONFIG_INIT(
&timerConfig,
diff --git a/hid/hidusbfx2/sys/hid.c b/hid/hidusbfx2/sys/hid.c
index 362ed515..423e1131 100644
--- a/hid/hidusbfx2/sys/hid.c
+++ b/hid/hidusbfx2/sys/hid.c
@@ -28,7 +28,7 @@ Revision History:
#define USE_HARDCODED_HID_REPORT_DESCRIPTOR
-#include <hidusbfx2.h>
+#include "hidusbfx2.h"
#if defined(EVENT_TRACING)
#include "hid.tmh"
@@ -53,7 +53,7 @@ HidFx2EvtInternalDeviceControl(
Routine Description:
- This event is called when the framework receives
+ This event is called when the framework receives
IRP_MJ_INTERNAL DEVICE_CONTROL requests from the system.
Arguments:
@@ -90,7 +90,7 @@ Return Value:
TraceEvents(TRACE_LEVEL_INFORMATION, DBG_IOCTL,
"%s, Queue:0x%p, Request:0x%p\n",
DbgHidInternalIoctlString(IoControlCode),
- Queue,
+ Queue,
Request
);
@@ -139,14 +139,14 @@ Return Value:
if(!NT_SUCCESS(status)){
TraceEvents(TRACE_LEVEL_ERROR, DBG_IOCTL,
"WdfRequestForwardToIoQueue failed with status: 0x%x\n", status);
-
+
WdfRequestComplete(Request, status);
}
return;
//
-// This feature is only supported on WinXp and later. Compiling in W2K
+// This feature is only supported on WinXp and later. Compiling in W2K
// build environment will fail without this conditional preprocessor statement.
//
case IOCTL_HID_SEND_IDLE_NOTIFICATION_REQUEST:
@@ -154,16 +154,16 @@ Return Value:
//
// Hidclass sends this IOCTL for devices that have opted-in for Selective
// Suspend feature. This feature is enabled by adding a registry value
- // "SelectiveSuspendEnabled" = 1 in the hardware key through inf file
- // (see hidusbfx2.inf). Since hidclass is the power policy owner for
- // this stack, it controls when to send idle notification and when to
- // cancel it. This IOCTL is passed to USB stack. USB stack pends it.
+ // "SelectiveSuspendEnabled" = 1 in the hardware key through inf file
+ // (see hidusbfx2.inf). Since hidclass is the power policy owner for
+ // this stack, it controls when to send idle notification and when to
+ // cancel it. This IOCTL is passed to USB stack. USB stack pends it.
// USB stack completes the request when it determines that the device is
- // idle. Hidclass's idle notification callback get called that requests a
- // wait-wake Irp and subsequently powers down the device.
- // The device is powered-up either when a handle is opened for the PDOs
+ // idle. Hidclass's idle notification callback get called that requests a
+ // wait-wake Irp and subsequently powers down the device.
+ // The device is powered-up either when a handle is opened for the PDOs
// exposed by hidclass, or when usb stack completes wait
- // wake request. In the first case, hidclass cancels the notification
+ // wake request. In the first case, hidclass cancels the notification
// request (pended with usb stack), cancels wait-wake Irp and powers up
// the device. In the second case, an external wake event triggers completion
// of wait-wake irp and powering up of device.
@@ -173,10 +173,10 @@ Return Value:
if (!NT_SUCCESS(status)) {
TraceEvents(TRACE_LEVEL_ERROR, DBG_IOCTL,
"SendIdleNotification failed with status: 0x%x\n", status);
-
+
WdfRequestComplete(Request, status);
- }
-
+ }
+
return;
case IOCTL_HID_SET_FEATURE:
@@ -187,7 +187,7 @@ Return Value:
status = HidFx2SetFeature(Request);
WdfRequestComplete(Request, status);
return;
-
+
case IOCTL_HID_GET_FEATURE:
//
// Get a HID class feature report from a top-level collection of
@@ -248,7 +248,7 @@ Routine Description
Arguments:
- Request - Wdf Request
+ Request - Wdf Request
Return Value:
@@ -268,7 +268,7 @@ Return Value:
TraceEvents(TRACE_LEVEL_VERBOSE, DBG_IOCTL, "HidFx2SetFeature Enter\n");
device = WdfIoQueueGetDevice(WdfRequestGetIoQueue(Request));
-
+
WDF_REQUEST_PARAMETERS_INIT(&params);
WdfRequestGetParameters(Request, &params);
@@ -276,7 +276,7 @@ Return Value:
// IOCTL_HID_SET_FEATURE & IOCTL_HID_GET_FEATURE are not METHOD_NIEHTER
// IOCTLs. So you cannot retreive UserBuffer from the IRP using Wdf
// function. As a result we have to escape out to WDM to get the UserBuffer
- // directly from the IRP.
+ // directly from the IRP.
//
if (params.Parameters.DeviceIoControl.InputBufferLength < sizeof(HID_XFER_PACKET)) {
status = STATUS_BUFFER_TOO_SMALL;
@@ -321,15 +321,15 @@ Return Value:
if (transferPacket->reportId == SEVEN_SEGMENT_REPORT_ID)
{
status = SendVendorCommand(
- device,
+ device,
HIDFX2_SET_7SEGMENT_DISPLAY,
- &featureUsage
+ &featureUsage
);
}
else if (transferPacket->reportId == BARGRAPH_REPORT_ID)
{
status = SendVendorCommand(
- device,
+ device,
HIDFX2_SET_BARGRAPH_DISPLAY,
&featureUsage
);
@@ -360,7 +360,7 @@ Routine Description
Arguments:
- Request - Wdf Request
+ Request - Wdf Request
BytesReturned - Size of buffer returned for the request
@@ -383,7 +383,7 @@ Return Value:
*BytesReturned = 0;
device = WdfIoQueueGetDevice(WdfRequestGetIoQueue(Request));
-
+
WDF_REQUEST_PARAMETERS_INIT(&params);
WdfRequestGetParameters(Request, &params);
@@ -391,7 +391,7 @@ Return Value:
// IOCTL_HID_SET_FEATURE & IOCTL_HID_GET_FEATURE are not METHOD_NIEHTER
// IOCTLs. So you cannot retreive UserBuffer from the IRP using Wdf
// function. As a result we have to escape out to WDM to get the UserBuffer
- // directly from the IRP.
+ // directly from the IRP.
//
if (params.Parameters.DeviceIoControl.OutputBufferLength < sizeof(HID_XFER_PACKET)) {
status = STATUS_BUFFER_TOO_SMALL;
@@ -431,15 +431,15 @@ Return Value:
if (transferPacket->reportId == SEVEN_SEGMENT_REPORT_ID)
{
status = GetVendorData(
- device,
+ device,
HIDFX2_READ_7SEGMENT_DISPLAY,
- &featureReport->FeatureData
+ &featureReport->FeatureData
);
}
else if (transferPacket->reportId == BARGRAPH_REPORT_ID)
{
status = GetVendorData(
- device,
+ device,
HIDFX2_READ_BARGRAPH_DISPLAY,
&featureReport->FeatureData
);
@@ -473,7 +473,7 @@ Routine Description
Arguments:
- Request - Wdf Request
+ Request - Wdf Request
Return Value:
@@ -487,7 +487,7 @@ Return Value:
WDF_MEMORY_DESCRIPTOR memDesc;
WDF_USB_CONTROL_SETUP_PACKET controlSetupPacket;
WDF_REQUEST_SEND_OPTIONS sendOptions;
-
+
PAGED_CODE();
TraceEvents(TRACE_LEVEL_VERBOSE, DBG_IOCTL, "SendVendorCommand Enter\n");
@@ -495,7 +495,7 @@ Return Value:
pDevContext = GetDeviceContext(Device);
TraceEvents(TRACE_LEVEL_INFORMATION, DBG_IOCTL,
- "SendVendorCommand: Command:0x%x, data: 0x%x\n",
+ "SendVendorCommand: Command:0x%x, data: 0x%x\n",
VendorCommand, *CommandData);
//
@@ -503,7 +503,7 @@ Return Value:
//
// Send the I/O with a timeout. We do that because we send the
// I/O in the context of the user thread and if it gets stuck, it would
- // prevent the user process from existing.
+ // prevent the user process from existing.
//
WDF_REQUEST_SEND_OPTIONS_INIT(&sendOptions,
WDF_REQUEST_SEND_OPTION_TIMEOUT);
@@ -535,7 +535,7 @@ Return Value:
TraceEvents(TRACE_LEVEL_ERROR, DBG_IOCTL,
"SendtVendorCommand: Failed to set Segment Display state - 0x%x \n",
status);
- }
+ }
TraceEvents(TRACE_LEVEL_VERBOSE, DBG_IOCTL, "SendVendorCommand Exit\n");
@@ -557,7 +557,7 @@ Routine Description
Arguments:
- Request - Wdf Request
+ Request - Wdf Request
Return Value:
@@ -571,7 +571,7 @@ Return Value:
WDF_MEMORY_DESCRIPTOR memDesc;
WDF_USB_CONTROL_SETUP_PACKET controlSetupPacket;
WDF_REQUEST_SEND_OPTIONS sendOptions;
-
+
PAGED_CODE();
TraceEvents(TRACE_LEVEL_VERBOSE, DBG_IOCTL, "GetVendorData Enter\n");
@@ -579,7 +579,7 @@ Return Value:
pDevContext = GetDeviceContext(Device);
TraceEvents(TRACE_LEVEL_INFORMATION, DBG_IOCTL,
- "GetVendorData: Command:0x%x, data: 0x%x\n",
+ "GetVendorData: Command:0x%x, data: 0x%x\n",
VendorCommand, *CommandData);
//
@@ -587,7 +587,7 @@ Return Value:
//
// Send the I/O with a timeout. We do that because we send the
// I/O in the context of the user thread and if it gets stuck, it would
- // prevent the user process from existing.
+ // prevent the user process from existing.
//
WDF_REQUEST_SEND_OPTIONS_INIT(&sendOptions,
WDF_REQUEST_SEND_OPTION_TIMEOUT);
@@ -619,11 +619,11 @@ Return Value:
TraceEvents(TRACE_LEVEL_ERROR, DBG_IOCTL,
"GetVendorData: Failed to get state - 0x%x \n",
status);
- }
+ }
else
{
TraceEvents(TRACE_LEVEL_INFORMATION, DBG_IOCTL,
- "GetVendorData: Command:0x%x, data after command: 0x%x\n",
+ "GetVendorData: Command:0x%x, data after command: 0x%x\n",
VendorCommand, *CommandData);
}
@@ -642,7 +642,7 @@ HidFx2GetHidDescriptor(
Routine Description:
- Finds the HID descriptor and copies it into the buffer provided by the
+ Finds the HID descriptor and copies it into the buffer provided by the
Request.
Arguments:
@@ -668,7 +668,7 @@ Return Value:
//
// This IOCTL is METHOD_NEITHER so WdfRequestRetrieveOutputMemory
- // will correctly retrieve buffer from Irp->UserBuffer.
+ // will correctly retrieve buffer from Irp->UserBuffer.
// Remember that HIDCLASS provides the buffer in the Irp->UserBuffer
// field irrespective of the ioctl buffer type. However, framework is very
// strict about type checking. You cannot get Irp->UserBuffer by using
@@ -683,7 +683,7 @@ Return Value:
}
//
- // Use hardcoded "HID Descriptor"
+ // Use hardcoded "HID Descriptor"
//
bytesToCopy = G_DefaultHidDescriptor.bLength;
@@ -691,9 +691,9 @@ Return Value:
status = STATUS_INVALID_DEVICE_STATE;
TraceEvents(TRACE_LEVEL_ERROR, DBG_IOCTL,
"G_DefaultHidDescriptor is zero, 0x%x\n", status);
- return status;
+ return status;
}
-
+
status = WdfMemoryCopyFromBuffer(memory,
0, // Offset
(PVOID) &G_DefaultHidDescriptor,
@@ -749,7 +749,7 @@ Return Value:
//
// This IOCTL is METHOD_NEITHER so WdfRequestRetrieveOutputMemory
- // will correctly retrieve buffer from Irp->UserBuffer.
+ // will correctly retrieve buffer from Irp->UserBuffer.
// Remember that HIDCLASS provides the buffer in the Irp->UserBuffer
// field irrespective of the ioctl buffer type. However, framework is very
// strict about type checking. You cannot get Irp->UserBuffer by using
@@ -772,9 +772,9 @@ Return Value:
status = STATUS_INVALID_DEVICE_STATE;
TraceEvents(TRACE_LEVEL_ERROR, DBG_IOCTL,
"G_DefaultHidDescriptor's reportLenght is zero, 0x%x\n", status);
- return status;
+ return status;
}
-
+
status = WdfMemoryCopyFromBuffer(memory,
0,
(PVOID) G_DefaultReportDescriptor,
@@ -828,7 +828,7 @@ Return Value:
//
// This IOCTL is METHOD_NEITHER so WdfRequestRetrieveOutputMemory
- // will correctly retrieve buffer from Irp->UserBuffer.
+ // will correctly retrieve buffer from Irp->UserBuffer.
// Remember that HIDCLASS provides the buffer in the Irp->UserBuffer
// field irrespective of the ioctl buffer type. However, framework is very
// strict about type checking. You cannot get Irp->UserBuffer by using
@@ -890,7 +890,7 @@ Return Value:
BOOLEAN sendStatus = FALSE;
WDF_REQUEST_SEND_OPTIONS options;
WDFIOTARGET nextLowerDriver;
- WDFDEVICE device;
+ WDFDEVICE device;
PIO_STACK_LOCATION currentIrpStack = NULL;
IO_STACK_LOCATION nextIrpStack;
@@ -900,7 +900,7 @@ Return Value:
//
// Convert the request to corresponding USB Idle notification request
//
- if (currentIrpStack->Parameters.DeviceIoControl.InputBufferLength <
+ if (currentIrpStack->Parameters.DeviceIoControl.InputBufferLength <
sizeof(HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO)) {
status = STATUS_BUFFER_TOO_SMALL;
@@ -909,7 +909,7 @@ Return Value:
return status;
}
- ASSERT(sizeof(HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO)
+ ASSERT(sizeof(HID_SUBMIT_IDLE_NOTIFICATION_CALLBACK_INFO)
== sizeof(USB_IDLE_CALLBACK_INFO));
#pragma warning(suppress :4127) // conditional expression is constant warning
@@ -925,15 +925,15 @@ Return Value:
// prepare next stack location
//
RtlZeroMemory(&nextIrpStack, sizeof(IO_STACK_LOCATION));
-
+
nextIrpStack.MajorFunction = currentIrpStack->MajorFunction;
nextIrpStack.Parameters.DeviceIoControl.InputBufferLength =
currentIrpStack->Parameters.DeviceIoControl.InputBufferLength;
nextIrpStack.Parameters.DeviceIoControl.Type3InputBuffer =
currentIrpStack->Parameters.DeviceIoControl.Type3InputBuffer;
- nextIrpStack.Parameters.DeviceIoControl.IoControlCode =
+ nextIrpStack.Parameters.DeviceIoControl.IoControlCode =
IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION;
- nextIrpStack.DeviceObject =
+ nextIrpStack.DeviceObject =
WdfIoTargetWdmGetTargetDeviceObject(WdfDeviceGetIoTarget(device));
//
@@ -954,7 +954,7 @@ Return Value:
);
nextLowerDriver = WdfDeviceGetIoTarget(device);
-
+
sendStatus = WdfRequestSend(
Request,
nextLowerDriver,
diff --git a/hid/hidusbfx2/sys/usb.c b/hid/hidusbfx2/sys/usb.c
index 50f1a03b..676d92d6 100644
--- a/hid/hidusbfx2/sys/usb.c
+++ b/hid/hidusbfx2/sys/usb.c
@@ -26,7 +26,7 @@ Revision History:
--*/
-#include <hidusbfx2.h>
+#include "hidusbfx2.h"
#if defined(EVENT_TRACING)
#include "usb.tmh"
@@ -84,7 +84,7 @@ Return Value:
"HidFx2EvtDevicePrepareHardware Enter\n");
devContext = GetDeviceContext(Device);
-
+
//
// Create a WDFUSBDEVICE object. WdfUsbTargetDeviceCreate obtains the
// USB device descriptor and the first USB configuration descriptor from
@@ -95,8 +95,8 @@ Return Value:
// object. The driver cannot change this parent, and the ParentObject
// member or the WDF_OBJECT_ATTRIBUTES structure must be NULL.
//
- // We only create device the first time PrepareHardware is called. If
- // the device is restarted by pnp manager for resource rebalance, we
+ // We only create device the first time PrepareHardware is called. If
+ // the device is restarted by pnp manager for resource rebalance, we
// will use the same device handle but then select the interfaces again
// because the USB stack could reconfigure the device on restart.
//
@@ -104,7 +104,7 @@ Return Value:
status = WdfUsbTargetDeviceCreate(Device,
WDF_NO_OBJECT_ATTRIBUTES,
&devContext->UsbDevice);
-
+
if (!NT_SUCCESS(status)) {
TraceEvents(TRACE_LEVEL_ERROR, DBG_PNP,
"WdfUsbTargetDeviceCreate failed 0x%x\n", status);
@@ -113,7 +113,7 @@ Return Value:
//
// TODO: If you are fetching configuration descriptor from device for
- // selecting a configuration or to parse other descriptors, call
+ // selecting a configuration or to parse other descriptors, call
// HidFx2ValidateConfigurationDescriptor
// to do basic validation on the descriptors before you access them.
//
@@ -332,7 +332,7 @@ Return Value:
);
return;
}
-
+
switchState = WdfMemoryGetBuffer(Buffer, NULL);
currentSwitchState = *switchState;
@@ -812,8 +812,8 @@ Return Value:
// USBD_ValidateConfigurationDescriptor validates that all descriptors are completely contained within the configuration descriptor buffer.
// It also checks for interface numbers, number of endpoints in an interface etc.
// Please refer to msdn documentation for this function for more information.
- //
-
+ //
+
status = USBD_ValidateConfigurationDescriptor( ConfigDesc, BufferLength , ValidationLevel , Offset , POOL_TAG );
if (!(NT_SUCCESS (status)) ){
return status;
@@ -821,10 +821,10 @@ Return Value:
//
// TODO: You should validate the correctness of other descriptors which are not taken care by USBD_ValidateConfigurationDescriptor
- // Check that all such descriptors have size >= sizeof(the descriptor they point to)
- // Check for any association between them if required
- //
-
+ // Check that all such descriptors have size >= sizeof(the descriptor they point to)
+ // Check for any association between them if required
+ //
+
return status;
}
diff --git a/hid/vhidmini2/README.md b/hid/vhidmini2/README.md
index 7679a849..bd6ea894 100644
--- a/hid/vhidmini2/README.md
+++ b/hid/vhidmini2/README.md
@@ -1,4 +1,13 @@
-HID Minidriver Sample (UMDF V2)
+<!---
+ name: HID Minidriver Sample (UMDF version 2)
+ platform: UMDF2
+ language: cpp
+ category: HID
+ description: Demonstrates how to write a HID minidriver using User-Mode Driver Framework (UMDF).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617731
+--->
+
+HID Minidriver Sample (UMDF version 2)
======================================
The *HID minidriver* sample demonstrates how to write a HID minidriver using User-Mode Driver Framework (UMDF).
diff --git a/input/hiddigi/SynapticsTouch/README.md b/input/hiddigi/SynapticsTouch/README.md
index df0347d2..6fb9b5ee 100644
--- a/input/hiddigi/SynapticsTouch/README.md
+++ b/input/hiddigi/SynapticsTouch/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Synaptics Touch Sample
+ platform: KMDF
+ language: cpp
+ category: HID Touch
+ description: Demonstrates how to write a HID miniport driver for the Synaptics 3202 touch controller.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620196
+--->
+
+
Synaptics Touch Sample
======================
@@ -17,15 +27,6 @@ Related technologies
[Windows Pointer Device](http://msdn.microsoft.com/en-us/library/windows/hardware/jj151570)
-##System requirements
--------------------
-**Client:** Windows 10 Technical Preview
-
-**Server:** Windows 10 Technical Preview
-
-**Phone:** Windows 10 Technical Preview
-
-
File Manifest
-------------
diff --git a/input/kbfiltr/README.md b/input/kbfiltr/README.md
index 9942ec40..f570c5cb 100644
--- a/input/kbfiltr/README.md
+++ b/input/kbfiltr/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Keyboard Input WDF Filter Driver (Kbfiltr)
+ platform: KMDF
+ language: cpp
+ category: HID WDF
+ description: A WDF example of a keyboard input filter driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620194
+--->
+
+
Keyboard Input WDF Filter Driver (Kbfiltr)
==========================================
diff --git a/input/layout/README.md b/input/layout/README.md
index 341c8ade..d998e379 100644
--- a/input/layout/README.md
+++ b/input/layout/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Keyboard Layout Samples
+ platform: Application
+ language: cpp
+ category: HID
+ description: Demonstrates how to generate layouts for various keyboards and locales.
+ samplefwlink: https://aka.ms/rapjms
+--->
+
+
Keyboard Layout Samples
=======================
diff --git a/input/moufiltr/README.md b/input/moufiltr/README.md
index e0cc32c5..6cf5c585 100644
--- a/input/moufiltr/README.md
+++ b/input/moufiltr/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Mouse Input WDF Filter Driver (Moufiltr)
+ platform: KMDF
+ language: cpp
+ category: HID WDF
+ description: A WDF example of a mouse input filter driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620195
+--->
+
+
Mouse Input WDF Filter Driver (Moufiltr)
========================================
The Moufiltr sample is an example of a mouse input filter driver.
diff --git a/network/config/bindview/README.md b/network/config/bindview/README.md
index 01e1cd8d..b239b700 100644
--- a/network/config/bindview/README.md
+++ b/network/config/bindview/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Bindview Network Configuration Utility
+ platform: Application
+ language: cpp
+ category: Network
+ description: An application that demonstrates how to use INetCfg APIs to enumerate, install, uninstall, bind and unbind network components.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617732
+--->
+
+
Bindview Network Configuration Utility
======================================
diff --git a/network/modem/fakemodem/README.md b/network/modem/fakemodem/README.md
index b79071cb..3734a95a 100644
--- a/network/modem/fakemodem/README.md
+++ b/network/modem/fakemodem/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: Fakemodem Driver
+ platform: KMDF
+ language: cpp
+ category: Network
+ description: Demonstrates a simple controller-less modem driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617733
+--->
+
Fakemodem Driver
================
diff --git a/network/ndis/extension/README.md b/network/ndis/extension/README.md
index dc3b6b92..df154559 100644
--- a/network/ndis/extension/README.md
+++ b/network/ndis/extension/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Hyper-V Extensible Switch extension filter driver
+ platform: WDM
+ language: cpp
+ category: Network
+ description: A base library used to implement a Hyper-V Extensible Switch extension filter driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617913
+--->
+
+
Hyper-V Extensible Switch extension filter driver
=================================================
diff --git a/network/ndis/filter/README.md b/network/ndis/filter/README.md
index ac1bc67c..274287bc 100644
--- a/network/ndis/filter/README.md
+++ b/network/ndis/filter/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: NDIS 6.0 Filter Driver
+ platform: WDM
+ language: cpp
+ category: Network
+ description: A pass-through NDIS 6 filter driver demonstrating the basic principles of an NDIS 6.0 Filter driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617915
+--->
+
+
NDIS 6.0 Filter Driver
======================
diff --git a/network/ndis/mux/README.md b/network/ndis/mux/README.md
index 0a545a3a..cf9a112c 100644
--- a/network/ndis/mux/README.md
+++ b/network/ndis/mux/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: NDIS MUX Intermediate Driver and Notify Object
+ platform: WDM
+ language: cpp
+ category: Network
+ description: An NDIS 6.0 driver that demonstrates the operation of an N:1 MUX driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617916
+--->
+
+
NDIS MUX Intermediate Driver and Notify Object
==============================================
diff --git a/network/ndis/ndisprot/6x/README.md b/network/ndis/ndisprot/6x/README.md
index 55843a0c..211a8721 100644
--- a/network/ndis/ndisprot/6x/README.md
+++ b/network/ndis/ndisprot/6x/README.md
@@ -1,7 +1,17 @@
-NDIS Connection-less Protocol Driver Sample
-===========================================
+<!---
+ name: NDIS Connection-less Protocol WDM Driver Sample
+ platform: WDM
+ language: cpp
+ category: Network
+ description: Demonstrates a connection-less NDIS 6.0 protocol WDM driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617917
+--->
-This sample demonstrates a connection-less NDIS 6.0 protocol.The driver supports sending and receiving raw Ethernet frames using `ReadFile`/`WriteFile` calls from user-mode. It only receives frames with a specific EtherType field. As an NDIS protocol, it illustrates how to establish and tear down bindings to Ethernet adapters, i.e. those that export medium type **NdisMedium802\_3**. It shows how to set a packet filter, send and receive data, and handle plug-and-play events.
+
+NDIS Connection-less Protocol WDM Driver Sample
+===============================================
+
+This sample demonstrates a connection-less NDIS 6.0 protocol WDM driver. The driver supports sending and receiving raw Ethernet frames using `ReadFile`/`WriteFile` calls from user-mode. It only receives frames with a specific EtherType field. As an NDIS protocol, it illustrates how to establish and tear down bindings to Ethernet adapters, i.e. those that export medium type **NdisMedium802\_3**. It shows how to set a packet filter, send and receive data, and handle plug-and-play events.
### INSTALLATION
diff --git a/network/ndis/ndisprot_kmdf/README.md b/network/ndis/ndisprot_kmdf/README.md
index 0da2ae31..0f2ceb23 100644
--- a/network/ndis/ndisprot_kmdf/README.md
+++ b/network/ndis/ndisprot_kmdf/README.md
@@ -1,6 +1,17 @@
-Connection-less NDIS 6.0 Sample Protocol Driver
-===============================================
-This sample demonstrates a connection-less NDIS 6.0 protocol driver.
+<!---
+ name: Connection-less NDIS 6.0 Protocol KMDF Sample Driver
+ platform: KMDF
+ language: cpp
+ category: Network
+ description: Demonstrates a connection-less NDIS 6.0 protocol KMDF driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620197
+--->
+
+
+Connection-less NDIS 6.0 Protocol KMDF Sample Driver
+====================================================
+
+This sample demonstrates a connection-less NDIS 6.0 protocol KMDF driver.
The driver supports sending and receiving raw Ethernet frames using ReadFile/WriteFile calls from user-mode. As an NDIS protocol, it illustrates how to establish and tear down bindings to Ethernet adapters, i.e. those that export medium type *NdisMedium802\_3*. It shows how to set a packet filter, send and receive data, and handle plug-and-play events.
diff --git a/network/ndis/netvmini/6x/README.md b/network/ndis/netvmini/6x/README.md
index 76020b5d..023e1674 100644
--- a/network/ndis/netvmini/6x/README.md
+++ b/network/ndis/netvmini/6x/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: NDIS Virtual Miniport Driver
+ platform: WDM
+ language: cpp
+ category: Network
+ description: Demonstrates the functionality of an NDIS miniport driver without requiring a physical network adapter.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617918
+--->
+
+
NDIS Virtual Miniport Driver
============================
diff --git a/network/radio/HidSwitchDriverSample/README.md b/network/radio/HidSwitchDriverSample/README.md
index 5f4fdd81..9726babf 100644
--- a/network/radio/HidSwitchDriverSample/README.md
+++ b/network/radio/HidSwitchDriverSample/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Radio Switch Test Driver for OSR USB-FX2 Development Board
+ platform: KMDF
+ language: cpp
+ category: Network Radio
+ description: Demonstrates how to structure a HID driver for radio switches for the OSR USB-FX2 Development Board.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617919
+--->
+
+
Radio Switch Test Driver for OSR USB-FX2 Development Board
==========================================================
diff --git a/network/radio/HidSwitchDriverSample/driver.c b/network/radio/HidSwitchDriverSample/driver.c
index 54e80dae..61cc97fc 100644
--- a/network/radio/HidSwitchDriverSample/driver.c
+++ b/network/radio/HidSwitchDriverSample/driver.c
@@ -1,4 +1,4 @@
-#include <RadioSwitchHidUsbFx2.h>
+#include "RadioSwitchHidUsbFx2.h"
#pragma warning(disable:28252)
#pragma warning(disable:28253)
#include "driver.tmh"
@@ -39,7 +39,7 @@ NTSTATUS DriverEntry (_In_ PDRIVER_OBJECT pDriverObject, _In_ PUNICODE_STRING ps
&config, // Driver Config Info
WDF_NO_HANDLE
);
- if (!NT_SUCCESS(status))
+ if (!NT_SUCCESS(status))
{
TraceErr(DBG_INIT, "(%!FUNC!)WdfDriverCreate failed with status %!STATUS!\n", status);
WPP_CLEANUP(pDriverObject);
@@ -64,7 +64,7 @@ void HidFx2EvtDriverContextCleanup(_In_ WDFOBJECT hDriver)
-//HidFx2EvtDeviceAdd is called by the framework in response to AddDevicecall from the PnP manager.
+//HidFx2EvtDeviceAdd is called by the framework in response to AddDevicecall from the PnP manager.
//We create and initialize a WDF device object to represent a new instance of device.
//
NTSTATUS HidFx2EvtDeviceAdd(_In_ WDFDRIVER hDriver, _Inout_ PWDFDEVICE_INIT pDeviceInit)
@@ -111,7 +111,7 @@ NTSTATUS HidFx2EvtDeviceAdd(_In_ WDFDRIVER hDriver, _Inout_ PWDFDEVICE_INIT pDev
}
pDevContext = GetDeviceContext(hDevice);
-
+
WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(&queueConfig, WdfIoQueueDispatchParallel);
queueConfig.EvtIoInternalDeviceControl = HidFx2EvtInternalDeviceControl;
@@ -136,7 +136,7 @@ NTSTATUS HidFx2EvtDeviceAdd(_In_ WDFDRIVER hDriver, _Inout_ PWDFDEVICE_INIT pDev
return status;
}
- // Create a timer to handle debouncing of switchpack
+ // Create a timer to handle debouncing of switchpack
WDF_TIMER_CONFIG_INIT(&timerConfig, HidFx2EvtTimerFunction);
timerConfig.AutomaticSerialization = FALSE;
diff --git a/network/radio/HidSwitchDriverSample/hid.c b/network/radio/HidSwitchDriverSample/hid.c
index 27fcefea..2421b88f 100644
--- a/network/radio/HidSwitchDriverSample/hid.c
+++ b/network/radio/HidSwitchDriverSample/hid.c
@@ -1,4 +1,4 @@
-#include <RadioSwitchHidUsbFx2.h>
+#include "RadioSwitchHidUsbFx2.h"
#include "hid.tmh"
// Radio Management Collection - Scenario 1 control collection (Button only)
@@ -223,7 +223,7 @@ NTSTATUS HidFx2GetInput(_In_ WDFREQUEST hRequest)
TraceVerbose(DBG_IOCTL, "(%!FUNC!) Enter\n");
hDevice = WdfIoQueueGetDevice(WdfRequestGetIoQueue(hRequest));
-
+
WDF_REQUEST_PARAMETERS_INIT(&params);
WdfRequestGetParameters(hRequest, &params);
@@ -296,7 +296,7 @@ NTSTATUS HidFx2SetOutput(_In_ WDFREQUEST hRequest)
TraceVerbose(DBG_IOCTL, "(%!FUNC!) Enter\n");
hDevice = WdfIoQueueGetDevice(WdfRequestGetIoQueue(hRequest));
-
+
WDF_REQUEST_PARAMETERS_INIT(&params);
WdfRequestGetParameters(hRequest, &params);
@@ -335,7 +335,7 @@ NTSTATUS HidFx2SetOutput(_In_ WDFREQUEST hRequest)
TraceErr(DBG_IOCTL, "(%!FUNC!) Incorrect report ID, %!STATUS!\n", status);
return status;
}
-
+
pOutputReport = (PHIDFX2_IO_REPORT)pTransferPacket->reportBuffer;
if (pOutputReport->bData == 0)
@@ -471,7 +471,7 @@ NTSTATUS HidFx2GetHidDescriptor(_In_ WDFDEVICE hDevice, _In_ WDFREQUEST hRequest
TraceErr(DBG_IOCTL, "(%!FUNC!) c_DefaultHidDescriptor is zero, %!STATUS!\n", status);
return status;
}
-
+
}
else // WdfRequestRetrieveOutputMemory failed
{
diff --git a/network/radio/HidSwitchDriverSample/usb.c b/network/radio/HidSwitchDriverSample/usb.c
index bacd1bce..84cf7faa 100644
--- a/network/radio/HidSwitchDriverSample/usb.c
+++ b/network/radio/HidSwitchDriverSample/usb.c
@@ -1,4 +1,4 @@
-#include <RadioSwitchHidUsbFx2.h>
+#include "RadioSwitchHidUsbFx2.h"
#include "usb.tmh"
@@ -39,7 +39,7 @@ HidFx2EvtDevicePrepareHardware(
// The parent of each USB device object is the driver's framework driver object. The driver cannot change this parent, and the ParentObject
// member or the WDF_OBJECT_ATTRIBUTES structure must be NULL.
//
- // We only create device the first time PrepareHardware is called. If the device is restarted by pnp manager for resource rebalance, we
+ // We only create device the first time PrepareHardware is called. If the device is restarted by pnp manager for resource rebalance, we
// will use the same device handle but then select the interfaces again because the USB stack could reconfigure the device on restart.
if (pDevContext->hUsbDevice == NULL)
{
@@ -162,7 +162,7 @@ void HidFx2EvtUsbInterruptPipeReadComplete(
}
- // Make sure that there is data in the read packet.
+ // Make sure that there is data in the read packet.
// Depending on the device specification, it is possible for it to return a 0 length read in certain conditions.
if (cNumBytesTransferred == 0)
{
@@ -269,7 +269,7 @@ void HidFx2EvtTimerFunction(_In_ WDFTIMER hTimer)
WdfRequestCompleteWithInformation(hRequest, status, cBytesReturned);
- }
+ }
else if (status != STATUS_NO_MORE_ENTRIES)
{
TraceErr(DBG_IOCTL, "(%!FUNC!) WdfIoQueueRetrieveNextRequest status %!STATUS!\n", status);
@@ -340,7 +340,7 @@ NTSTATUS HidFx2GetSwitchState(_In_ WDFDEVICE hDevice, _Out_ unsigned char *pbSwi
// EvtDeviceD0Entry event callback must perform any operations that are necessary before the specified device is used.
// Called every time the hardware needs to be initialized/reinitialized.
-// This function is not marked pageable because this function is in the device power up path.
+// This function is not marked pageable because this function is in the device power up path.
// This function runs at PASSIVE_LEVEL, even though it is not paged.
//
NTSTATUS HidFx2EvtDeviceD0Entry(_In_ WDFDEVICE hDevice, _In_ WDF_POWER_DEVICE_STATE previousState)
@@ -412,7 +412,7 @@ stopped, when it is removed, and when it is powered off.
The device is still in D0 when this callback is invoked, which means that the driver can still touch hardware in this routine.
-EvtDeviceD0Exit event callback must perform any operations that are necessary before the specified device is moved out of the D0 state.
+EvtDeviceD0Exit event callback must perform any operations that are necessary before the specified device is moved out of the D0 state.
If the driver needs to save hardware state before the device is powered down, then that should be done here.
This function runs at PASSIVE_LEVEL, though it is generally not paged. A driver can optionally make this function pageable if DO_POWER_PAGABLE is set.
diff --git a/network/radio/RadioManagerSample/README.md b/network/radio/RadioManagerSample/README.md
index e391e051..3cac53e9 100644
--- a/network/radio/RadioManagerSample/README.md
+++ b/network/radio/RadioManagerSample/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Windows Radio Management Sample
+ platform: WDM
+ language: cpp
+ category: Network Radio
+ description: Demonstrates how to structure a Radio Manager for use with the Windows Radio Management APIs.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617920
+--->
+
+
Windows Radio Management Sample
===============================
diff --git a/network/trans/WFPSampler/README.md b/network/trans/WFPSampler/README.md
index d23c2554..84621bcd 100644
--- a/network/trans/WFPSampler/README.md
+++ b/network/trans/WFPSampler/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Windows Filtering Platform Sample
+ platform: KMDF
+ language: cpp
+ category: Network
+ description: A sample firewall that has a command-line interface which allows adding filters at various WFP layers.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620198
+--->
+
+
Windows Filtering Platform Sample
=================================
diff --git a/network/trans/ddproxy/README.md b/network/trans/ddproxy/README.md
index a9e1d427..45a122d9 100644
--- a/network/trans/ddproxy/README.md
+++ b/network/trans/ddproxy/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Windows Filtering Platform Packet Modification Sample
+ platform: KMDF
+ language: cpp
+ category: Network
+ description: Demonstrates the packet modification capabilities of the Windows Filtering Platform (WFP).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617930
+--->
+
+
Windows Filtering Platform Packet Modification Sample
=====================================================
diff --git a/network/trans/inspect/README.md b/network/trans/inspect/README.md
index 4f28598c..2c197c4f 100644
--- a/network/trans/inspect/README.md
+++ b/network/trans/inspect/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Windows Filtering Platform Traffic Inspection Sample
+ platform: KMDF
+ language: cpp
+ category: Network
+ description: Demonstrates the traffic inspection capabilities of the Windows Filtering Platform (WFP).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617931
+--->
+
+
Windows Filtering Platform Traffic Inspection Sample
====================================================
diff --git a/network/trans/msnmntr/README.md b/network/trans/msnmntr/README.md
index fcc9c420..14127cbc 100644
--- a/network/trans/msnmntr/README.md
+++ b/network/trans/msnmntr/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Windows Filtering Platform MSN Messenger Monitor Sample
+ platform: KMDF
+ language: cpp
+ category: Network
+ description: Demonstrates the stream inspection capabilities of the Windows Filtering Platform (WFP).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617932
+--->
+
+
Windows Filtering Platform MSN Messenger Monitor Sample
=======================================================
diff --git a/network/trans/stmedit/README.md b/network/trans/stmedit/README.md
index 0c434b07..67905639 100644
--- a/network/trans/stmedit/README.md
+++ b/network/trans/stmedit/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Windows Filtering Platform Stream Edit Sample
+ platform: KMDF
+ language: cpp
+ category: Network
+ description: Demonstrates replacing a string pattern for a Transmission Control Protocol (TCP) connection using the Windows Filtering Platform (WFP).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617933
+--->
+
+
Windows Filtering Platform Stream Edit Sample
=============================================
diff --git a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj
index c6089236..af48c0a4 100644
--- a/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj
+++ b/network/wlan/WDI/PLATFORM/NDIS6/SDIO/sdio.vcxproj
@@ -577,6 +577,8 @@
<Link>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<AdditionalDependencies>$(SolutionDir)COMMON\$(Configuration)\$(Platform)\common.lib;$(SolutionDir)PLATFORM\NdisComm\$(Configuration)\$(Platform)\NdisComm.lib;$(SolutionDir)\LIB\x64\hal.lib;$(SolutionDir)\LIB\x64\rtklibcom.lib;$(WindowsSDK_LibraryPath_x64)km\x64\ndis.lib;$(WindowsSDK_LibraryPath_x64)km\x64\ntoskrnl.lib;$(WindowsSDK_LibraryPath_x64)km\x64\sdbus.lib;$(WindowsSDK_LibraryPath_x64)km\x64\wlan\1.0\TlvGeneratorParser.lib;</AdditionalDependencies>
+ <!-- warning LNK4099: PDB 'rtklibcom.pdb' was not found with 'rtklibcom.lib(multichannels.obj)' -->
+ <AdditionalOptions>$(AdditionalOptions) /IGNORE:4099</AdditionalOptions>
</Link>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
@@ -636,7 +638,7 @@
<!-- Needed by any VcxProj -->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup Label="UserMacros" />
- <!-- The WrappedTaskItems label is used by the conversion tool to identify the location where items
+ <!-- The WrappedTaskItems label is used by the conversion tool to identify the location where items
associated with wrapped tasks will reside.-->
<ItemGroup Label="WrappedTaskItems">
<FilesToPackage Include="$(SolutionDir)\PLATFORM\WinInf\SDIO\x64\netrtwlans.inf" Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
@@ -748,4 +750,4 @@
</ItemGroup>
<!-- /Necessary to pick up propper files from local directory when in the IDE-->
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.c b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.c
index d1005a4b..ec5cddd6 100644
--- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.c
+++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Cmds.c
@@ -28,7 +28,7 @@ wdi_task_WriteResult(
{
NdisMoveMemory((u1Byte *)hdr + sizeof(*hdr), tlv, tlvlen);
}
-
+
hTask->OutputBufferLength = tlvlen;
}
@@ -40,7 +40,7 @@ wdi_ScanCb(
)
{
ADAPTER *pAdapter = (ADAPTER *)pCtx;
-
+
RT_TRACE_F(COMP_MLME, DBG_LOUD, ("%s\n", CustomScan_ScanStateTxt(state)));
if(CUSTOM_SCAN_STATE_PRE_DESTROY == state)
@@ -59,13 +59,13 @@ wdi_P2PDiscoveryCb(
ADAPTER *pAdapter = (ADAPTER *)pCtx;
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
P2P_INFO *info = GET_P2P_INFO(pAdapter);
-
+
RT_TRACE_F(COMP_P2P, DBG_LOUD, ("%s\n", CustomScan_ScanStateTxt(state)));
if(CUSTOM_SCAN_STATE_COMPLETED == state)
{
WDI_TASK_P2P_DISCOVER_PARAMETERS *param = hTask->tlvParser.parsedTlv.paramP2pDiscover;
-
+
MGNT_INFO *mgnt = &pAdapter->MgntInfo;
u4Byte it = 0;
@@ -118,18 +118,18 @@ wdi_ConstructScanReq(
u2Byte duration = (u2Byte)(SCAN_ACTIVE == scanType ? param->DwellTime.ActiveChannelDwellTime : param->DwellTime.PassiveChannelDwellTime);
FunctionIn(COMP_SCAN);
-
+
if(param->Optional.BandChannelList_IsPresent)
{
u4Byte itBand = 0;
u4Byte itChnl = 0;
-
+
for(itBand = 0; itBand < param->BandChannelList.ElementCount; itBand++)
{
for(itChnl = 0; itChnl < param->BandChannelList.pElements[itBand].ChannelList.ElementCount; itChnl++)
{
u1Byte chnl = (u1Byte)param->BandChannelList.pElements[itBand].ChannelList.pElements[itChnl];
-
+
CustomScan_AddScanChnl(req, chnl, 1, scanType, duration, 0, NULL);
}
}
@@ -138,7 +138,7 @@ wdi_ConstructScanReq(
{
RT_CHANNEL_DOMAIN domain = GetDefaultAdapter(pAdapter)->MgntInfo.ChannelPlan;
RT_CHANNEL_PLAN *plan = NULL;
-
+
RtActChannelList(pAdapter, RT_CHNL_LIST_ACTION_GET_CHANNEL_PLAN, &domain, &plan);
CustomScan_AddChnlPlanChnls(req, plan, scanType, duration, 0, NULL);
@@ -163,7 +163,7 @@ wdi_ConstructP2PSpecificChnlReq(
{
RT_SCAN_TYPE scanType = WDI_P2P_SCAN_TYPE_PASSIVE == param->DiscoverMode.ScanType ? SCAN_PASSIVE : SCAN_ACTIVE;
u2Byte duration = (u2Byte)(SCAN_ACTIVE == scanType ? param->DwellTime.ActiveChannelDwellTime : param->DwellTime.PassiveChannelDwellTime);
-
+
if(param->Optional.DiscoveryChannelSettings_IsPresent)
{
u4Byte itSettings = 0;
@@ -171,15 +171,15 @@ wdi_ConstructP2PSpecificChnlReq(
u4Byte itChnl = 0;
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("channel setting present\n"));
-
+
for(itSettings = 0; itSettings < param->DiscoveryChannelSettings.ElementCount; itSettings++)
{
WDI_P2P_DISCOVERY_CHANNEL_SETTINGS_CONTAINER *setting = param->DiscoveryChannelSettings.pElements + itSettings;
-
+
for(itBand = 0; itBand < setting->BandChannelList.ElementCount; itBand++)
{
WDI_BAND_CHANNEL_LIST_CONTAINER *band = setting->BandChannelList.pElements + itBand;
-
+
for(itChnl = 0; itChnl < band->ChannelList.ElementCount; itChnl++)
{
WDI_CHANNEL_NUMBER *chnl = band->ChannelList.pElements + itChnl;
@@ -206,7 +206,7 @@ wdi_ConstructP2PScanPhaseReq(
u2Byte duration = (u2Byte)(SCAN_ACTIVE == scanType ? param->DwellTime.ActiveChannelDwellTime : param->DwellTime.PassiveChannelDwellTime);
RT_CHANNEL_DOMAIN domain = GetDefaultAdapter(pAdapter)->MgntInfo.ChannelPlan;
RT_CHANNEL_PLAN *plan = NULL;
-
+
RtActChannelList(pAdapter, RT_CHNL_LIST_ACTION_GET_CHANNEL_PLAN, &domain, &plan);
CustomScan_AddChnlPlanChnls(req, plan, scanType, duration, MGN_6M, NULL);
@@ -254,7 +254,7 @@ wdi_Construct_FakeInvitationRsp(
OCTET_STRING osWFDIE, osProbeRspPkt;
FunctionIn(COMP_OID_SET);
-
+
// MAC Header
p2p_add_ActionFrameMacHdr(fbuf, info->DeviceAddress, dev->mac, info->DeviceAddress);
@@ -267,11 +267,11 @@ wdi_Construct_FakeInvitationRsp(
// WFD IE, from probe rsp
if(dev->rxFrames[P2P_FID_PROBE_RSP] && dev->rxFrames[P2P_FID_PROBE_RSP]->frameLen)
{
- FillOctetString(osProbeRspPkt,
- dev->rxFrames[P2P_FID_PROBE_RSP]->frame,
+ FillOctetString(osProbeRspPkt,
+ dev->rxFrames[P2P_FID_PROBE_RSP]->frame,
dev->rxFrames[P2P_FID_PROBE_RSP]->frameLen
);
-
+
osWFDIE = PacketGetElement(osProbeRspPkt, EID_Vendor, OUI_SUB_WIFI_DISPLAY, OUI_SUB_DONT_CARE);
if(osWFDIE.Length > 0)
@@ -284,7 +284,7 @@ wdi_Construct_FakeInvitationRsp(
FrameBuf_Dump(fbuf, 0, DBG_LOUD, __FUNCTION__);
FunctionOut(COMP_OID_SET);
-
+
return TRUE;
}
@@ -299,13 +299,13 @@ wdi_Construct_FakePdRsp(
{
P2P_INFO *info = GET_P2P_INFO(pAdapter);
OCTET_STRING osPdReq, osTmpIe;
-
+
FunctionIn(COMP_OID_SET);
if(dev->txFrames[P2P_FID_PD_REQ] && dev->txFrames[P2P_FID_PD_REQ]->frameLen)
{
- FillOctetString(osPdReq,
- dev->txFrames[P2P_FID_PD_REQ]->frame,
+ FillOctetString(osPdReq,
+ dev->txFrames[P2P_FID_PD_REQ]->frame,
dev->txFrames[P2P_FID_PD_REQ]->frameLen
);
}
@@ -314,7 +314,7 @@ wdi_Construct_FakePdRsp(
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("no corresp. pd req\n"));
FillOctetString(osPdReq, NULL, 0);
}
-
+
// MAC Header
p2p_add_ActionFrameMacHdr(fbuf, info->DeviceAddress, dev->mac, dev->mac);
@@ -323,14 +323,14 @@ wdi_Construct_FakePdRsp(
// WPS IE, getting from the original PD request
if(osPdReq.Length)
- {
+ {
osTmpIe = PacketGetElement(osPdReq, EID_Vendor, OUI_SUB_SimpleConfig, OUI_SUB_DONT_CARE);
if(osTmpIe.Length)
{
PacketMakeElement(&fbuf->os, EID_Vendor, osTmpIe);
}
}
-
+
// WFD IE
if(osPdReq.Length)
{
@@ -338,9 +338,9 @@ wdi_Construct_FakePdRsp(
if(osTmpIe.Length)
{
PacketMakeElement(&fbuf->os, EID_Vendor, osTmpIe);
- }
+ }
}
-
+
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("a fake pd rsp constructed\n"));
FrameBuf_Dump(fbuf, 0, DBG_LOUD, __FUNCTION__);
@@ -365,7 +365,7 @@ wdi_IndicateRxP2pRspActionFrame(
u1Byte *buf = NULL;
ULONG buflen = 0;
-
+
NDIS_STATUS_INDICATION *indic = NULL;
WDI_MESSAGE_HEADER *wdiHdr = NULL;
@@ -384,7 +384,7 @@ wdi_IndicateRxP2pRspActionFrame(
}
FrameBuf_Init(GEN_TEMP_BUFFER_SIZE, 0, (u1Byte *)pGenBuf->Buffer.Ptr, &fbuf);
-
+
if(WDI_P2P_ACTION_FRAME_PROVISION_DISCOVERY_RESPONSE == ctx->rspType)
ft = P2P_FID_PD_RSP;
else if(WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE == ctx->rspType)
@@ -407,10 +407,10 @@ wdi_IndicateRxP2pRspActionFrame(
{
dev = p2p_DevList_Get(&info->devList, ctx->da, P2P_DEV_TYPE_DEV);
}
-
+
if(NULL == dev)
{
- RT_TRACE_F(COMP_OID_SET, DBG_WARNING,
+ RT_TRACE_F(COMP_OID_SET, DBG_WARNING,
("dev not found: bGo: %u, mac: %02X:%02X:%02X:%02X:%02X:%02X\n",
ctx->bGo, ctx->da[0], ctx->da[1], ctx->da[2], ctx->da[3], ctx->da[4], ctx->da[5]
));
@@ -459,9 +459,9 @@ wdi_IndicateRxP2pRspActionFrame(
// gen TLV
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationP2pActionFrameReceived(
- &param,
- sizeof(*indic) + sizeof(*wdiHdr),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(*indic) + sizeof(*wdiHdr),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
{
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("gen tlv failed\n"));
@@ -471,7 +471,7 @@ wdi_IndicateRxP2pRspActionFrame(
// fill ptrs
indic = (NDIS_STATUS_INDICATION *)buf;
wdiHdr = (WDI_MESSAGE_HEADER *)(buf + sizeof(*indic));
-
+
// indication data
PlatformZeroMemory(indic, sizeof(*indic));
indic->Header.Type = NDIS_OBJECT_TYPE_STATUS_INDICATION;
@@ -492,7 +492,7 @@ wdi_IndicateRxP2pRspActionFrame(
// indicate
NdisMIndicateStatusEx(pAdapter->pNdisCommon->hNdisAdapter, indic);
-
+
// cleanup
FreeGenerated((UINT8 *)buf);
@@ -504,7 +504,7 @@ wdi_IndicateRxP2pRspActionFrame(
}
p2p_DevList_Unlock(&info->devList);
-
+
FunctionOut(COMP_OID_SET);
return;
@@ -534,12 +534,12 @@ wdi_SendP2pActionFrameStateCb(
}
if(OFF_CHNL_TX_STATE_COMPLETE == state)
- {
+ {
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("complete\n"));
bHandled = TRUE;
break;
}
-
+
if(OFF_CHNL_TX_STATE_FRAME_SENT == state)
{
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("frame sent\n"));
@@ -563,11 +563,11 @@ wdi_SendP2pReqActionFrameStateCb(
ADAPTER *pAdapter = ctx->pAdapter;
wdi_SendP2pActionFrameStateCb(req, state, pCtx);
-
+
if(OFF_CHNL_TX_STATE_COMPLETE == state)
{
P2P_INFO *info = GET_P2P_INFO(pAdapter);
-
+
WDI_CMD_P2pSendRequestActionFrameComplete(pAdapter, ctx);
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("restore StateBeforeScan to initialized\n"));
@@ -581,7 +581,7 @@ wdi_SendP2pReqActionFrameStateCb(
)
{
wdi_IndicateRxP2pRspActionFrame(pAdapter, ctx);
- }
+ }
}
else if(OFF_CHNL_TX_STATE_RETRY == state)
{
@@ -592,17 +592,17 @@ wdi_SendP2pReqActionFrameStateCb(
if(pAdapter->bInHctTest)
{
- // Not to skip probing under HCT test, because it wastes time
+ // Not to skip probing under HCT test, because it wastes time
// sending action frame to peer on its Listen Channel when peer
// is not doing extended listen
bSkip = FALSE;
}
-
+
if(bSkip)
{
WDI_SendAction_SkipProbeTemporarilly(req);
}
-
+
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("retry with token: %u, reqType: %u, skip probe: %u\n", newToken, ctx->reqType, bSkip));
bSkip = !bSkip;
@@ -626,13 +626,13 @@ wdi_SendP2pRspActionFrameStateCb(
RT_TRACE_F(COMP_P2P, DBG_LOUD, ("state = %d\n", state));
wdi_SendP2pActionFrameStateCb(req, state, pCtx);
-
+
if(OFF_CHNL_TX_STATE_COMPLETE == state)
{
WDI_CMD_P2pSendResponseActionFrameComplete(pAdapter, ctx);
- // restore Dialog Token in P2PInfo since we are sending
- // response action frame, self dialog token shall not be
+ // restore Dialog Token in P2PInfo since we are sending
+ // response action frame, self dialog token shall not be
// modified
RT_TRACE_F(COMP_P2P, DBG_LOUD, ("restore token from %u to %u\n", info->DialogToken, ctx->oldToken));
info->DialogToken = ctx->oldToken;
@@ -643,7 +643,7 @@ wdi_SendP2pRspActionFrameStateCb(
if(WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_CONFIRM == ctx->rspType)
{
wdi_IndicateRxP2pRspActionFrame(pAdapter, ctx);
- }
+ }
}
else if(OFF_CHNL_TX_STATE_RETRY == state)
{
@@ -664,7 +664,7 @@ wdi_SendActionFrameStateCb(
BOOLEAN bHandled = FALSE;
N63C_SEND_ACTION_CTX *ctx = (N63C_SEND_ACTION_CTX *)pCtx;
ADAPTER *pAdapter = ctx->pAdapter;
-
+
RT_TRACE(COMP_OID_SET, DBG_TRACE, ("wdi_SendActionFrameStateCb (0x%x)\n", state));
do
@@ -677,12 +677,12 @@ wdi_SendActionFrameStateCb(
}
if(OFF_CHNL_TX_STATE_COMPLETE == state)
- {
+ {
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("complete\n"));
bHandled = TRUE;
break;
}
-
+
if(OFF_CHNL_TX_STATE_FRAME_SENT == state)
{
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("frame sent\n"));
@@ -700,7 +700,7 @@ wdi_SendActionFrameStateCb(
{
WDI_SendAction_SkipProbeTemporarilly(req);
}
-
+
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("retry with token: %u, reqType: %u, skip probe: %u\n", newToken, ctx->reqType, bSkip));
bSkip = !bSkip;
@@ -728,7 +728,7 @@ wdi_SendReqActionFrameStateCb(
RT_TRACE(COMP_OID_SET, DBG_TRACE, ("wdi_SendReqActionFrameStateCb (0x%x)\n", state));
wdi_SendActionFrameStateCb(req, state, pCtx);
-
+
if(OFF_CHNL_TX_STATE_COMPLETE == state)
{
WDI_CMD_SendReqActionFrameComplete(pAdapter, ctx);
@@ -750,11 +750,11 @@ wdi_SendRspActionFrameStateCb(
{
WDI_SEND_ACTION_CTX *ctx = (WDI_SEND_ACTION_CTX *)pCtx;
ADAPTER *pAdapter = ctx->pAdapter;
-
+
RT_TRACE(COMP_OID_SET, DBG_TRACE, ("wdi_SendRspActionFrameStateCb (0x%x)\n", state));
wdi_SendActionFrameStateCb(req, state, pCtx);
-
+
if(OFF_CHNL_TX_STATE_COMPLETE == state)
{
WDI_CMD_SendRspActionFrameComplete(pAdapter, ctx);
@@ -780,8 +780,8 @@ Wdi_Task_Scan(
BOOLEAN bScanByRoam = FALSE;
PMGNT_INFO pMgntInfo =&(pAdapter->MgntInfo);
- RT_TRACE(COMP_OID_SET, DBG_LOUD,
- ("==> Wdi_Task_Scan(): Input InformationBuffer (%d)\n",
+ RT_TRACE(COMP_OID_SET, DBG_LOUD,
+ ("==> Wdi_Task_Scan(): Input InformationBuffer (%d)\n",
pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength));
ScanRequest.dot11BSSType = dot11_BSS_type_infrastructure;
@@ -793,21 +793,21 @@ Wdi_Task_Scan(
CopyMem(ScanRequest.dot11BSSID, param->BSSID.Address, ETHERNET_ADDRESS_LENGTH);
RT_PRINT_ADDR(COMP_SCAN, DBG_LOUD, ("ScanRequest \n"), ScanRequest.dot11BSSID);
- RT_TRACE(COMP_OID_SET, DBG_LOUD, ("WIFI_TLV_SSID\n"));
+ RT_TRACE(COMP_OID_SET, DBG_LOUD, ("WIFI_TLV_SSID\n"));
MgntClearSsidsToScan(pAdapter);
-
+
for(itSsidl = 0; itSsidl < param->SSIDList.ElementCount; itSsidl++)
{
WdiSsid = param->SSIDList.pElements[itSsidl];
-
+
RT_PRINT_STR(COMP_MLME, DBG_LOUD, "===> Wdi_Task_Scan(): ", WdiSsid.pElements, WdiSsid.ElementCount);
-
+
Ssid.Octet = WdiSsid.pElements;
- Ssid.Length = (u2Byte)WdiSsid.ElementCount;
-
+ Ssid.Length = (u2Byte)WdiSsid.ElementCount;
+
RT_PRINT_STR(COMP_MLME, DBG_LOUD, "===> Wdi_Task_Scan(): SSid ", Ssid.Octet, Ssid.Length);
-
+
MgntAddSsidsToScan(pAdapter, Ssid);
}
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Scan Type\n"));
@@ -827,11 +827,11 @@ Wdi_Task_Scan(
if(param->Optional.VendorIEs_IsPresent)
{
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("WIFI_TLV_VENDORIE\n"));
-
- MgntActSet_AdditionalProbeReqIE(pAdapter,
+
+ MgntActSet_AdditionalProbeReqIE(pAdapter,
(u1Byte *)param->VendorIEs.pElements,
(u4Byte)param->VendorIEs.ElementCount);
- }
+ }
// Sinda, 20150512
// Skip all scan triggered by Roam.
@@ -857,7 +857,7 @@ Wdi_Task_Scan(
{
if(param->Optional.VendorIEs_IsPresent)
{
- MgntActSet_AdditionalProbeReqIE(pAdapter,
+ MgntActSet_AdditionalProbeReqIE(pAdapter,
(u1Byte *)param->VendorIEs.pElements,
(u4Byte)param->VendorIEs.ElementCount);
}
@@ -865,11 +865,11 @@ Wdi_Task_Scan(
if(NULL != (req = CustomScan_AllocReq(GET_CUSTOM_SCAN_INFO(pAdapter), NULL, NULL)))
{
wdi_ConstructScanReq(pAdapter, param, req);
-
+
CustomScan_SetTimeBound(req, param->DwellTime.MaximumScanTime);
CustomScan_SetupCbCtx(req, wdi_ScanCb, pAdapter);
CustomScan_SetRepeatCount(req, param->ScanModeParameters.ScanRepeatCount);
-
+
CustomScan_IssueReq(GET_CUSTOM_SCAN_INFO(pAdapter), req, CUSTOM_SCAN_SRC_TYPE_SYS, "sys");
}
}
@@ -878,7 +878,7 @@ Wdi_Task_Scan(
WDI_IndicateScanComplete(pAdapter, RT_STATUS_FAILURE);
}
}
-
+
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<== Wdi_Task_Scan()\n"));
return status;
}
@@ -897,15 +897,15 @@ Wdi_Task_Connect(
WDI_TASK_CONNECT_PARAMETERS *Params = pOidHandle->tlvParser.parsedTlv.paramConnect;
PWDI_CONNECT_BSS_ENTRY_CONTAINER connectBssEntry = NULL;
PMGNT_INFO pMgntInfo=&pAdapter->MgntInfo;
-
- PWDI_MESSAGE_HEADER pWdiHeader
+
+ PWDI_MESSAGE_HEADER pWdiHeader
= (PWDI_MESSAGE_HEADER)pOidHandle->pInputBuffer;
- //Save PMKID
+ //Save PMKID
u4Byte ulIndex, i, j;
BOOLEAN blInserted;
u1Byte bssidcount=0;
- int NumPreferredBSSID = Params->PreferredBSSEntryList.ElementCount;
+ int NumPreferredBSSID = Params->PreferredBSSEntryList.ElementCount;
RT_TRACE(COMP_MLME, DBG_LOUD, ("==> Wdi_Task_Connect()\n"));
@@ -918,26 +918,26 @@ Wdi_Task_Connect(
N6_ASSIGN_OBJECT_HEADER(
SsidList.Header,
- NDIS_OBJECT_TYPE_DEFAULT,
- DOT11_SSID_LIST_REVISION_1,
+ NDIS_OBJECT_TYPE_DEFAULT,
+ DOT11_SSID_LIST_REVISION_1,
sizeof(DOT11_SSID_LIST)
);
- // Clear all entries
+ // Clear all entries
for( ulIndex=0; ulIndex<NUM_PMKID_CACHE; ulIndex++ )
{
pSecInfo->PMKIDList[ulIndex].bUsed = FALSE;
}
pSecInfo->PMKIDCount = 0;
-
- FtResetEntryList(pAdapter);
+
+ FtResetEntryList(pAdapter);
// TODO: Choose corresponding adapter before assigning parameters
for(bssidcount=0;bssidcount<NumPreferredBSSID;bssidcount++)
{
connectBssEntry = &Params->PreferredBSSEntryList.pElements[bssidcount];
if( connectBssEntry->Optional.PMKID_IsPresent == TRUE )
- {
+ {
// 2. Insert or cover with new PMKID.
blInserted = FALSE;
for(j=0 ; j<NUM_PMKID_CACHE; j++)
@@ -969,9 +969,9 @@ Wdi_Task_Connect(
break;
}
}
- }
+ }
}
-
+
if(connectBssEntry->Optional.FTInitialAssocParameters_IsPresent)
{
FtUpdateEntryInfo(pAdapter, FT_ENTRY_ACTION_UPDATE_MDE, connectBssEntry->BSSID.Address,
@@ -986,12 +986,12 @@ Wdi_Task_Connect(
connectBssEntry->FTReAssocParameters.MDE.pElements, connectBssEntry->FTReAssocParameters.MDE.ElementCount);
RT_PRINT_DATA(COMP_MLME, DBG_LOUD, "FTReAssocParameters MDE:\n",
connectBssEntry->FTReAssocParameters.MDE.pElements, connectBssEntry->FTReAssocParameters.MDE.ElementCount);
-
+
FtUpdateEntryInfo(pAdapter, FT_ENTRY_ACTION_UPDATE_FTE, connectBssEntry->BSSID.Address,
connectBssEntry->FTReAssocParameters.FTE.pElements, connectBssEntry->FTReAssocParameters.FTE.ElementCount);
RT_PRINT_DATA(COMP_MLME, DBG_LOUD, "FTReAssocParameters FTE:\n",
connectBssEntry->FTReAssocParameters.FTE.pElements, connectBssEntry->FTReAssocParameters.FTE.ElementCount);
-
+
FtUpdateEntryInfo(pAdapter, FT_ENTRY_ACTION_UPDATE_PMKR0_NAME, connectBssEntry->BSSID.Address,
connectBssEntry->FTReAssocParameters.PMKR0Name.pmkname.Name, sizeof(WDI_TYPE_PMK_NAME));
RT_PRINT_DATA(COMP_MLME, DBG_LOUD, "FTReAssocParameters PMKR0:\n",
@@ -1019,14 +1019,14 @@ Wdi_Task_Connect(
// TODO: HiddenNetwork / MFPEnabled / HostFIPSModeEnabled
pMgntInfo->bRoamRequest = Params->ConnectParameters.ConnectionSettings.RoamRequest;
RT_TRACE( COMP_MLME, DBG_LOUD, ("bRoamRequest %d\n", pMgntInfo->bRoamRequest) );
-
+
pMgntInfo->SafeModeEnabled = Params->ConnectParameters.ConnectionSettings.HostFIPSModeEnabled;
-
+
if(pMgntInfo->SafeModeEnabled && !pMgntInfo->pHTInfo->bEnableHT)
- pMgntInfo->pStaQos->QosCapability = QOS_DISABLE;
+ pMgntInfo->pStaQos->QosCapability = QOS_DISABLE;
else
- pMgntInfo->pStaQos->QosCapability = pMgntInfo->pStaQos->QosCapabilityBackup;
-
+ pMgntInfo->pStaQos->QosCapability = pMgntInfo->pStaQos->QosCapabilityBackup;
+
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Wdi_task_connect(): bExcludeUnencrypted %d HostFIPSModeEnabled %d QosCapability 0x%x QosCapabilityBackup 0x%x enableHT %d\n", pMgntInfo->bExcludeUnencrypted, pMgntInfo->SafeModeEnabled, pMgntInfo->pStaQos->QosCapability, pMgntInfo->pStaQos->QosCapabilityBackup, pMgntInfo->pHTInfo->bEnableHT));
//3 DesiredSSIDList
@@ -1040,9 +1040,9 @@ Wdi_Task_Connect(
RT_PRINT_STR(COMP_MLME, DBG_LOUD, ("Desired SSID \n"), SsidList.SSIDs[i].ucSSID, SsidList.SSIDs[i].uSSIDLength);
}
pNdisCommon->dot11DesiredSSIDList = SsidList;
-
+
//3 Authentication Algorithm
- N6CSet_DOT11_AUTHENTICATION_ALOGORITHM(pAdapter, Params->ConnectParameters.AuthenticationAlgorithms.pElements[0]);
+ N6CSet_DOT11_AUTHENTICATION_ALOGORITHM(pAdapter, Params->ConnectParameters.AuthenticationAlgorithms.pElements[0]);
RT_TRACE_F(COMP_SEC, DBG_LOUD, ("AuthenticationAlgorithms count = %d\n", Params->ConnectParameters.AuthenticationAlgorithms.ElementCount));
//3 Unicast Cipher Algorithm
@@ -1052,20 +1052,20 @@ Wdi_Task_Connect(
//3 Multicast Cipher Algorithm
N6CSet_DOT11_MULTICAST_CIPHER_ALGORITHM(pAdapter, Params->ConnectParameters.MulticastCipherAlgorithms.pElements[0]);
RT_TRACE_F(COMP_SEC, DBG_LOUD, ("MulticastCipherAlgorithms count = %d\n", Params->ConnectParameters.MulticastCipherAlgorithms.ElementCount));
-
-
+
+
//3 Additional Association Request IEs
if(Params->ConnectParameters.Optional.AssociationRequestVendorIE_IsPresent)
{
if(Params->ConnectParameters.AssociationRequestVendorIE.ElementCount > 0)
{
RT_TRACE(COMP_MLME, DBG_LOUD, ("Wdi_Task_Connect(): set association request additional IE\n"));
- MgntActSet_AdditionalAssocReqIE(pAdapter,
- Params->ConnectParameters.AssociationRequestVendorIE.pElements,
+ MgntActSet_AdditionalAssocReqIE(pAdapter,
+ Params->ConnectParameters.AssociationRequestVendorIE.pElements,
Params->ConnectParameters.AssociationRequestVendorIE.ElementCount
);
-
- RT_PRINT_DATA(COMP_MLME, DBG_TRACE, ("Wdi_Task_Connect(): AssociationRequestVendorIE\n"),
+
+ RT_PRINT_DATA(COMP_MLME, DBG_TRACE, ("Wdi_Task_Connect(): AssociationRequestVendorIE\n"),
Params->ConnectParameters.AssociationRequestVendorIE.pElements,
Params->ConnectParameters.AssociationRequestVendorIE.ElementCount);
}
@@ -1084,11 +1084,11 @@ Wdi_Task_Connect(
{
RT_TRACE(COMP_MLME, DBG_LOUD, ("Wdi_Task_Connect(): set disallowed BSSIDs\n"));
MgntActSet_ExcludedMacAddressList(
- pAdapter,
- (pu1Byte)Params->ConnectParameters.DisallowedBSSIDs.pElements,
+ pAdapter,
+ (pu1Byte)Params->ConnectParameters.DisallowedBSSIDs.pElements,
Params->ConnectParameters.DisallowedBSSIDs.ElementCount
);
-
+
for(; i < Params->ConnectParameters.DisallowedBSSIDs.ElementCount; i++)
{
RT_PRINT_ADDR(COMP_MLME, DBG_TRACE, ("Wdi_Task_Connect(): disallowed BSSID:"),
@@ -1120,7 +1120,7 @@ Wdi_Task_Connect(
PTLV_WDI_STRUCT pTlvData = NULL;
ULONG BytesProcessed = 0;
ULONG Prefix = sizeof(WDI_MESSAGE_HEADER);
-
+
pTlvData = (PTLV_WDI_STRUCT)((pu1Byte)pOidHandle->pInputBuffer + sizeof(WDI_MESSAGE_HEADER));
// WDI_CONNECT_BSS_ENTRY
@@ -1130,20 +1130,20 @@ Wdi_Task_Connect(
DOT11_SSID_LIST SsidList;
u1Byte NumSsid = 0;
PRT_SECURITY_T pSecInfo = &(pAdapter->MgntInfo.SecurityInfo);
-
+
InputBufferLength = pTlvData->Length;
N6_ASSIGN_OBJECT_HEADER(
SsidList.Header,
- NDIS_OBJECT_TYPE_DEFAULT,
- DOT11_SSID_LIST_REVISION_1,
+ NDIS_OBJECT_TYPE_DEFAULT,
+ DOT11_SSID_LIST_REVISION_1,
sizeof(DOT11_SSID_LIST)
);
SsidList.uNumOfEntries = NumSsid;
pTlvData = (PTLV_WDI_STRUCT)((pu1Byte)pTlvData->Value);
-
+
while(BytesProcessed < InputBufferLength)
{
// Parse Type
@@ -1154,7 +1154,7 @@ Wdi_Task_Connect(
RT_TRACE(COMP_MLME, DBG_LOUD, ("unknown TLV 0x%x\n", pTlvData->Type));
}
break;
-
+
case WDI_TLV_CONNECTION_SETTINGS:
{
u1Byte RoamRequest = 0;
@@ -1168,7 +1168,7 @@ Wdi_Task_Connect(
ExcludeUnencrypted = *(pu1Byte)(pTlvData->Value + 2);
MFPEnabled = *(pu1Byte)(pTlvData->Value + 3);
HostFIPSModeEnabled = *(pu1Byte)(pTlvData->Value + 4);
-
+
RT_TRACE(COMP_MLME, DBG_LOUD, ("WDI_TLV_CONNECTION_SETTINGS\n"));
RT_TRACE(COMP_MLME, DBG_LOUD, ("RoamRequest = %d, HiddenNetwork = %d, ExcludeUnencrypted = %d, MFPEnabled = %d, HostFIPSModeEnabled = %d\n",
RoamRequest, HiddenNetwork, ExcludeUnencrypted, MFPEnabled, HostFIPSModeEnabled));
@@ -1208,7 +1208,7 @@ Wdi_Task_Connect(
case WDI_TLV_MULTICAST_CIPHER_ALGO_LIST:
{
u4Byte AlgorithmId = (*((pu4Byte)(pTlvData->Value)));
-
+
RT_TRACE(COMP_MLME, DBG_LOUD, ("WDI_TLV_MULTICAST_CIPHER_ALGO_LIST\n"));
switch( AlgorithmId )
@@ -1222,7 +1222,7 @@ Wdi_Task_Connect(
pSecInfo->GroupEncAlgorithm = RT_ENC_ALG_WEP40;
RT_TRACE( COMP_SEC, DBG_LOUD, ("Wdi_Task_Connect(): DOT11_CIPHER_ALGO_WEP\n") );
break;
-
+
case WDI_CIPHER_ALGO_WEP40:
pSecInfo->GroupEncAlgorithm = RT_ENC_ALG_WEP40;
RT_TRACE( COMP_SEC, DBG_LOUD, ("Wdi_Task_Connect(): DOT11_CIPHER_ALGO_WEP40\n") );
@@ -1239,8 +1239,8 @@ Wdi_Task_Connect(
break;
case DOT11_CIPHER_ALGO_WAPI_SMS4: //For WAPI IHV service support add by ylb 20111114
- pSecInfo->GroupEncAlgorithm = RT_ENC_ALG_SMS4;
- RT_TRACE( COMP_SEC, DBG_LOUD, ("Wdi_Task_Connect(): DOT11_CIPHER_ALGO_WAPI_SMS4\n") );
+ pSecInfo->GroupEncAlgorithm = RT_ENC_ALG_SMS4;
+ RT_TRACE( COMP_SEC, DBG_LOUD, ("Wdi_Task_Connect(): DOT11_CIPHER_ALGO_WAPI_SMS4\n") );
break;
case WDI_CIPHER_ALGO_WEP104:
pSecInfo->GroupEncAlgorithm = RT_ENC_ALG_WEP104;
@@ -1263,7 +1263,7 @@ Wdi_Task_Connect(
case WDI_TLV_UNICAST_CIPHER_ALGO_LIST:
{
u4Byte AlgorithmId = (*((pu4Byte)(pTlvData->Value)));
-
+
RT_TRACE(COMP_MLME, DBG_LOUD, ("WDI_TLV_UNICAST_CIPHER_ALGO_LIST\n"));
N6CSet_DOT11_UNICAST_CIPHER_ALGORITHM(pAdapter, (DOT11_CIPHER_ALGORITHM)AlgorithmId);
@@ -1293,7 +1293,7 @@ Wdi_Task_Connect(
RT_TRACE(COMP_MLME, DBG_LOUD, ("WDI_TLV_ALLOWED_BSSIDS_LIST\n"));
}
break;
-
+
}
// Parse Length
@@ -1302,7 +1302,7 @@ Wdi_Task_Connect(
// Parse Content
BytesProcessed += (4 + pTlvData->Length);
-
+
pTlvData = (PTLV_WDI_STRUCT)((pu1Byte)pOidHandle->pInputBuffer + Prefix + 4 + BytesProcessed);
}
@@ -1322,12 +1322,12 @@ Wdi_Task_Connect(
{
pMgntInfo->Ssid.Octet = pNdisCommon->dot11DesiredSSIDList.SSIDs[0].ucSSID;
pMgntInfo->Ssid.Length = (u2Byte)pNdisCommon->dot11DesiredSSIDList.SSIDs[0].uSSIDLength;
-
+
pMgntInfo->bDisconnectRequest = FALSE;
RT_TRACE(COMP_MLME, DBG_LOUD, ("This is roam request, go to roam flow\n"));
MgntLinkStatusSetRoamingState(pAdapter, 0, RT_ROAMING_BY_DEAUTH, ROAMINGSTATE_SCANNING);
DrvIFIndicateRoamingStart(pAdapter);
-
+
if( MgntRoamRetry(pAdapter, FALSE) == FALSE )
ndisStatus = NDIS_STATUS_FAILURE;
else
@@ -1349,7 +1349,7 @@ Wdi_Task_Disconnect(
WDI_TASK_DISCONNECT_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramDisconnect;
NDIS_OID_REQUEST *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
do
@@ -1358,7 +1358,7 @@ Wdi_Task_Disconnect(
{
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("N6CSet_DOT11_DISCONNECT_REQUEST returns: 0x%08X\n", status));
break;
- }
+ }
}while(FALSE);
// M4 indication is not required since bWaitComplete in RT_SUPPORT_TASKs is FALSE
@@ -1389,12 +1389,12 @@ Wdi_Task_CreatePort(
NDIS_OID_REQUEST *req = NULL;
WDI_TASK_CREATE_PORT_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramCreatePort;
-
+
FunctionIn(COMP_OID_SET);
do
{
- RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("NdisPortNumber:%d OpModeMask: 0x%08X\n",
+ RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("NdisPortNumber:%d OpModeMask: 0x%08X\n",
param->CreatePortParameters.NdisPortNumber,
param->CreatePortParameters.OpModeMask));
@@ -1412,19 +1412,19 @@ Wdi_Task_CreatePort(
) // TODO: OpModeMask is a bitmap with combination of possible op modes
{
status = N62C_OID_DOT11_CREATE_MAC(pAdapter, req);
-
+
if(NDIS_STATUS_SUCCESS != status && NDIS_STATUS_PENDING != status)
{
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("N62C_OID_DOT11_CREATE_MAC returns error: 0x%08X\n", status));
Wdi_Xlat_FreeOid(req);
}
-
+
break;
}
else
{// cases which we don't need to create mac
DOT11_MAC_INFO *macInfo = req->DATA.METHOD_INFORMATION.InformationBuffer;
-
+
status = NDIS_STATUS_SUCCESS;
macInfo->uNdisPortNumber = 0;
@@ -1436,7 +1436,7 @@ Wdi_Task_CreatePort(
}
}while(FALSE);
-
+
FunctionOut(COMP_OID_SET);
return status;
}
@@ -1452,9 +1452,9 @@ Wdi_Task_DeletePort(
NDIS_OID_REQUEST *req = NULL;
PADAPTER pTargetAdapter = NULL;
WDI_TASK_DELETE_PORT_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramDeletePort;
-
+
FunctionIn(COMP_OID_SET);
-
+
do
{
if(NULL == (req = Wdi_Xlat_AllocDeleteMacOid(pOidHandle, param)))
@@ -1462,36 +1462,36 @@ Wdi_Task_DeletePort(
status = NDIS_STATUS_RESOURCES;
break;
}
-
+
// delete mac
if(0 != param->DeletePortParameters.PortNumber)
{
//Delete group peer.
WDI_DeleteGroupPeer(pAdapter, param->DeletePortParameters.PortNumber);
-
+
status = N62C_OID_DOT11_DELETE_MAC(pAdapter, req);
-
+
if(NDIS_STATUS_SUCCESS != status && NDIS_STATUS_PENDING != status)
{
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("N62C_OID_DOT11_DELETE_MAC returns error: 0x%08X\n", status));
Wdi_Xlat_FreeOid(req);
}
-
+
break;
}
else
{// cases which we don't need to delete mac
status = NDIS_STATUS_SUCCESS;
-
+
//Delete group peer.
WDI_DeleteGroupPeer(pAdapter, param->DeletePortParameters.PortNumber);
-
+
WDI_CMD_DeletePortComplete(pAdapter, req, status);
break;
}
-
+
}while(FALSE);
-
+
FunctionOut(COMP_OID_SET);
return status;
}
@@ -1513,16 +1513,16 @@ Wdi_Task_SetApCipherKeyMappingKey(
if(!pEntry)
return NDIS_STATUS_INVALID_DATA;
-
+
CopyMem(pEntry->perSTAKeyInfo.PTK, pKeyMaterial, keyLen); // Added by Annie, 2005-07-12.
-
+
if(WDI_CIPHER_ALGO_TKIP == cipherAlgo)
{
pEntry->perSTAKeyInfo.TempEncKey = pEntry->perSTAKeyInfo.PTK+TKIP_ENC_KEY_POS;
- pEntry->perSTAKeyInfo.TxMICKey = pEntry->perSTAKeyInfo.PTK+(TKIP_MIC_KEY_POS);
+ pEntry->perSTAKeyInfo.TxMICKey = pEntry->perSTAKeyInfo.PTK+(TKIP_MIC_KEY_POS);
pEntry->perSTAKeyInfo.RxMICKey = pEntry->perSTAKeyInfo.PTK+(TKIP_MIC_KEY_POS+TKIP_MIC_KEY_LEN);
- //Add for AP mode HW enc,by CCW
+ //Add for AP mode HW enc,by CCW
ucIndex = AP_FindFreeEntry(pAdapter , pEntry->MacAddr);
if(ucIndex == TOTAL_CAM_ENTRY)
{
@@ -1531,12 +1531,12 @@ Wdi_Task_SetApCipherKeyMappingKey(
}
//set key
- AP_Setkey(pAdapter ,
+ AP_Setkey(pAdapter ,
pEntry->perSTAKeyInfo.pWLanSTA->MacAddr,
- ucIndex, // Entey index
+ ucIndex, // Entey index
CAM_TKIP,
- 0, // Parise key
- pEntry->perSTAKeyInfo.TempEncKey);
+ 0, // Parise key
+ pEntry->perSTAKeyInfo.TempEncKey);
pEntry->keyindex = ucIndex;
}
@@ -1544,28 +1544,28 @@ Wdi_Task_SetApCipherKeyMappingKey(
{ // AES mode AP-WPA AES,CCW
AESCCMP_BLOCK blockKey;
AUTH_PKEY_MGNT_TAG *pKeyMgnt = &pEntry->perSTAKeyInfo;
-
+
RT_TRACE(COMP_SEC, DBG_LOUD, ("===>CCMP Set Station Key.\n"));
RT_PRINT_ADDR(COMP_SEC, DBG_LOUD, "===> Peer Address : ", addr);
-
- //Add for AP mode HW enc,by CCW
+
+ //Add for AP mode HW enc,by CCW
ucIndex = AP_FindFreeEntry(pAdapter, pEntry->MacAddr);
if(ucIndex == TOTAL_CAM_ENTRY)
{
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("[Warning]: Cam Entry is FULL!!!\n"));
return NDIS_STATUS_INVALID_DATA;
}
-
- //Set Key
+
+ //Set Key
PlatformMoveMemory(blockKey.x , pEntry->perSTAKeyInfo.PTK, 16);
AES_SetKey(blockKey.x, AESCCMP_BLK_SIZE * 8, (u4Byte *)pEntry->perSTAKeyInfo.AESKeyBuf);
//set hw key
- AP_Setkey(pAdapter ,
+ AP_Setkey(pAdapter ,
pEntry->perSTAKeyInfo.pWLanSTA->MacAddr,
- ucIndex, // Entey index
+ ucIndex, // Entey index
CAM_AES,
- 0, // Parise key
- pEntry->perSTAKeyInfo.PTK);
+ 0, // Parise key
+ pEntry->perSTAKeyInfo.PTK);
pEntry->keyindex = ucIndex;
}
@@ -1599,7 +1599,7 @@ Wdi_Task_SetApCipherDefaultKey(
else if(WDI_CIPHER_ALGO_CCMP == cipherAlgo)
{
AESCCMP_BLOCK blockKey;
-
+
PlatformMoveMemory(blockKey.x, pGlInfo->GTK, 16);
pMgntInfo->SecurityInfo.GroupTransmitKeyIdx = (u1Byte)keyId;
AES_SetKey(blockKey.x, AESCCMP_BLK_SIZE * 8, (u4Byte *)pGlInfo->AESGTK);
@@ -1618,7 +1618,7 @@ Wdi_Task_Set_Radio_State(
PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon;
ULONG InputBufferLength = pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength;
WDI_SET_RADIO_STATE_PARAMETERS *Params = pOidHandle->tlvParser.parsedTlv.paramSetRadioState;
-
+
RT_TRACE(COMP_MLME, DBG_LOUD, ("==> Wdi_Task_Set_Radio_State()\n"));
if( Params->SoftwareRadioState == TRUE )
@@ -1657,8 +1657,8 @@ Wdi_Task_Roam(
u4Byte ulIndex, i, j;
BOOLEAN blInserted;
u1Byte bssidcount=0;
- int NumPreferredBSSID = Params->PreferredBSSEntryList.ElementCount;
-
+ int NumPreferredBSSID = Params->PreferredBSSEntryList.ElementCount;
+
RT_TRACE(COMP_MLME, DBG_LOUD, ("==> Wdi_Task_Roam()\n"));
@@ -1671,28 +1671,28 @@ Wdi_Task_Roam(
N6_ASSIGN_OBJECT_HEADER(
SsidList.Header,
- NDIS_OBJECT_TYPE_DEFAULT,
- DOT11_SSID_LIST_REVISION_1,
+ NDIS_OBJECT_TYPE_DEFAULT,
+ DOT11_SSID_LIST_REVISION_1,
sizeof(DOT11_SSID_LIST)
);
// TODO: Choose corresponding adapter before assigning parameters
-
- // Clear all entries
+
+ // Clear all entries
for( ulIndex=0; ulIndex<NUM_PMKID_CACHE; ulIndex++ )
{
pSecInfo->PMKIDList[ulIndex].bUsed = FALSE;
}
pSecInfo->PMKIDCount = 0;
-
- FtResetEntryList(pAdapter);
+
+ FtResetEntryList(pAdapter);
// TODO: Choose corresponding adapter before assigning parameters
for(bssidcount=0;bssidcount<NumPreferredBSSID;bssidcount++)
{
connectBssEntry = &Params->PreferredBSSEntryList.pElements[bssidcount];
if( connectBssEntry->Optional.PMKID_IsPresent == TRUE )
- {
+ {
// 2. Insert or cover with new PMKID.
blInserted = FALSE;
for(j=0 ; j<NUM_PMKID_CACHE; j++)
@@ -1724,9 +1724,9 @@ Wdi_Task_Roam(
break;
}
}
- }
+ }
}
-
+
if(connectBssEntry->Optional.FTInitialAssocParameters_IsPresent)
{
FtUpdateEntryInfo(pAdapter, FT_ENTRY_ACTION_UPDATE_MDE, connectBssEntry->BSSID.Address,
@@ -1741,12 +1741,12 @@ Wdi_Task_Roam(
connectBssEntry->FTReAssocParameters.MDE.pElements, connectBssEntry->FTReAssocParameters.MDE.ElementCount);
RT_PRINT_DATA(COMP_MLME, DBG_LOUD, "FTReAssocParameters MDE:\n",
connectBssEntry->FTReAssocParameters.MDE.pElements, connectBssEntry->FTReAssocParameters.MDE.ElementCount);
-
+
FtUpdateEntryInfo(pAdapter, FT_ENTRY_ACTION_UPDATE_FTE, connectBssEntry->BSSID.Address,
connectBssEntry->FTReAssocParameters.FTE.pElements, connectBssEntry->FTReAssocParameters.FTE.ElementCount);
RT_PRINT_DATA(COMP_MLME, DBG_LOUD, "FTReAssocParameters FTE:\n",
connectBssEntry->FTReAssocParameters.FTE.pElements, connectBssEntry->FTReAssocParameters.FTE.ElementCount);
-
+
FtUpdateEntryInfo(pAdapter, FT_ENTRY_ACTION_UPDATE_PMKR0_NAME, connectBssEntry->BSSID.Address,
connectBssEntry->FTReAssocParameters.PMKR0Name.pmkname.Name, sizeof(WDI_TYPE_PMK_NAME));
RT_PRINT_DATA(COMP_MLME, DBG_LOUD, "FTReAssocParameters PMKR0:\n",
@@ -1768,26 +1768,26 @@ Wdi_Task_Roam(
RT_PRINT_DATA( COMP_MLME, DBG_LOUD, "PMKID: ", pSecInfo->PMKIDList[ulIndex].PMKID, connectBssEntry->PMKID.ElementCount);
}
}
-
+
pAdapter->MgntInfo.bExcludeUnencrypted = Params->ConnectParameters.ConnectionSettings.ExcludeUnencrypted;
// TODO: HiddenNetwork / MFPEnabled / HostFIPSModeEnabled
pMgntInfo->SafeModeEnabled = Params->ConnectParameters.ConnectionSettings.HostFIPSModeEnabled;
-
+
if(pMgntInfo->SafeModeEnabled && !pMgntInfo->pHTInfo->bEnableHT)
- pMgntInfo->pStaQos->QosCapability = QOS_DISABLE;
+ pMgntInfo->pStaQos->QosCapability = QOS_DISABLE;
else
- pMgntInfo->pStaQos->QosCapability = pMgntInfo->pStaQos->QosCapabilityBackup;
-
+ pMgntInfo->pStaQos->QosCapability = pMgntInfo->pStaQos->QosCapabilityBackup;
+
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Wdi_task_roam(): bExcludeUnencrypted %d HostFIPSModeEnabled %d QosCapability 0x%x\n", pMgntInfo->bExcludeUnencrypted, pMgntInfo->SafeModeEnabled, pMgntInfo->pStaQos->QosCapability));
-
+
//3 RoamNeededReason
if( Params->ConnectParameters.ConnectionSettings.RoamRequest == TRUE )
{
AssocStatus = Params->ConnectParameters.ConnectionSettings.RoamNeededReason;
RT_TRACE_F(COMP_MLME, DBG_LOUD, ("RoamNeededReason %d\n", AssocStatus));
}
-
+
//3 DesiredSSIDList
SsidList.uNumOfEntries = Params->ConnectParameters.SSIDList.ElementCount;
@@ -1809,19 +1809,19 @@ Wdi_Task_Roam(
//3 Multicast Cipher Algorithm
N6CSet_DOT11_MULTICAST_CIPHER_ALGORITHM(pAdapter, Params->ConnectParameters.MulticastCipherAlgorithms.pElements[0]);
-
+
//3 Additional Association Request IEs
if(Params->ConnectParameters.Optional.AssociationRequestVendorIE_IsPresent)
{
if(Params->ConnectParameters.AssociationRequestVendorIE.ElementCount > 0)
{
RT_TRACE(COMP_MLME, DBG_LOUD, ("Wdi_Task_Roam(): set association request additional IE\n"));
- MgntActSet_AdditionalAssocReqIE(pAdapter,
- Params->ConnectParameters.AssociationRequestVendorIE.pElements,
+ MgntActSet_AdditionalAssocReqIE(pAdapter,
+ Params->ConnectParameters.AssociationRequestVendorIE.pElements,
Params->ConnectParameters.AssociationRequestVendorIE.ElementCount
);
-
- RT_PRINT_DATA(COMP_MLME, DBG_TRACE, ("Wdi_Task_Roam(): AssociationRequestVendorIE\n"),
+
+ RT_PRINT_DATA(COMP_MLME, DBG_TRACE, ("Wdi_Task_Roam(): AssociationRequestVendorIE\n"),
Params->ConnectParameters.AssociationRequestVendorIE.pElements,
Params->ConnectParameters.AssociationRequestVendorIE.ElementCount);
}
@@ -1840,11 +1840,11 @@ Wdi_Task_Roam(
{
RT_TRACE(COMP_MLME, DBG_LOUD, ("Wdi_Task_Roam(): set disallowed BSSIDs\n"));
MgntActSet_ExcludedMacAddressList(
- pAdapter,
- (pu1Byte)Params->ConnectParameters.DisallowedBSSIDs.pElements,
+ pAdapter,
+ (pu1Byte)Params->ConnectParameters.DisallowedBSSIDs.pElements,
Params->ConnectParameters.DisallowedBSSIDs.ElementCount
);
-
+
for(; i < Params->ConnectParameters.DisallowedBSSIDs.ElementCount; i++)
{
RT_PRINT_ADDR(COMP_MLME, DBG_TRACE, ("Wdi_Task_Roam(): disallowed BSSID:"),
@@ -1871,7 +1871,7 @@ Wdi_Task_Roam(
}
}
}
-
+
if( pMgntInfo->bMediaConnect || pMgntInfo->bIbssStarter)
{
if( pMgntInfo->mIbss ){
@@ -1885,7 +1885,7 @@ Wdi_Task_Roam(
MgntDisconnectAP(pAdapter, disas_lv_ss);
}
}
-
+
RT_TRACE(COMP_MLME, DBG_LOUD, ("pMgntInfo->PrepareRoamState %d\n", pMgntInfo->PrepareRoamState));
switch(pMgntInfo->PrepareRoamState)
{
@@ -1909,13 +1909,13 @@ Wdi_Task_Roam(
RT_TRACE(COMP_MLME, DBG_WARNING, ("No matched roaming state\n"));
break;
}
-
+
pMgntInfo->bPrepareRoaming = FALSE;
pMgntInfo->PrepareRoamState = RT_PREPARE_ROAM_NONE;
pMgntInfo->PrepareRoamingCount = 0;
-
+
DrvIFIndicateRoamingStart(pAdapter);
-
+
if( MgntRoamRetry(pAdapter, FALSE) == FALSE )
ndisStatus = NDIS_STATUS_FAILURE;
else
@@ -1937,7 +1937,7 @@ WdiSimpleSetProperty(
PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo);
PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon;
- PWDI_MESSAGE_HEADER pWdiHeader
+ PWDI_MESSAGE_HEADER pWdiHeader
= (PWDI_MESSAGE_HEADER)pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
// We complete the OID. Need to populate some fields
@@ -1955,11 +1955,11 @@ WdiSimpleSetProperty(
return ndisStatus;
}
-//
+//
// Translate from RT_PS_MODE to WDI_POWER_SAVE_LEVEL
// 2005.02.15, by rcnjko.
//
-int
+int
TranslatePsToWdiPs(
IN POWER_LEVEL_CONFIG PowerMode
)
@@ -1969,20 +1969,20 @@ TranslatePsToWdiPs(
switch(PowerMode)
{
case POWER_SAVING_NO_POWER_SAVING:
- WdiPsMode = WDI_POWER_SAVE_LEVEL_NO_POWER_SAVE;
- break;
+ WdiPsMode = WDI_POWER_SAVE_LEVEL_NO_POWER_SAVE;
+ break;
case POWER_SAVING_FAST_PSP:
- WdiPsMode = WDI_POWER_SAVE_LEVEL_FAST_PSP;
- break;
+ WdiPsMode = WDI_POWER_SAVE_LEVEL_FAST_PSP;
+ break;
case POWER_SAVING_MAX_PSP:
- WdiPsMode = WDI_POWER_SAVE_LEVEL_MAX_PSP;
- break;
+ WdiPsMode = WDI_POWER_SAVE_LEVEL_MAX_PSP;
+ break;
case POWER_SAVING_MAXIMUM_LEVEL:
- WdiPsMode = WDI_POWER_SAVE_LEVEL_MAXIMUM_LEVEL;
- break;
+ WdiPsMode = WDI_POWER_SAVE_LEVEL_MAXIMUM_LEVEL;
+ break;
default:
RT_TRACE(COMP_DBG, DBG_SERIOUS, ("TranslatePsToWdiPs(): Unknown PowerMode: 0x%X !!!\n", PowerMode));
- WdiPsMode = WDI_POWER_SAVE_LEVEL_NO_POWER_SAVE;
+ WdiPsMode = WDI_POWER_SAVE_LEVEL_NO_POWER_SAVE;
break;
}
@@ -2041,15 +2041,15 @@ Wdi_Set_Add_Cipher_Keys(
cpMacAddr(MacAddress, CipherKey.PeerMacAddress.Address);
bDefaultKey = FALSE;
- RT_PRINT_ADDR(COMP_SCAN, DBG_LOUD, "WDI_TLV_PEER_MAC_ADDRESS(): ", MacAddress);
+ RT_PRINT_ADDR(COMP_SCAN, DBG_LOUD, "WDI_TLV_PEER_MAC_ADDRESS(): ", MacAddress);
}
if(CipherKey.Optional.CipherKeyID_IsPresent)
{
KeyIndex = CipherKey.CipherKeyID.CipherKeyID;
- RT_TRACE(COMP_SEC, DBG_LOUD, ("WDI_TLV_CIPHER_KEY_ID 0x%x\n", KeyIndex));
+ RT_TRACE(COMP_SEC, DBG_LOUD, ("WDI_TLV_CIPHER_KEY_ID 0x%x\n", KeyIndex));
}
-
+
{
cipherAlgo = CipherKey.CipherKeyTypeInfo.CipherAlgorithm;
direction = CipherKey.CipherKeyTypeInfo.Direction;
@@ -2061,7 +2061,7 @@ Wdi_Set_Add_Cipher_Keys(
switch(cipherAlgo)
{
case WDI_CIPHER_ALGO_WEP:
- rtEncAlgo = RT_ENC_ALG_WEP;
+ rtEncAlgo = RT_ENC_ALG_WEP;
break;
case WDI_CIPHER_ALGO_WEP40:
@@ -2070,59 +2070,59 @@ Wdi_Set_Add_Cipher_Keys(
case WDI_CIPHER_ALGO_WEP104:
rtEncAlgo = RT_ENC_ALG_WEP104;
- break;
-
- case WDI_CIPHER_ALGO_TKIP:
+ break;
+
+ case WDI_CIPHER_ALGO_TKIP:
rtEncAlgo = RT_ENC_ALG_TKIP;
break;
- case WDI_CIPHER_ALGO_CCMP:
- rtEncAlgo = RT_ENC_ALG_AESCCMP;
+ case WDI_CIPHER_ALGO_CCMP:
+ rtEncAlgo = RT_ENC_ALG_AESCCMP;
break;
- case WDI_CIPHER_ALGO_BIP:
+ case WDI_CIPHER_ALGO_BIP:
break;
default:
break;
- }
- }
+ }
+ }
- if(CipherKey.Optional.ReceiveSequenceCount_IsPresent)
+ if(CipherKey.Optional.ReceiveSequenceCount_IsPresent)
{
PlatformMoveMemory(&KeyRSC, CipherKey.ReceiveSequenceCount.ReceiveSequenceCount, 6);
-// RT_TRACE(COMP_SEC, DBG_LOUD, ("WIFI_TLV_CIPHER_KEY_RECEIVE_SEQUENCE_COUNT 0x%"i64fmt"x\n", KeyRSC));
+// RT_TRACE(COMP_SEC, DBG_LOUD, ("WIFI_TLV_CIPHER_KEY_RECEIVE_SEQUENCE_COUNT 0x%"i64fmt"x\n", KeyRSC));
}
if(CipherKey.Optional.CCMPKey_IsPresent)
- {
+ {
KeyLen = CipherKey.CCMPKey.ElementCount;
pKeyMaterial = CipherKey.CCMPKey.pElements;
- bValidKeyRSC = TRUE;
+ bValidKeyRSC = TRUE;
RT_PRINT_DATA(COMP_SEC, DBG_LOUD,("WDI_TLV_CIPHER_KEY_CCMP_KEY\n"),pKeyMaterial,KeyLen);
}
if(CipherKey.Optional.TKIPInfo_IsPresent)
- {
+ {
// Tkip Enc Key(16) + STA Rx MIC Key(8) + STA Tx MIC Key(8).
RT_PRINT_DATA(COMP_SEC, DBG_LOUD, ("TKIPKey \n"), CipherKey.TKIPInfo.TKIPKey.pElements, CipherKey.TKIPInfo.TKIPKey.ElementCount);
RT_PRINT_DATA(COMP_SEC, DBG_LOUD, ("TKIPMIC \n"), CipherKey.TKIPInfo.TKIPMIC.pElements, CipherKey.TKIPInfo.TKIPMIC.ElementCount);
-
+
PlatformMoveMemory(pTkipKeyMaterial, CipherKey.TKIPInfo.TKIPKey.pElements, CipherKey.TKIPInfo.TKIPKey.ElementCount);
- PlatformMoveMemory(pTkipKeyMaterial+CipherKey.TKIPInfo.TKIPKey.ElementCount, CipherKey.TKIPInfo.TKIPMIC.pElements, CipherKey.TKIPInfo.TKIPMIC.ElementCount);
+ PlatformMoveMemory(pTkipKeyMaterial+CipherKey.TKIPInfo.TKIPKey.ElementCount, CipherKey.TKIPInfo.TKIPMIC.pElements, CipherKey.TKIPInfo.TKIPMIC.ElementCount);
+
+ RT_PRINT_DATA(COMP_SEC, DBG_LOUD, ("pTkipKeyMaterial \n"), pTkipKeyMaterial, TKIP_KEY_LEN);
+
+ pKeyMaterial = pTkipKeyMaterial;
+ KeyLen = CipherKey.TKIPInfo.TKIPKey.ElementCount + CipherKey.TKIPInfo.TKIPMIC.ElementCount;
- RT_PRINT_DATA(COMP_SEC, DBG_LOUD, ("pTkipKeyMaterial \n"), pTkipKeyMaterial, TKIP_KEY_LEN);
-
- pKeyMaterial = pTkipKeyMaterial;
- KeyLen = CipherKey.TKIPInfo.TKIPKey.ElementCount + CipherKey.TKIPInfo.TKIPMIC.ElementCount;
-
- bValidKeyRSC = TRUE;
- RT_PRINT_DATA(COMP_SEC, DBG_LOUD,("WDI_TLV_CIPHER_KEY_TKIP_KEY_INFO\n"),pKeyMaterial,KeyLen);
+ bValidKeyRSC = TRUE;
+ RT_PRINT_DATA(COMP_SEC, DBG_LOUD,("WDI_TLV_CIPHER_KEY_TKIP_KEY_INFO\n"),pKeyMaterial,KeyLen);
}
if(CipherKey.Optional.BIPKey_IsPresent)
- {
+ {
if( CipherKey.BIPKey.ElementCount == BIP_KEY_LEN)
{
PlatformMoveMemory( pSecInfo->BIPKeyBuffer ,CipherKey.BIPKey.pElements, CipherKey.BIPKey.ElementCount);
@@ -2135,13 +2135,13 @@ Wdi_Set_Add_Cipher_Keys(
{
ndisStatus = NDIS_STATUS_INVALID_DATA;
}
-
- return ndisStatus;
- }
-
+
+ return ndisStatus;
+ }
+
if(CipherKey.Optional.WEPKey_IsPresent)
- {
- if(rtEncAlgo == RT_ENC_ALG_WEP)
+ {
+ if(rtEncAlgo == RT_ENC_ALG_WEP)
{
if (CipherKey.WEPKey.ElementCount == NATIVE_802_11_WEP40_KEY_LENGTH)
{
@@ -2154,13 +2154,13 @@ Wdi_Set_Add_Cipher_Keys(
RT_TRACE( COMP_SEC, DBG_LOUD, ("Wdi_Set_Add_Cipher_Keys(): DOT11_CIPHER_ALGO_WEP104\n") );
}
}
-
+
KeyLen = CipherKey.WEPKey.ElementCount;
pKeyMaterial = CipherKey.WEPKey.pElements;
- RT_PRINT_DATA(COMP_SEC, DBG_LOUD,("WDI_TLV_CIPHER_KEY_WEP_KEY\n"),pKeyMaterial,KeyLen);
- }
-
+ RT_PRINT_DATA(COMP_SEC, DBG_LOUD,("WDI_TLV_CIPHER_KEY_WEP_KEY\n"),pKeyMaterial,KeyLen);
+ }
+
RT_TRACE(COMP_SEC, DBG_LOUD,("==>CipherType %s\n", (WDI_CIPHER_KEY_TYPE_PAIRWISE_KEY == cipherType)?"WDI_CIPHER_KEY_TYPE_PAIRWISE_KEY":( (WDI_CIPHER_KEY_TYPE_GROUP_KEY == cipherType)?"WDI_CIPHER_KEY_TYPE_GROUP_KEY":"WDI_CIPHER_KEY_TYPE_IGTK")));
if(0 == i && !ACTING_AS_AP(pAdapter))
{
@@ -2169,12 +2169,12 @@ Wdi_Set_Add_Cipher_Keys(
pSecInfo->PairwiseEncAlgorithm = rtEncAlgo;
}
else if(WDI_CIPHER_KEY_TYPE_GROUP_KEY == cipherType)
- {
- pSecInfo->GroupEncAlgorithm = rtEncAlgo;
+ {
+ pSecInfo->GroupEncAlgorithm = rtEncAlgo;
}
RT_TRACE(COMP_SEC, DBG_LOUD,("==> pSecInfo->PairwiseEncAlgorithm=0x%x\n",pSecInfo->PairwiseEncAlgorithm));
-
- }
+
+ }
{
if( ACTING_AS_AP(pAdapter))
{
@@ -2201,7 +2201,7 @@ Wdi_Set_Add_Cipher_Keys(
KeyRSC);
}
else
- {
+ {
for(i=0;i<4;i++){
// Save for Reconnent for Ad-hoc ,by CCW
// PlatformMoveMemory( pNdisCommon->RegDefaultKeyBuf[i], pKeyMaterial, KeyLen);
@@ -2222,13 +2222,13 @@ Wdi_Set_Add_Cipher_Keys(
PlatformMoveMemory( pNdisCommon->RegDefaultKeyBuf[i], pKeyMaterial, KeyLen);
pNdisCommon->RegDefaultKey[i].Length = (u2Byte)KeyLen;
}
- else if(rtEncAlgo == RT_ENC_ALG_WEP104)
+ else if(rtEncAlgo == RT_ENC_ALG_WEP104)
{
PlatformMoveMemory( pNdisCommon->RegDefaultKeyWBuf[i], pKeyMaterial, KeyLen);
pNdisCommon->RegDefaultKeyW[i].Length =(u2Byte)KeyLen;
}
- }
+ }
}
}
else
@@ -2253,21 +2253,21 @@ Wdi_Set_Add_Cipher_Keys(
PlatformMoveMemory( pNdisCommon->RegDefaultKeyBuf[i], pKeyMaterial, KeyLen);
pNdisCommon->RegDefaultKey[i].Length = (u2Byte)KeyLen;
}
- else if(rtEncAlgo == RT_ENC_ALG_WEP104)
+ else if(rtEncAlgo == RT_ENC_ALG_WEP104)
{
PlatformMoveMemory( pNdisCommon->RegDefaultKeyWBuf[i], pKeyMaterial, KeyLen);
pNdisCommon->RegDefaultKeyW[i].Length =(u2Byte)KeyLen;
}
}
PlatformRequestPreAuthentication( pAdapter, PRE_AUTH_INDICATION_REASON_ASSOCIATION );
-
+
}
else
{
// TODO: [WDI] security for Ad-hoc mode
-
+
}
- }
+ }
}
}
@@ -2295,7 +2295,7 @@ Wdi_Set_Delete_Cipher_Keys(
WDI_SET_DELETE_CIPHER_KEYS_PARAMETERS *Params = pOidHandle->tlvParser.parsedTlv.paramSetDeleteDefaultCipherKeys;
WDI_SET_DELETE_CIPHER_KEYS_CONTAINER CipherKeyInfo = {0};
- PWDI_MESSAGE_HEADER pWdiHeader
+ PWDI_MESSAGE_HEADER pWdiHeader
= (PWDI_MESSAGE_HEADER)pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
BOOLEAN bDefaultKey = TRUE;
@@ -2305,7 +2305,7 @@ Wdi_Set_Delete_Cipher_Keys(
ULONG cipherAlgo = 0;
ULONG direction = WDI_CIPHER_KEY_DIRECTION_BOTH;
u1Byte static_key = TRUE;
- ULONG cipherType = WDI_CIPHER_KEY_TYPE_PAIRWISE_KEY;
+ ULONG cipherType = WDI_CIPHER_KEY_TYPE_PAIRWISE_KEY;
u4Byte i = 0;
@@ -2323,17 +2323,17 @@ Wdi_Set_Delete_Cipher_Keys(
CipherKeyInfo = Params->CipherKeyInfo.pElements[i];
if(CipherKeyInfo.Optional.PeerMacAddress_IsPresent)
{
- RT_TRACE(COMP_SEC, DBG_LOUD, ("WDI_TLV_PEER_MAC_ADDRESS\n"));
+ RT_TRACE(COMP_SEC, DBG_LOUD, ("WDI_TLV_PEER_MAC_ADDRESS\n"));
cpMacAddr(MacAddress, CipherKeyInfo.PeerMacAddress.Address);
bDefaultKey = FALSE;
}
if(CipherKeyInfo.Optional.CipherKeyID_IsPresent)
{
- RT_TRACE(COMP_SEC, DBG_LOUD, ("WDI_TLV_CIPHER_KEY_ID\n"));
+ RT_TRACE(COMP_SEC, DBG_LOUD, ("WDI_TLV_CIPHER_KEY_ID\n"));
KeyIndex = CipherKeyInfo.CipherKeyID.CipherKeyID;
}
-
+
{
cipherAlgo = CipherKeyInfo.CipherKeyTypeInfo.CipherAlgorithm;
direction = CipherKeyInfo.CipherKeyTypeInfo.Direction;
@@ -2345,7 +2345,7 @@ Wdi_Set_Delete_Cipher_Keys(
switch(cipherAlgo)
{
case WDI_CIPHER_ALGO_WEP:
- rtEncAlgo = RT_ENC_ALG_WEP;
+ rtEncAlgo = RT_ENC_ALG_WEP;
break;
case WDI_CIPHER_ALGO_WEP40:
@@ -2354,40 +2354,40 @@ Wdi_Set_Delete_Cipher_Keys(
case WDI_CIPHER_ALGO_WEP104:
rtEncAlgo = RT_ENC_ALG_WEP104;
- break;
-
- case WDI_CIPHER_ALGO_TKIP:
+ break;
+
+ case WDI_CIPHER_ALGO_TKIP:
rtEncAlgo = RT_ENC_ALG_TKIP;
break;
- case WDI_CIPHER_ALGO_CCMP:
- rtEncAlgo = RT_ENC_ALG_AESCCMP;
+ case WDI_CIPHER_ALGO_CCMP:
+ rtEncAlgo = RT_ENC_ALG_AESCCMP;
break;
- case WDI_CIPHER_ALGO_BIP:
+ case WDI_CIPHER_ALGO_BIP:
break;
default:
break;
- }
- }
+ }
+ }
RT_TRACE(COMP_SEC, DBG_LOUD, ("[WDI] [Property] WDI_SET_DELETE_CIPHER_KEYS: delete Key\n"));
{
//
- // 061028, rcnjko: WDK said we shall ignore AlgorithmId if bDelete is set,
- // so we use GroupEncAlgorithm instead.
+ // 061028, rcnjko: WDK said we shall ignore AlgorithmId if bDelete is set,
+ // so we use GroupEncAlgorithm instead.
//
if( KeyIndex > 3 && KeyIndex < 6 )
{ // 802.11w BIP key Key index 5 or 6
-
+
PlatformZeroMemory(pSecInfo->BIPKeyBuffer, MAX_KEY_LEN);
}
else if( !pAdapter->MgntInfo.bRSNAPSKMode)
{
MgntActSet_802_11_REMOVE_KEY(
- pAdapter,
+ pAdapter,
rtEncAlgo,
KeyIndex,
MacAddress,
@@ -2403,18 +2403,18 @@ Wdi_Set_Delete_Cipher_Keys(
RT_TRACE( COMP_OID_SET, DBG_WARNING, (" <- [WDI] Property WIFI_SET_DELETE_CIPHER_KEYS, MgntActSet_RSNA_REMOVE_DEAULT_KEY return FALSE !!!\n"));
return NDIS_STATUS_INVALID_DATA;
}
- }
+ }
}
- }
+ }
}
else if(WDI_TLV_DELETE_CIPHER_KEY_INFO== pTlvData->Type)
- {
+ {
InputBufferLength = pTlvData->Length;
pTlvData = (PTLV_WDI_STRUCT)((pu1Byte)pTlvData->Value);
Prefix += 4;
-
+
while(BytesProcessed < InputBufferLength)
{
// Parse Type
@@ -2425,7 +2425,7 @@ Wdi_Set_Delete_Cipher_Keys(
RT_TRACE(COMP_SEC, DBG_LOUD, ("unknown TLV 0x%x\n", pTlvData->Type));
}
break;
-
+
case WDI_TLV_PEER_MAC_ADDRESS:
{
RT_TRACE(COMP_SEC, DBG_LOUD, ("WDI_TLV_PEER_MAC_ADDRESS\n"));
@@ -2462,26 +2462,26 @@ Wdi_Set_Delete_Cipher_Keys(
// Parse Content
BytesProcessed += (4 + pTlvData->Length);
-
+
pTlvData = (PTLV_WDI_STRUCT)((pu1Byte)pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer + Prefix + BytesProcessed);
}
RT_TRACE(COMP_SEC, DBG_LOUD, ("[WDI] [Property] WDI_SET_DELETE_CIPHER_KEYS: delete Key\n"));
//
- // 061028, rcnjko: WDK said we shall ignore AlgorithmId if bDelete is set,
- // so we use GroupEncAlgorithm instead.
+ // 061028, rcnjko: WDK said we shall ignore AlgorithmId if bDelete is set,
+ // so we use GroupEncAlgorithm instead.
//
rtEncAlgo = pSecInfo->GroupEncAlgorithm;
if( KeyIndex > 3 && KeyIndex < 6 )
{ // 802.11w BIP key Key index 5 or 6
-
+
PlatformZeroMemory(pSecInfo->BIPKeyBuffer, MAX_KEY_LEN);
}
else if( !pAdapter->MgntInfo.bRSNAPSKMode)
{
MgntActSet_802_11_REMOVE_KEY(
- pAdapter,
+ pAdapter,
rtEncAlgo,
KeyIndex,
MacAddress,
@@ -2523,7 +2523,7 @@ Wdi_Set_Default_Key_ID(
// Set default key id: 0 ~ 3.
KeyId &= 0x3;
- // The following code will cause 8187 failed to link to AP.
+ // The following code will cause 8187 failed to link to AP.
pSecInfo->DefaultTransmitKeyIdx = (u1Byte)KeyId;
pNdisCommon->RegDefaultKeyId = (u1Byte)KeyId;
@@ -2542,9 +2542,9 @@ Wdi_Set_Receive_Packet_Filter(
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
ULONG BytesRead = 0, BytesNeeded = 0;
- PWDI_MESSAGE_HEADER pWdiHeader
+ PWDI_MESSAGE_HEADER pWdiHeader
= (PWDI_MESSAGE_HEADER)pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
- ULONG InputBufferLength
+ ULONG InputBufferLength
= pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength;;
WDI_SET_RECEIVE_PACKET_FILTER_PARAMETERS *Params = pOidHandle->tlvParser.parsedTlv.paramSetReceivePacketFilter;
@@ -2562,7 +2562,7 @@ Wdi_Set_Receive_Packet_Filter(
pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength,
&BytesRead,
&BytesNeeded);
-
+
return ndisStatus;
}
@@ -2581,7 +2581,7 @@ Wdi_Set_Network_List_Offload(
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter);
PRT_NDIS6_COMMON pNdisCommon = pDefaultAdapter->pNdisCommon;
- PRT_NLO_INFO pNLOInfo = &(pDefaultAdapter->MgntInfo.NLOInfo);
+ PRT_NLO_INFO pNLOInfo = &(pDefaultAdapter->MgntInfo.NLOInfo);
u4Byte ChannelIndex = 0;
u4Byte Index = 0;
u4Byte ItemCnt = 0;
@@ -2601,7 +2601,7 @@ Wdi_Set_Network_List_Offload(
pNLOInfo->FastScanPeriod = 0;
pNLOInfo->SlowScanPeriod = 0;
pNdisCommon->ScanPeriod = 0;
-
+
RT_TRACE( COMP_POWER, DBG_LOUD , (" ===>SsidOffload_IsPresent == 0 \n") );
return NDIS_STATUS_SUCCESS;
}
@@ -2633,12 +2633,12 @@ Wdi_Set_Network_List_Offload(
for( i=0 ; i<pOffloadItem->UnicastAlgorithms.ElementCount ; ++i, ++Index)
{
- // Copy SSID
- CopySsid( pNLOInfo->dDot11OffloadNetworkList[Index].ssidbuf,
+ // Copy SSID
+ CopySsid( pNLOInfo->dDot11OffloadNetworkList[Index].ssidbuf,
pNLOInfo->dDot11OffloadNetworkList[Index].ssidlen,
pOffloadItem->SsidToScan.pElements,
pOffloadItem->SsidToScan.ElementCount);
-
+
RT_TRACE(COMP_POWER, DBG_LOUD, ("The %u OFFLOAD NETWORK SSID: %s\n", Index+1, pNLOInfo->dDot11OffloadNetworkList[Index].ssidbuf));
pAlgorithmItem = &(pOffloadItem->UnicastAlgorithms.pElements[i]);
@@ -2658,15 +2658,15 @@ Wdi_Set_Network_List_Offload(
pNLOInfo->dDot11OffloadNetworkList[Index].bPrivacy = TRUE;
pNLOInfo->dDot11OffloadNetworkList[Index].chiper = 0x0;
break;
- case WDI_CIPHER_ALGO_TKIP :
- if( pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_WPA ||
+ case WDI_CIPHER_ALGO_TKIP :
+ if( pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_WPA ||
pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_WPA_PSK )
{
pNLOInfo->dDot11OffloadNetworkList[Index].SecLvl = RT_SEC_LVL_WPA;
pNLOInfo->dDot11OffloadNetworkList[Index].bPrivacy = TRUE;
pNLOInfo->dDot11OffloadNetworkList[Index].chiper = WPA_TKIP;
}
- else if( pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_RSNA ||
+ else if( pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_RSNA ||
pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_RSNA_PSK )
{
pNLOInfo->dDot11OffloadNetworkList[Index].SecLvl = RT_SEC_LVL_WPA2;
@@ -2682,14 +2682,14 @@ Wdi_Set_Network_List_Offload(
}
break;
case WDI_CIPHER_ALGO_CCMP :
- if( pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_WPA ||
+ if( pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_WPA ||
pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_WPA_PSK )
{
pNLOInfo->dDot11OffloadNetworkList[Index].SecLvl = RT_SEC_LVL_WPA;
pNLOInfo->dDot11OffloadNetworkList[Index].bPrivacy = TRUE;
pNLOInfo->dDot11OffloadNetworkList[Index].chiper = WPA_AES;
}
- else if( pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_RSNA ||
+ else if( pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_RSNA ||
pAlgorithmItem->AuthAlgorithm == WDI_AUTH_ALGO_RSNA_PSK )
{
pNLOInfo->dDot11OffloadNetworkList[Index].SecLvl = RT_SEC_LVL_WPA2;
@@ -2711,29 +2711,29 @@ Wdi_Set_Network_List_Offload(
RT_TRACE( COMP_POWER, DBG_LOUD , (" ===> Unknow UnicastCipher : %x\n", pAlgorithmItem->CipherAlgorithm) );
break;
}
-
+
RT_TRACE(COMP_POWER , DBG_LOUD , (" Seclvl : %d\n", pNLOInfo->dDot11OffloadNetworkList[Index].SecLvl) );
RT_TRACE(COMP_POWER , DBG_LOUD , (" bPrivacy : %d\n", pNLOInfo->dDot11OffloadNetworkList[Index].bPrivacy) );
RT_TRACE(COMP_POWER , DBG_LOUD , (" chiper : %d\n", pNLOInfo->dDot11OffloadNetworkList[Index].chiper) );
RT_TRACE( COMP_POWER, DBG_LOUD, (" Channel Hint:\n"));
-
- // Save channel info
+
+ // Save channel info
// DOT11_MAX_CHANNEL_HINTS 4
for( ChannelIndex = 0 ; ChannelIndex < pOffloadItem->ChannellHintList.ElementCount ; ChannelIndex++ )
{
pNLOInfo->dDot11OffloadNetworkList[Index].channelNumberHit[ChannelIndex] = pChannelItem[ChannelIndex].ChannelNumber;
RT_TRACE( COMP_POWER, DBG_LOUD, (" %u", pNLOInfo->dDot11OffloadNetworkList[Index].channelNumberHit[ChannelIndex]));
}
-
+
RT_TRACE( COMP_POWER, DBG_LOUD, ("\n"));
-
- // Show Entry information !!
+
+ // Show Entry information !!
RT_TRACE( COMP_POWER, DBG_LOUD , (" ===> Show NLO info Index (%x):\n", Index) );
RT_PRINT_STR(COMP_POWER, DBG_LOUD, (" SSID"), pNLOInfo->dDot11OffloadNetworkList[Index].ssidbuf, pNLOInfo->dDot11OffloadNetworkList[Index].ssidlen);
RT_TRACE( COMP_POWER , DBG_LOUD , (" chiper : %x \n", pNLOInfo->dDot11OffloadNetworkList[Index].chiper) );
}
- }
+ }
}
else
{
@@ -2757,9 +2757,9 @@ Wdi_Set_Privacy_Exemption_List(
ULONG BytesRead = 0, BytesNeeded = 0;
PRT_NDIS6_COMMON pNdisCommon = pAdapter->pNdisCommon;
PNDIS_OID_REQUEST pNdisRequest = pOidHandle->pNdisRequest;
- PWDI_MESSAGE_HEADER pWdiHeader
+ PWDI_MESSAGE_HEADER pWdiHeader
= (PWDI_MESSAGE_HEADER)pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
- ULONG InputBufferLength
+ ULONG InputBufferLength
= pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength;
WDI_SET_PRIVACY_EXEMPTION_LIST_PARAMETERS *Params = pOidHandle->tlvParser.parsedTlv.paramSetPrivacyExemptionList;
WDI_PRIVACY_EXEMPTION_LIST_CONTAINER PrivacyList = {0};
@@ -2780,34 +2780,34 @@ Wdi_Set_Privacy_Exemption_List(
for(i = 0; i < Params->PrivacyExemptionEntry.ElementCount; i++)
{
PrivacyList = Params->PrivacyExemptionEntry.pElements[i];
- pNdisCommon->PrivacyExemptionEntries[i].usEtherType =
+ pNdisCommon->PrivacyExemptionEntries[i].usEtherType =
PrivacyList.EtherType;
- pNdisCommon->PrivacyExemptionEntries[i].usExemptionActionType =
- PrivacyList.ExemptionActionType;
- pNdisCommon->PrivacyExemptionEntries[i].usExemptionPacketType =
- PrivacyList.ExemptionPacketType;
+ pNdisCommon->PrivacyExemptionEntries[i].usExemptionActionType =
+ PrivacyList.ExemptionActionType;
+ pNdisCommon->PrivacyExemptionEntries[i].usExemptionPacketType =
+ PrivacyList.ExemptionPacketType;
}
- RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD,
- "Privacy exempt list:",
- pNdisCommon->PrivacyExemptionEntries,
- (int)(pNdisCommon->PrivacyExemptionEntrieNum * sizeof(DOT11_PRIVACY_EXEMPTION)));
+ RT_PRINT_DATA(COMP_OID_SET, DBG_LOUD,
+ "Privacy exempt list:",
+ pNdisCommon->PrivacyExemptionEntries,
+ (int)(pNdisCommon->PrivacyExemptionEntrieNum * sizeof(DOT11_PRIVACY_EXEMPTION)));
}
-
+
return ndisStatus;
}
NDIS_STATUS
-Wdi_Set_Power_State(
+Wdi_Set_Power_State(
IN PADAPTER pAdapter,
IN PRT_OID_HANDLER pOidHandle
)
{
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
-
+
ndisStatus = N6SdioWdi_Mgnt_SetPower(pAdapter, pOidHandle);
return ndisStatus;
@@ -2815,15 +2815,15 @@ Wdi_Set_Power_State(
NDIS_STATUS
-Wdi_Abort_Task(
+Wdi_Abort_Task(
IN PADAPTER pAdapter,
IN PRT_OID_HANDLER pOidHandle
)
{
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
- PWDI_MESSAGE_HEADER pWdiHeader
+ PWDI_MESSAGE_HEADER pWdiHeader
= (PWDI_MESSAGE_HEADER) pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
- ULONG InputBufferLength
+ ULONG InputBufferLength
= pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength;
WDI_TASK_ABORT_PARAMETERS *Params = pOidHandle->tlvParser.parsedTlv.paramAbort;
@@ -2875,7 +2875,7 @@ Wdi_Set_Add_Wol_Pattern(
u1Byte Index, ptnIndex;
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("==> Wdi_Set_Add_Wol_Pattern()\n"));
-
+
pWdiHeader->Status = NDIS_STATUS_SUCCESS;
pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.BytesWritten = sizeof(WDI_MESSAGE_HEADER);
@@ -2895,20 +2895,20 @@ Wdi_Set_Add_Wol_Pattern(
for(Index = 0; Index < Params->WakePacketPattern.ElementCount; Index++, pPatternElements++)
{
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN[%d]:\n", Index));
-
+
if(pPatternElements->PacketPattern.ElementCount <= MAX_WOL_PATTERN_SIZE)
{
PlatformMoveMemory(WoLBitMapPatternContent, pPatternElements->PacketPattern.pElements, pPatternElements->PacketPattern.ElementCount);
- RT_PRINT_DATA( COMP_OID_SET | COMP_POWER, DBG_LOUD, ("WoLBitMapPatternContent...\n"),
+ RT_PRINT_DATA( COMP_OID_SET | COMP_POWER, DBG_LOUD, ("WoLBitMapPatternContent...\n"),
WoLBitMapPatternContent, sizeof(WoLBitMapPatternContent));
}
if(pPatternElements->PacketPatternMask.ElementCount <= MAX_WOL_BIT_MASK_SIZE)
{
- PlatformMoveMemory(WoLBitMapPatternMask, pPatternElements->PacketPatternMask.pElements, pPatternElements->PacketPatternMask.ElementCount);
- RT_PRINT_DATA( COMP_OID_SET | COMP_POWER, DBG_LOUD, ("WoLBitMapPatternMask...\n"),
+ PlatformMoveMemory(WoLBitMapPatternMask, pPatternElements->PacketPatternMask.pElements, pPatternElements->PacketPatternMask.ElementCount);
+ RT_PRINT_DATA( COMP_OID_SET | COMP_POWER, DBG_LOUD, ("WoLBitMapPatternMask...\n"),
WoLBitMapPatternMask, sizeof(WoLBitMapPatternMask));
}
-
+
//Find the index of the first empty entry.
for(Index = 0; Index < MAX_SUPPORT_WOL_PATTERN_NUM(pAdapter); Index++)
{
@@ -2921,12 +2921,12 @@ Wdi_Set_Add_Wol_Pattern(
if(pPmWoLPatternInfo[Index].PatternId == 0)
break;
}
-
+
if(Index >= MAX_SUPPORT_WOL_PATTERN_NUM(pAdapter))
{
ndisStatus = NDIS_STATUS_RESOURCES;
RT_TRACE(COMP_POWER, DBG_LOUD,
- ("SET OID_PNP_ADD_WOL_PATTERN: Return status(%#X). The number of wake up pattern is more than %d or the pattern Id is exist.\n",
+ ("SET OID_PNP_ADD_WOL_PATTERN: Return status(%#X). The number of wake up pattern is more than %d or the pattern Id is exist.\n",
ndisStatus, MAX_SUPPORT_WOL_PATTERN_NUM(pAdapter)));
return ndisStatus;
}
@@ -2946,9 +2946,9 @@ Wdi_Set_Add_Wol_Pattern(
//Skip IPv4/IPv6 TCP SYN pattern because it will hit HW bug for the CRC.
// We offload this pattern to FW.
pPmWoLPatternInfo[Index].PatternType = eUnicastPattern;
- RT_TRACE(COMP_OID_SET, DBG_LOUD,
+ RT_TRACE(COMP_OID_SET, DBG_LOUD,
("OID_PM_ADD_WOL_PATTERN: IPv4/IPv6 TCP SYN pattern.\n"));
-
+
}
else if(PlatformCompareMemory(WoLBitMapPatternContent, MULTICAST_ADDR, sizeof(MULTICAST_ADDR)) == 0)
{ //Multicast
@@ -2962,12 +2962,12 @@ Wdi_Set_Add_Wol_Pattern(
{
pPmWoLPatternInfo[Index].PatternType = eDontCareDA;
}
-
+
{
- GetWOLWakeUpPattern(pAdapter,
- (pu1Byte)&WoLBitMapPatternMask,
- pPatternElements->PacketPatternMask.ElementCount,
- (pu1Byte)&WoLBitMapPatternContent,
+ GetWOLWakeUpPattern(pAdapter,
+ (pu1Byte)&WoLBitMapPatternMask,
+ pPatternElements->PacketPatternMask.ElementCount,
+ (pu1Byte)&WoLBitMapPatternContent,
pPatternElements->PacketPattern.ElementCount,
Index,
FALSE
@@ -2976,7 +2976,7 @@ Wdi_Set_Add_Wol_Pattern(
pPSC->WoLPatternNum++;
}
}
-
+
}
//2 Wake Packet Magic Packet
@@ -3019,7 +3019,7 @@ Wdi_Set_Add_Wol_Pattern(
if(Params->WakePacketEapolRequestIdPatternId)
{
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_ADD_WOL_PATTERN: Support EapolRequestIdMessage.\n"));
-
+
if(!pPSC->EapolRequestIdMessagePatternId)
{
pPSC->EapolRequestIdMessagePatternId = Params->WakePacketEapolRequestIdPatternId;
@@ -3047,7 +3047,7 @@ Wdi_Set_Remove_Wol_Pattern(
PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo);
PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo);
PRT_PM_WOL_PATTERN_INFO pPmWoLPatternInfo = &(pPSC->PmWoLPatternInfo[0]);
-
+
u4Byte RemovePatternId = Params->PatternId;
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("==> Wdi_Set_Remove_Wol_Pattern()\n"));
@@ -3059,41 +3059,41 @@ Wdi_Set_Remove_Wol_Pattern(
if(RemovePatternId == pPSC->MagicPacketPatternId)
{
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET_OID_PM_REMOVE_WOL_PATTERN: Remove MagicPacket.\n"));
-
+
pPSC->MagicPacketPatternId = 0;
pPSC->WoLPktNoPtnNum--;
}
else if(RemovePatternId == pPSC->EapolRequestIdMessagePatternId)
{
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET_OID_PM_REMOVE_WOL_PATTERN: Remove EapolRequestIdMessage.\n"));
-
+
pPSC->EapolRequestIdMessagePatternId = 0;
pPSC->WoLPktNoPtnNum--;
}
else if(RemovePatternId == pPSC->IPv4TcpSynPatternId)
{
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET_OID_PM_REMOVE_WOL_PATTERN: Remove IPv4TcpSyn.\n"));
-
+
pPSC->IPv4TcpSynPatternId = 0;
pPSC->WoLPktNoPtnNum--;
}
else if(RemovePatternId == pPSC->IPv6TcpSynPatternId)
{
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET_OID_PM_REMOVE_WOL_PATTERN: Remove IPv6TcpSyn.\n"));
-
+
pPSC->IPv6TcpSynPatternId = 0;
pPSC->WoLPktNoPtnNum--;
}
else
{
u1Byte Index;
-
+
for(Index = 0; Index < MAX_SUPPORT_WOL_PATTERN_NUM(pAdapter); Index++)
{
if(pPmWoLPatternInfo[Index].PatternId == RemovePatternId)
break;
}
-
+
if(Index >= MAX_SUPPORT_WOL_PATTERN_NUM(pAdapter))
{
RT_TRACE(COMP_OID_SET, DBG_LOUD,("SET OID_PM_REMOVE_WOL_PATTERN: Cannot find the wake up pattern Id(%08X).\n", RemovePatternId));
@@ -3106,9 +3106,9 @@ Wdi_Set_Remove_Wol_Pattern(
pPmWoLPatternInfo[Index].CrcRemainder = 0xffff;
pPmWoLPatternInfo[Index].IsPatternMatch = 0;
pPmWoLPatternInfo[Index].IsSupportedByFW = 0;
-
- pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_MASK, (pu1Byte)(&Index));
- pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_CRC, (pu1Byte)(&Index));
+
+ pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_MASK, (pu1Byte)(&Index));
+ pAdapter->HalFunc.SetHwRegHandler(pAdapter, HW_VAR_WF_CRC, (pu1Byte)(&Index));
pPmWoLPatternInfo[Index].HwWFMIndex = 0xff; // reset the value after clear HW/CAM entry.
pPSC->WoLPatternNum--;
@@ -3139,7 +3139,7 @@ Wdi_Set_Multicast_List(
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
ULONG BytesRead = 0, BytesNeeded = 0;
PWDI_MESSAGE_HEADER pWdiHeader = (PWDI_MESSAGE_HEADER)pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
- ULONG InputBufferLength = pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength;
+ ULONG InputBufferLength = pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength;
WDI_SET_MULTICAST_LIST_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramSetMulticastList;
WDI_MAC_ADDRESS Address = {0};
DOT11_MAC_ADDRESS MulticastList[MAX_MCAST_LIST_NUM];
@@ -3155,7 +3155,7 @@ Wdi_Set_Multicast_List(
Address = param->MulticastList.pElements[i];
CopyMem(MulticastList[i], Address.Address, sizeof(DOT11_MAC_ADDRESS));
RT_PRINT_ADDR(COMP_OID_SET, DBG_TRACE, ("Wdi_Set_Multicast_List MulticastList\n"), MulticastList[i]);
- RT_PRINT_ADDR(COMP_OID_SET, DBG_TRACE, ("Wdi_Set_Multicast_List Address.Address\n"), Address.Address);
+ RT_PRINT_ADDR(COMP_OID_SET, DBG_TRACE, ("Wdi_Set_Multicast_List Address.Address\n"), Address.Address);
}
ndisStatus = N6CSet_DOT11_MULTICAST_LIST(pAdapter,
@@ -3168,7 +3168,7 @@ Wdi_Set_Multicast_List(
{
// Shall we need to clear multicast list since parameter was empty?
}
-
+
return ndisStatus;
}
@@ -3183,9 +3183,9 @@ Wdi_Set_Add_Pm_Protocol_Offload(
PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo);
PWDI_MESSAGE_HEADER pWdiHeader = (PWDI_MESSAGE_HEADER) pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
WDI_SET_ADD_PM_PROTOCOL_OFFLOAD_PARAMETERS_PARAMETERS *Params = pOidHandle->tlvParser.parsedTlv.paramSetAddProtocolOffload;
-
+
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("==> Wdi_Set_Add_Pm_Protocol_Offload()\n"));
-
+
pWdiHeader->Status = NDIS_STATUS_SUCCESS;
pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.BytesWritten = sizeof(WDI_MESSAGE_HEADER);
@@ -3193,21 +3193,21 @@ Wdi_Set_Add_Pm_Protocol_Offload(
//2 DOT11 RSN REKey Offload
if(Params->DOT11RSNREKeyOffload.ProtocolOffloadId)
{
- RT_TRACE(COMP_OID_SET, DBG_LOUD, ("ProtocolOffloadId = %d\n",
+ RT_TRACE(COMP_OID_SET, DBG_LOUD, ("ProtocolOffloadId = %d\n",
Params->DOT11RSNREKeyOffload.ProtocolOffloadId));
-
- pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eGTKOffloadIdx]
+
+ pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eGTKOffloadIdx]
= Params->DOT11RSNREKeyOffload.ProtocolOffloadId;
-
+
//Copy kck, kek
- PlatformMoveMemory(&(pMgntInfo->PMDot11RSNRekeyPara.KCK),
- Params->DOT11RSNREKeyOffload.KCK_CONTENT, 32);
+ PlatformMoveMemory(&(pMgntInfo->PMDot11RSNRekeyPara.KCK),
+ Params->DOT11RSNREKeyOffload.KCK_CONTENT, 32);
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("KCK_CONTENT:\n"),
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("KCK_CONTENT:\n"),
pMgntInfo->PMDot11RSNRekeyPara.KCK, 16);
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("KEK_CONTENT:\n"),
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("KEK_CONTENT:\n"),
pMgntInfo->PMDot11RSNRekeyPara.KEK, 16);
-
+
pMgntInfo->PMDot11RSNRekeyPara.KeyReplayCounter = Params->DOT11RSNREKeyOffload.ReplayCounter;
if(pPSC->RegGTKOffloadEnable)
@@ -3218,18 +3218,18 @@ Wdi_Set_Add_Pm_Protocol_Offload(
//2 ipv4 ARP Offload
if(Params->ipv4ARPOffload.ProtocolOffloadId)
{
- pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eARPOffloadIdx]
+ pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eARPOffloadIdx]
= Params->ipv4ARPOffload.ProtocolOffloadId;
//Copy RemoteIPv4Address, HostIPv4Address & MacAddress
- PlatformMoveMemory(&(pMgntInfo->PMIPV4ARPPara.RemoteIPv4Address),
- Params->ipv4ARPOffload.RemoteIPV4Address, 14);
-
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("RemoteIPv4Address:\n"),
+ PlatformMoveMemory(&(pMgntInfo->PMIPV4ARPPara.RemoteIPv4Address),
+ Params->ipv4ARPOffload.RemoteIPV4Address, 14);
+
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("RemoteIPv4Address:\n"),
pMgntInfo->PMIPV4ARPPara.RemoteIPv4Address, 4);
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("HostIPv4Address:\n"),
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("HostIPv4Address:\n"),
pMgntInfo->PMIPV4ARPPara.HostIPv4Address, 4);
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("MacAddress:\n"),
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("MacAddress:\n"),
pMgntInfo->PMIPV4ARPPara.MacAddress, 6);
if(pPSC->RegARPOffloadEnable)
@@ -3241,7 +3241,7 @@ Wdi_Set_Add_Pm_Protocol_Offload(
if(Params->ipv6ARPOffload.ProtocolOffloadId)
{
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("SET OID_PM_ADD_PROTOCOL_OFFLOAD. (NS IPv6)\n"));
-
+
if((pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eNSOffloadIdx1] != 0) &&
(pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eNSOffloadIdx2] != 0))
{
@@ -3252,43 +3252,43 @@ Wdi_Set_Add_Pm_Protocol_Offload(
{
u1Byte IPv6NSIndex = 0;
RT_PM_IPV6_NS_PARAMETERS *NsParams;
-
+
if( pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eNSOffloadIdx1] == 0)
{
- pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eNSOffloadIdx1]
+ pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eNSOffloadIdx1]
= Params->ipv6ARPOffload.ProtocolOffloadId;
IPv6NSIndex = 0;
RT_TRACE( COMP_OID_SET, DBG_LOUD, ("==> eNSOffloadIdx1: \n"));
}
else
{
- pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eNSOffloadIdx2]
+ pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eNSOffloadIdx2]
= Params->ipv6ARPOffload.ProtocolOffloadId;
IPv6NSIndex = 1;
RT_TRACE( COMP_OID_SET, DBG_LOUD, ("==> eNSOffloadIdx2: \n"));
}
NsParams = &(pMgntInfo->PMIPV6NSPara[IPv6NSIndex]);
-
- PlatformMoveMemory(NsParams->RemoteIPv6Address,
+
+ PlatformMoveMemory(NsParams->RemoteIPv6Address,
Params->ipv6ARPOffload.RemoteIPV6Address, 16);
- PlatformMoveMemory(NsParams->SolicitedNodeIPv6Address,
+ PlatformMoveMemory(NsParams->SolicitedNodeIPv6Address,
Params->ipv6ARPOffload.SolicitdNodeIPv6Address, 16);
- PlatformMoveMemory(NsParams->MacAddress,
+ PlatformMoveMemory(NsParams->MacAddress,
Params->ipv6ARPOffload.MacAddress.Address, 6);
- PlatformMoveMemory(NsParams->TargetIPv6Addresses[0],
+ PlatformMoveMemory(NsParams->TargetIPv6Addresses[0],
Params->ipv6ARPOffload.TargetIPV6Address1, 16);
- PlatformMoveMemory(NsParams->TargetIPv6Addresses[1],
+ PlatformMoveMemory(NsParams->TargetIPv6Addresses[1],
Params->ipv6ARPOffload.TargetIPV6Address2, 16);
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv6Address: \n"),
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM RemoteIPv6Address: \n"),
NsParams->RemoteIPv6Address, 16);
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM SolicitedNodeIPv6Address: \n"),
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM SolicitedNodeIPv6Address: \n"),
NsParams->SolicitedNodeIPv6Address, 16);
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress: \n"),
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM MacAddress: \n"),
NsParams->MacAddress, 6);
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[0]: \n"),
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[0]: \n"),
NsParams->TargetIPv6Addresses[0], 16);
- RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[1]: \n"),
+ RT_PRINT_DATA( COMP_OID_SET, DBG_LOUD, ("SET PM TargetIPv6Addresses[1]: \n"),
NsParams->TargetIPv6Addresses[1], 16);
if(pPSC->RegNSOffloadEnable)
@@ -3297,7 +3297,7 @@ Wdi_Set_Add_Pm_Protocol_Offload(
}
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<== Wdi_Set_Add_Pm_Protocol_Offload()\n"));
-
+
return ndisStatus;
}
@@ -3313,9 +3313,9 @@ Wdi_Set_Remove_Pm_Protocol_Offload(
WDI_SET_REMOVE_PM_PROTOCOL_OFFLOAD_PARAMETERS *Params = pOidHandle->tlvParser.parsedTlv.paramSetRemoveProtocolOffload;
u4Byte MatchId, ProtocolOffloadId = Params->RemovePMOffload;
-
+
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("==> Wdi_Set_Remove_Pm_Protocol_Offload()\n"));
-
+
pWdiHeader->Status = NDIS_STATUS_SUCCESS;
pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.BytesWritten = sizeof(WDI_MESSAGE_HEADER);
@@ -3324,19 +3324,19 @@ Wdi_Set_Remove_Pm_Protocol_Offload(
if(ProtocolOffloadId == pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[MatchId])
{
RT_TRACE(COMP_POWER, DBG_LOUD, ("Find match protocol offload ID idx (%d)\n", MatchId));
-
+
if(MatchId == eGTKOffloadIdx)
{
- PlatformZeroMemory(&(pMgntInfo->PMDot11RSNRekeyPara), sizeof(RT_PM_DOT11_RSN_REKEY_PARAMETERS));
+ PlatformZeroMemory(&(pMgntInfo->PMDot11RSNRekeyPara), sizeof(RT_PM_DOT11_RSN_REKEY_PARAMETERS));
RT_TRACE( COMP_OID_SET, DBG_LOUD, ("==>REMOVE eGTKOffloadIdx\n"));
}
else if(MatchId == eARPOffloadIdx)
{
- PlatformZeroMemory(&(pMgntInfo->PMIPV4ARPPara), sizeof(RT_PM_IPV4_ARP_PARAMETERS));
+ PlatformZeroMemory(&(pMgntInfo->PMIPV4ARPPara), sizeof(RT_PM_IPV4_ARP_PARAMETERS));
RT_TRACE( COMP_OID_SET, DBG_LOUD, ("==>REMOVE eARPOffloadIdx\n"));
}
else if(MatchId == eNSOffloadIdx1 )
- {
+ {
// Disable eNSOffloadIdx1 , set ID = 0 !!
pMgntInfo->PowerSaveControl.PMProtocolOffloadIDs[eNSOffloadIdx1] = 0;
RT_TRACE( COMP_OID_SET, DBG_LOUD, ("==>REMOVE eNSOffloadIdx1\n"));
@@ -3351,7 +3351,7 @@ Wdi_Set_Remove_Pm_Protocol_Offload(
}
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("<== Wdi_Set_Remove_Pm_Protocol_Offload()\n"));
-
+
return ndisStatus;
}
@@ -3365,10 +3365,10 @@ Wdi_Set_Connection_Quality(
ULONG BytesRead = 0, BytesNeeded = 0;
PMGNT_INFO pMgntInfo=&(pAdapter->MgntInfo);
PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo);
- PWDI_MESSAGE_HEADER pWdiHeader
+ PWDI_MESSAGE_HEADER pWdiHeader
= (PWDI_MESSAGE_HEADER)pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
- ULONG InputBufferLength
- = pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength;
+ ULONG InputBufferLength
+ = pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InputBufferLength;
WDI_SET_CONNECTION_QUALITY_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramSetConnectionQuality;
pWdiHeader->Status = NDIS_STATUS_SUCCESS;
@@ -3385,18 +3385,18 @@ Wdi_Set_Connection_Quality(
pPSC->ConnectionQuality = param->Quality;
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Wdi_Set_Connection_Quality ConnectionQuality 0x%x\n", pPSC->ConnectionQuality));
-
+
if(param->Optional.LowLatencyParameters_IsPresent)
{
pPSC->MaximumOffChannelOperationTime = param->LowLatencyParameters.MaximumOffChannelOperationTime;
- pPSC->RoamingNeededLinkQualityThreshold = param->LowLatencyParameters.RoamingNeededLinkQualityThreshold;
+ pPSC->RoamingNeededLinkQualityThreshold = param->LowLatencyParameters.RoamingNeededLinkQualityThreshold;
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Wdi_Set_Connection_Quality MaximumOffChannelOperationTime 0x%x\n", pPSC->MaximumOffChannelOperationTime));
- RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Wdi_Set_Connection_Quality RoamingNeededLinkQualityThreshold 0x%x\n", pPSC->RoamingNeededLinkQualityThreshold));
+ RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Wdi_Set_Connection_Quality RoamingNeededLinkQualityThreshold 0x%x\n", pPSC->RoamingNeededLinkQualityThreshold));
}
}
-
-
+
+
return ndisStatus;
}
@@ -3413,23 +3413,23 @@ Wdi_Get_Auto_Power_Save(
WDI_GET_AUTO_POWER_SAVE_RESULTS adapterPowerSave = {0};
PUCHAR pOutput = NULL;
ULONG length = 0;
-
- PWDI_MESSAGE_HEADER pOidHeader
+
+ PWDI_MESSAGE_HEADER pOidHeader
= (PWDI_MESSAGE_HEADER)pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
- adapterPowerSave.AutoPowerSaveParameters.EnableAutoPSM =
+ adapterPowerSave.AutoPowerSaveParameters.EnableAutoPSM =
pMgntInfo->bInAutoPowerSavemode;
- adapterPowerSave.AutoPowerSaveParameters.BeaconInterval =
+ adapterPowerSave.AutoPowerSaveParameters.BeaconInterval =
pMgntInfo->dot11BeaconPeriod;
- adapterPowerSave.AutoPowerSaveParameters.ListenInterval =
+ adapterPowerSave.AutoPowerSaveParameters.ListenInterval =
(UINT8)pMgntInfo->ListenInterval;
if(pMgntInfo->ListenIntervalInDX)
{
- adapterPowerSave.AutoPowerSaveParameters.ListenIntervalInDx =
- (UINT8)pMgntInfo->ListenIntervalInDX;
+ adapterPowerSave.AutoPowerSaveParameters.ListenIntervalInDx =
+ (UINT8)pMgntInfo->ListenIntervalInDX;
}
else
{
@@ -3446,13 +3446,13 @@ Wdi_Get_Auto_Power_Save(
else
{
adapterPowerSave.AutoPowerSaveParameters.PowerMode = WDI_POWER_SAVE_LEVEL_NO_POWER_SAVE;
- adapterPowerSave.AutoPowerSaveParameters.PowerModeinDx = WDI_POWER_SAVE_LEVEL_NO_POWER_SAVE;
+ adapterPowerSave.AutoPowerSaveParameters.PowerModeinDx = WDI_POWER_SAVE_LEVEL_NO_POWER_SAVE;
}
//2 Todo
adapterPowerSave.AutoPowerSaveParameters.Reason = 0;
-
- adapterPowerSave.AutoPowerSaveParameters.MillisecondsSinceStart =
+
+ adapterPowerSave.AutoPowerSaveParameters.MillisecondsSinceStart =
(PlatformGetCurrentTime() - pDefAdapter->DriverUpTime) / 1000;
if (pPSC->bLeisurePs && pMgntInfo->dot11PowerSaveMode != eActive)
@@ -3461,21 +3461,21 @@ Wdi_Get_Auto_Power_Save(
(PlatformGetCurrentTime() - pPSC->LastLPSEnterTime) / 1000;
}
else if (pPSC->LastLPSEnterTime)
- {
+ {
adapterPowerSave.AutoPowerSaveParameters.MillisecondsInPowerSave =
(pPSC->LastLPSLeaveTime - pPSC->LastLPSEnterTime) / 1000;
- }
+ }
else
{
adapterPowerSave.AutoPowerSaveParameters.MillisecondsInPowerSave = 0;
}
//2 Todo
- adapterPowerSave.AutoPowerSaveParameters.ReceivedMulticastPackets =
- adapterPowerSave.AutoPowerSaveParameters.SentMulticastPackets =
- adapterPowerSave.AutoPowerSaveParameters.ReceivedUnicastPackets =
+ adapterPowerSave.AutoPowerSaveParameters.ReceivedMulticastPackets =
+ adapterPowerSave.AutoPowerSaveParameters.SentMulticastPackets =
+ adapterPowerSave.AutoPowerSaveParameters.ReceivedUnicastPackets =
adapterPowerSave.AutoPowerSaveParameters.SentUnicastPacket = 0;
-
+
ndisStatus = GenerateWdiGetAutoPowerSave(
//pAdapterCapabilities,
&adapterPowerSave,
@@ -3495,7 +3495,7 @@ Wdi_Get_Auto_Power_Save(
return ndisStatus;
}
- if (pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength >=
+ if (pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength >=
(length + sizeof(WDI_MESSAGE_HEADER)))
{
PlatformMoveMemory(
@@ -3508,9 +3508,9 @@ Wdi_Get_Auto_Power_Save(
{
ndisStatus = NDIS_STATUS_BUFFER_TOO_SHORT;
pOidHandle->pNdisRequest->DATA.METHOD_INFORMATION.BytesNeeded += (length + sizeof(WDI_MESSAGE_HEADER));
- RT_TRACE(COMP_INIT, DBG_WARNING, ("[Error] GenerateWdiGetAdapterCapabilities() failed with status(%x)\n", ndisStatus));
+ RT_TRACE(COMP_INIT, DBG_WARNING, ("[Error] GenerateWdiGetAdapterCapabilities() failed with status(%x)\n", ndisStatus));
}
-
+
if(pOutput)
{
FreeGenerated(pOutput);
@@ -3518,7 +3518,7 @@ Wdi_Get_Auto_Power_Save(
}
pOidHeader->Status = ndisStatus;
-
+
return ndisStatus;
}
@@ -3532,10 +3532,10 @@ Wdi_IHV_Request(
PTLV_WDI_STRUCT pTlvData = NULL;
ULONG BytesWritten = 0, BytesRead = 0, BytesNeeded = 0;
PNDIS_OID_REQUEST pNdisRequest = pOidHandle->pNdisRequest;
- PWDI_MESSAGE_HEADER pWdiHeader
+ PWDI_MESSAGE_HEADER pWdiHeader
= (PWDI_MESSAGE_HEADER)pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
//20150915-KenSun
-//Temp Workaround for setting a private OID
+//Temp Workaround for setting a private OID
#if 1
PCCX_NIC_SPECIFIC_EXTENSION ccxData;
PIHV_CCX_TLV pTlv = NULL;
@@ -3589,9 +3589,9 @@ Wdi_IHV_Request(
//Because WDI would always pass 2046 in pNdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength
//which is not the same value that passed in RTK Appilcations. (All RTK appilcation pass 0 outputbufferlength when issuing a SET OID request)
//Therefore, we cannot use it as refence.
-//For interfacing with WDI, we have to make sure BytesWriiten is sizeof(WDI_MESSAGE_HEADER) when dealing with a SET method request.
+//For interfacing with WDI, we have to make sure BytesWriiten is sizeof(WDI_MESSAGE_HEADER) when dealing with a SET method request.
//
-#if 1
+#if 1
ccxData = (PCCX_NIC_SPECIFIC_EXTENSION)pTlvData->Value;
if(ccxData->event == CCX_EVENT_OID)
{
@@ -3631,7 +3631,7 @@ Wdi_Get_Statistics(
WDI_MAC_STATISTICS_CONTAINER MacStatistics[2];
WDI_PHY_STATISTICS_CONTAINER PhyStatistics[WDI_802_11_MAX_NUM_PHY_TYPES];
PNDIS_OID_REQUEST pNdisRequest = pOidHandle->pNdisRequest;
- PWDI_MESSAGE_HEADER pOidHeader
+ PWDI_MESSAGE_HEADER pOidHeader
= (PWDI_MESSAGE_HEADER)pNdisRequest->DATA.METHOD_INFORMATION.InformationBuffer;
FunctionIn(COMP_OID_QUERY);
@@ -3652,7 +3652,7 @@ Wdi_Get_Statistics(
MacStatistics[0].CCMPFormatErrors = pAdapter->RxStats.NumRxCCMPDecryptErrorsUnicast;
MacStatistics[0].CCMPReplays = pAdapter->RxStats.NumRxCCMPReplayUnicast;
MacStatistics[0].CCMPDecryptErrors = pAdapter->RxStats.NumRxCCMPDecryptErrorsUnicast;
- MacStatistics[0].WEPUndecryptableCount = pAdapter->RxStats.NumRxWEPUndecryptableUnicast;
+ MacStatistics[0].WEPUndecryptableCount = pAdapter->RxStats.NumRxWEPUndecryptableUnicast;
MacStatistics[0].WEPICVErrorCount = pAdapter->RxStats.NumRxWEPICVErrorUnicast;
MacStatistics[0].DecryptSuccessCount = pAdapter->RxStats.NumRxDecryptSuccessUnicast;
MacStatistics[0].DecryptFailureCount = pAdapter->RxStats.NumRxDecryptFailureUnicast;
@@ -3668,11 +3668,11 @@ Wdi_Get_Statistics(
MacStatistics[1].CCMPFormatErrors = pAdapter->RxStats.NumRxCCMPDecryptErrorsMulticast + pAdapter->RxStats.NumRxCCMPDecryptErrorsBroadcast;
MacStatistics[1].CCMPReplays = pAdapter->RxStats.NumRxCCMPReplayMulticast;
MacStatistics[1].CCMPDecryptErrors = pAdapter->RxStats.NumRxCCMPDecryptErrorsMulticast + pAdapter->RxStats.NumRxCCMPDecryptErrorsBroadcast;
- MacStatistics[1].WEPUndecryptableCount = pAdapter->RxStats.NumRxWEPUndecryptableMulticast + pAdapter->RxStats.NumRxWEPUndecryptableBroadcast;
+ MacStatistics[1].WEPUndecryptableCount = pAdapter->RxStats.NumRxWEPUndecryptableMulticast + pAdapter->RxStats.NumRxWEPUndecryptableBroadcast;
MacStatistics[1].WEPICVErrorCount = pAdapter->RxStats.NumRxWEPICVErrorMulticast + pAdapter->RxStats.NumRxWEPICVErrorBroadcast;
MacStatistics[1].DecryptSuccessCount = pAdapter->RxStats.NumRxDecryptSuccessMulticast + pAdapter->RxStats.NumRxDecryptSuccessBroadcast;
MacStatistics[1].DecryptFailureCount = pAdapter->RxStats.NumRxDecryptFailureMulticast + pAdapter->RxStats.NumRxDecryptFailureBroadcast;
-
+
Params.PeerMACStatistics.ElementCount = 2;
Params.PeerMACStatistics.pElements = MacStatistics;
@@ -3704,24 +3704,24 @@ Wdi_Get_Statistics(
PhyStatistics[0].PhyType = WDI_PHY_TYPE_VHT;
break;
-
+
}
PhyStatistics[0].TransmittedFrameCount = pAdapter->TxStats.NumTxOkTotal;
PhyStatistics[0].GroupTransmittedFrameCount = pAdapter->TxStats.NumTxMulticast + pAdapter->TxStats.NumTxBroadcast;
- PhyStatistics[0].FailedCount = pAdapter->TxStats.NumTxErrTotal;
- PhyStatistics[0].RetryCount = pAdapter->TxStats.NumTxRetryCount;
+ PhyStatistics[0].FailedCount = pAdapter->TxStats.NumTxErrTotal;
+ PhyStatistics[0].RetryCount = pAdapter->TxStats.NumTxRetryCount;
PhyStatistics[0].MultipleRetryCount = 0; // TODO
PhyStatistics[0].MaxTXLifetimeExceededCount = 0; // TODO
- PhyStatistics[0].TransmittedFragmentCount = pAdapter->TxStats.NumTxOkTotal;
+ PhyStatistics[0].TransmittedFragmentCount = pAdapter->TxStats.NumTxOkTotal;
PhyStatistics[0].RTSSuccessCount = 0; // TODO
PhyStatistics[0].RTSFailureCount = 0; // TODO
PhyStatistics[0].ACKFailureCount = 0; // TODO
PhyStatistics[0].ReceivedFrameCount = pAdapter->RxStats.NumRxFramgment;
- PhyStatistics[0].GroupReceivedFrameCount = pAdapter->RxStats.NumRxFramgment;
+ PhyStatistics[0].GroupReceivedFrameCount = pAdapter->RxStats.NumRxFramgment;
PhyStatistics[0].PromiscuousReceivedFrameCount = 0; // TODO
PhyStatistics[0].MaxRXLifetimeExceededCount = 0; // TODO
PhyStatistics[0].FrameDuplicateCount = 0; // TODO
- PhyStatistics[0].ReceivedFragmentCount = pAdapter->RxStats.NumRxFramgment;
+ PhyStatistics[0].ReceivedFragmentCount = pAdapter->RxStats.NumRxFramgment;
PhyStatistics[0].PromiscuousReceivedFragmentCount = 0; // TODO
PhyStatistics[0].FCSErrorCount = pAdapter->RxStats.NumRxErrTotalUnicast + pAdapter->RxStats.NumRxErrTotalMulticast;
Params.PhyStatistics.ElementCount = 1;
@@ -3730,7 +3730,7 @@ Wdi_Get_Statistics(
else
{
u1Byte count = 0;
-
+
PlatformZeroMemory(&MacStatistics[0], sizeof(WDI_MAC_STATISTICS_CONTAINER)*2);
cpMacAddr(MacStatistics[0].MACAddress.Address, BroadcastAddress);
Params.PeerMACStatistics.ElementCount = 1;
@@ -3761,7 +3761,7 @@ Wdi_Get_Statistics(
return ndisStatus;
}
- if (pNdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength >=
+ if (pNdisRequest->DATA.METHOD_INFORMATION.OutputBufferLength >=
(length + sizeof(WDI_MESSAGE_HEADER)))
{
PlatformMoveMemory(
@@ -3774,9 +3774,9 @@ Wdi_Get_Statistics(
{
ndisStatus = NDIS_STATUS_BUFFER_TOO_SHORT;
pNdisRequest->DATA.METHOD_INFORMATION.BytesNeeded += (length + sizeof(WDI_MESSAGE_HEADER));
- RT_TRACE(COMP_INIT, DBG_WARNING, ("[Error] GenerateWdiGetStatistics() failed with status(%x)\n", ndisStatus));
+ RT_TRACE(COMP_INIT, DBG_WARNING, ("[Error] GenerateWdiGetStatistics() failed with status(%x)\n", ndisStatus));
}
-
+
if(pOutput)
{
FreeGenerated(pOutput);
@@ -3784,9 +3784,9 @@ Wdi_Get_Statistics(
}
pOidHeader->Status = ndisStatus;
-
+
FunctionOut(COMP_OID_QUERY);
-
+
return ndisStatus;
}
@@ -3798,7 +3798,7 @@ WDI_OID_TASK_OPEN(
)
{
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
-
+
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Not Support WDI_OID_TASK_OPEN\n"));
return ndisStatus;
@@ -3813,7 +3813,7 @@ WDI_OID_TASK_CLOSE(
{
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
-
+
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("Not Support WDI_OID_TASK_CLOSE\n"));
return ndisStatus;
@@ -3837,7 +3837,7 @@ WDI_OID_TASK_P2P_DISCOVER(
{
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
WDI_TASK_P2P_DISCOVER_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramP2pDiscover;
-
+
FunctionIn(COMP_OID_SET);
do
@@ -3846,7 +3846,7 @@ WDI_OID_TASK_P2P_DISCOVER(
P2P_INFO *info = GET_P2P_INFO(pAdapter);
FRAME_BUF *buf = NULL;
-
+
// additional ie
if(param->Optional.VendorIEs_IsPresent)
{
@@ -3856,20 +3856,20 @@ WDI_OID_TASK_P2P_DISCOVER(
);
}
- RT_TRACE_F(COMP_P2P, DBG_LOUD, ("DiscoveryType = %d, ScanType = %d\n",
+ RT_TRACE_F(COMP_P2P, DBG_LOUD, ("DiscoveryType = %d, ScanType = %d\n",
param->DiscoverMode.DiscoveryType, param->DiscoverMode.ScanType));
// construct req
if(NULL != (req = CustomScan_AllocReq(GET_CUSTOM_SCAN_INFO(pAdapter), NULL, NULL)))
{
static u1Byte bcst[6] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
-
+
buf = CustomScan_GetProbeReqBuf(req);
if(param->SSIDList.ElementCount)
{
WDI_SSID *ssid = &param->SSIDList.pElements[0];
-
+
RT_PRINT_STR(COMP_OID_SET, DBG_LOUD, "to probe with ssid", ssid->pElements, ssid->ElementCount);
P2P_Construct_ProbeReqEx(buf, info, bcst, (u1Byte)ssid->ElementCount, (u1Byte *)ssid->pElements);
}
@@ -3892,10 +3892,10 @@ WDI_OID_TASK_P2P_DISCOVER(
if(WDI_P2P_SCAN_TYPE_PASSIVE == param->DiscoverMode.ScanType)
CustomScan_ForcePassiveScan(req);
-
+
CustomScan_SetTimeBound(req, param->DwellTime.MaximumScanTime);
CustomScan_SetupCbCtx(req, wdi_P2PDiscoveryCb, pAdapter);
-
+
CustomScan_IssueReq(GET_CUSTOM_SCAN_INFO(pAdapter), req, CUSTOM_SCAN_SRC_TYPE_P2P, "wdi-p2p-discovery");
}
}while(FALSE);
@@ -3936,7 +3936,7 @@ WDI_OID_TASK_DOT11_RESET(
WDI_TASK_DOT11_RESET_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramDot11Reset;
NDIS_OID_REQUEST *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
do
@@ -3959,7 +3959,7 @@ WDI_OID_TASK_DOT11_RESET(
N63CResetNetworkListOffload(pAdapter);
- // MAC Address Randomization
+ // MAC Address Randomization
if(param->Optional.ResetMACAddress_IsPresent && pAdapter->MgntInfo.RegSupportMACRandom)
{
cpMacAddr( pAdapter->CurrentAddress, param->ResetMACAddress.Address);
@@ -3968,7 +3968,7 @@ WDI_OID_TASK_DOT11_RESET(
}
// cleanup
- if(req && NDIS_STATUS_SUCCESS != status)
+ if(req && NDIS_STATUS_SUCCESS != status)
Wdi_Xlat_FreeOid(req);
FunctionOut(COMP_OID_SET);
@@ -3996,7 +3996,7 @@ WDI_OID_TASK_P2P_SEND_REQUEST_ACTION_FRAME(
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
WDI_TASK_P2P_SEND_REQUEST_ACTION_FRAME_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramP2pSendRequestActionFrame;
VOID *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
do
@@ -4026,7 +4026,7 @@ WDI_OID_TASK_P2P_SEND_REQUEST_ACTION_FRAME(
break;
}
}while(FALSE);
-
+
FunctionOut(COMP_OID_SET);
return status;
@@ -4042,12 +4042,12 @@ WDI_OID_TASK_P2P_SEND_RESPONSE_ACTION_FRAME(
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
WDI_TASK_P2P_SEND_RESPONSE_ACTION_FRAME_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramP2pSendResponseActionFrame;
VOID *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
do
{
- // termincate any ongoing scan for sending rsp
+ // termincate any ongoing scan for sending rsp
WDI_SendAction_TerminateReq(pAdapter);
if(WDI_P2P_ACTION_FRAME_GO_NEGOTIATION_RESPONSE == param->ResponseParams.ResponseFrameType)
@@ -4079,7 +4079,7 @@ WDI_OID_TASK_P2P_SEND_RESPONSE_ACTION_FRAME(
break;
}
}while(FALSE);
-
+
FunctionOut(COMP_OID_SET);
return status;
@@ -4103,7 +4103,7 @@ WDI_OID_TASK_CREATE_PORT(
{
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PORT_HELPER *pPortHelper = pAdapter->pPortCommonInfo->pPortHelper;
-
+
status = Wdi_Task_CreatePort(pAdapter, pOidHandle);
if(NDIS_STATUS_PENDING == status)
@@ -4113,7 +4113,7 @@ WDI_OID_TASK_CREATE_PORT(
PlatformReleaseSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK);
status = NDIS_STATUS_SUCCESS;
}
-
+
return status;
}
@@ -4128,7 +4128,7 @@ WDI_OID_TASK_DELETE_PORT(
PORT_HELPER *pPortHelper = pAdapter->pPortCommonInfo->pPortHelper;
status = Wdi_Task_DeletePort(pAdapter, pOidHandle);
-
+
if(NDIS_STATUS_PENDING == status)
{// WDI always return success regardless of our status here, so we need to record pended req here
PlatformAcquireSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK);
@@ -4151,7 +4151,7 @@ WDI_OID_TASK_START_AP(
WDI_TASK_START_AP_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramStartAp;
NDIS_OID_REQUEST *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
do
@@ -4171,7 +4171,7 @@ WDI_OID_TASK_START_AP(
Wdi_Xlat_FreeOid(req);
req = NULL;
-
+
// Start AP
if(NULL == (req = Wdi_Xlat_AllocStartApReqOid(pOidHandle, param)))
{
@@ -4187,13 +4187,13 @@ WDI_OID_TASK_START_AP(
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("N63C_OID_DOT11_WFD_START_GO_REQUEST returns: 0x%08X\n", status));
break;
}
-
+
}while(FALSE);
// M4 indication is not required since bWaitComplete in RT_SUPPORT_TASKs is FALSE
// cleanup
- if(req)
+ if(req)
Wdi_Xlat_FreeOid(req);
FunctionOut(COMP_OID_SET);
@@ -4209,17 +4209,17 @@ WDI_OID_TASK_STOP_AP(
)
{
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
-
+
FunctionIn(COMP_OID_SET);
if(RT_AP_TYPE_VWIFI_AP == MgntActQuery_ApType(pAdapter))
{
status = N6CSet_DOT11_DISCONNECT_REQUEST(pAdapter, NULL, 0, 0, 0);
-
+
if(NDIS_STATUS_SUCCESS != status)
{
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("N6CSet_DOT11_DISCONNECT_REQUEST returns: 0x%08X\n", status));
- }
+ }
}
else
{
@@ -4242,14 +4242,14 @@ WDI_OID_TASK_SEND_AP_ASSOCIATION_RESPONSE(
WDI_TASK_SEND_AP_ASSOCIATION_RESPONSE_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramSendApAssociationResponse;
NDIS_OID_REQUEST *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
do
{
MGNT_INFO *pMgntInfo = NULL;
RT_WLAN_STA *pEntry = NULL;
-
+
pMgntInfo = &pAdapter->MgntInfo;
if(NULL == (req = Wdi_Xlat_AllocIncomingAssociationDecisionOid(pOidHandle, param)))
@@ -4263,7 +4263,7 @@ WDI_OID_TASK_SEND_AP_ASSOCIATION_RESPONSE(
status = NDIS_STATUS_INVALID_STATE;
break;
}
-
+
if(NDIS_STATUS_SUCCESS != (status = N62C_OID_DOT11_INCOMING_ASSOCIATION_DECISION(pAdapter, req)))
{
RT_TRACE_F(COMP_MLME, DBG_WARNING, ("N62C_OID_DOT11_INCOMING_ASSOCIATION_DECISION returns: 0x%08X\n", status));
@@ -4273,21 +4273,21 @@ WDI_OID_TASK_SEND_AP_ASSOCIATION_RESPONSE(
pOidHandle->pvCtx = req;
AP_SendAsocRsp(
- pAdapter,
- pEntry,
- TRUE == param->IncomingRequestInfo.AssocRequestParams.IsReassociationRequest,
- FALSE,
+ pAdapter,
+ pEntry,
+ TRUE == param->IncomingRequestInfo.AssocRequestParams.IsReassociationRequest,
+ FALSE,
param->AssocResponseParameters.ReasonCode
);
// If succeeded, WDI_CMD_SendApAssociationResponseComplete is called from DrvIFIndicateIncommingAssociationComplete
-
+
}while(FALSE);
// cleanup
if(NDIS_STATUS_SUCCESS != status)
{
- if(req)
+ if(req)
Wdi_Xlat_FreeOid(req);
}
@@ -4299,7 +4299,7 @@ WDI_OID_TASK_SEND_AP_ASSOCIATION_RESPONSE(
NDIS_STATUS
-WDI_OID_TASK_CHANGE_OPERATION_MODE(
+WDI_OID_TASK_CHANGE_OPERATION_MODE(
IN PADAPTER pAdapter,
IN PRT_OID_HANDLER pOidHandle
)
@@ -4308,7 +4308,7 @@ WDI_OID_TASK_CHANGE_OPERATION_MODE(
WDI_TASK_CHANGE_OPERATION_MODE_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramChangeOperationMode;
NDIS_OID_REQUEST *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
do
@@ -4318,7 +4318,7 @@ WDI_OID_TASK_CHANGE_OPERATION_MODE(
status = NDIS_STATUS_RESOURCES;
break;
}
-
+
if(NDIS_STATUS_SUCCESS != (status = N6C_OID_DOT11_CURRENT_OPERATION_MODE(pAdapter, req)))
{
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("N6C_OID_DOT11_CURRENT_OPERATION_MODE returns: 0x%08X\n", status));
@@ -4327,11 +4327,11 @@ WDI_OID_TASK_CHANGE_OPERATION_MODE(
// Indicate completed successfully
WDI_CMD_ChangeOpModeComplete(pAdapter, req, status);
-
+
}while(FALSE);
// cleanup
- if(req && NDIS_STATUS_SUCCESS != status)
+ if(req && NDIS_STATUS_SUCCESS != status)
Wdi_Xlat_FreeOid(req);
FunctionOut(COMP_OID_SET);
@@ -4348,9 +4348,9 @@ WDI_OID_TASK_SEND_REQUEST_ACTION_FRAME(
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
WDI_TASK_SEND_REQUEST_ACTION_FRAME_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramSendRequestActionFrame;
VOID *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
-
+
do
{
req = WDI_SendAction_Req(pAdapter, param, wdi_SendReqActionFrameStateCb);
@@ -4361,7 +4361,7 @@ WDI_OID_TASK_SEND_REQUEST_ACTION_FRAME(
status = NDIS_STATUS_FAILURE;
}
}while(FALSE);
-
+
FunctionOut(COMP_OID_SET);
return status;
@@ -4376,7 +4376,7 @@ WDI_OID_TASK_SEND_RESPONSE_ACTION_FRAME(
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
WDI_TASK_SEND_RESPONSE_ACTION_FRAME_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramSendResponseActionFrame;
VOID *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
do
@@ -4389,7 +4389,7 @@ WDI_OID_TASK_SEND_RESPONSE_ACTION_FRAME(
status = NDIS_STATUS_FAILURE;
}
}while(FALSE);
-
+
FunctionOut(COMP_OID_SET);
return status;
@@ -4404,7 +4404,7 @@ WDI_OID_SET_P2P_LISTEN_STATE(
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
WDI_SET_P2P_LISTEN_STATE_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramSetP2pListenState;
NDIS_OID_REQUEST *req = NULL;
-
+
FunctionIn(COMP_OID_SET);
if( param == NULL )
@@ -4453,7 +4453,7 @@ WDI_OID_SET_P2P_LISTEN_STATE(
// TODO:
}while(FALSE);
- if(req)
+ if(req)
Wdi_Xlat_FreeOid(req);
FunctionOut(COMP_OID_SET);
@@ -4518,7 +4518,7 @@ WDI_OID_GET_AUTO_POWER_SAVE(
)
{
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
-
+
return Wdi_Get_Auto_Power_Save(pAdapter, pOidHandle);
}
@@ -4539,7 +4539,7 @@ WDI_OID_GET_ADAPTER_CAPABILITIES(
)
{
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
-
+
ndisStatus = N6SdioWdi_AdapterCapabilities(
pAdapter,
pOidHandle
@@ -4688,7 +4688,7 @@ WDI_OID_SET_ADVERTISEMENT_INFORMATION(
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
WDI_SET_ADVERTISEMENT_INFORMATION_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramSetAdvertisementInformation;
NDIS_OID_REQUEST *req = NULL;
-
+
if( param == NULL )
return NDIS_STATUS_FAILURE;
@@ -4706,8 +4706,8 @@ WDI_OID_SET_ADVERTISEMENT_INFORMATION(
if(param->AdditionalIEs.AdditionalBeaconIEs.ElementCount)
{
P2P_AddIe_Set(
- &info->AdditionalIEs, P2P_ADD_IE_BEACON,
- param->AdditionalIEs.AdditionalBeaconIEs.ElementCount,
+ &info->AdditionalIEs, P2P_ADD_IE_BEACON,
+ param->AdditionalIEs.AdditionalBeaconIEs.ElementCount,
param->AdditionalIEs.AdditionalBeaconIEs.pElements);
RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "WDI_OID_SET_ADVERTISEMENT_INFORMATION(): AdditionalBeaconIEs\n",
param->AdditionalIEs.AdditionalBeaconIEs.pElements, param->AdditionalIEs.AdditionalBeaconIEs.ElementCount);
@@ -4716,8 +4716,8 @@ WDI_OID_SET_ADVERTISEMENT_INFORMATION(
if(param->AdditionalIEs.AdditionalProbeResponseIEs.ElementCount)
{
P2P_AddIe_Set(
- &info->AdditionalIEs, P2P_ADD_IE_PROBE_RESPONSE,
- param->AdditionalIEs.AdditionalProbeResponseIEs.ElementCount,
+ &info->AdditionalIEs, P2P_ADD_IE_PROBE_RESPONSE,
+ param->AdditionalIEs.AdditionalProbeResponseIEs.ElementCount,
param->AdditionalIEs.AdditionalProbeResponseIEs.pElements);
RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "WDI_OID_SET_ADVERTISEMENT_INFORMATION(): AdditionalProbeResponseIEs\n",
param->AdditionalIEs.AdditionalProbeResponseIEs.pElements, param->AdditionalIEs.AdditionalProbeResponseIEs.ElementCount);
@@ -4728,14 +4728,14 @@ WDI_OID_SET_ADVERTISEMENT_INFORMATION(
if(param->AdditionalIEs.AdditionalProbeRequestDefaultIEs.ElementCount)
{
P2P_AddIe_Set(
- &info->AdditionalIEs, P2P_ADD_IE_DEFAULT_REQUEST,
- param->AdditionalIEs.AdditionalProbeRequestDefaultIEs.ElementCount,
+ &info->AdditionalIEs, P2P_ADD_IE_DEFAULT_REQUEST,
+ param->AdditionalIEs.AdditionalProbeRequestDefaultIEs.ElementCount,
param->AdditionalIEs.AdditionalProbeRequestDefaultIEs.pElements);
RT_PRINT_DATA(COMP_P2P, DBG_LOUD, "WDI_OID_SET_ADVERTISEMENT_INFORMATION(): AdditionalProbeRequestDefaultIEs\n",
param->AdditionalIEs.AdditionalProbeRequestDefaultIEs.pElements, param->AdditionalIEs.AdditionalProbeRequestDefaultIEs.ElementCount);
}
}
-
+
// device info
if(param->Optional.DeviceInformation_IsPresent)
{
@@ -4753,7 +4753,7 @@ WDI_OID_SET_ADVERTISEMENT_INFORMATION(
Wdi_Xlat_FreeOid(req);
req = NULL;
}
-
+
// dev cap
if(param->Optional.DeviceCapability_IsPresent)
{
@@ -4807,12 +4807,12 @@ WDI_OID_SET_ADVERTISEMENT_INFORMATION(
Wdi_Xlat_FreeOid(req);
req = NULL;
}
-
+
// TODO: adv svc
}while(FALSE);
- if(req)
+ if(req)
Wdi_Xlat_FreeOid(req);
FunctionOut(COMP_OID_SET);
@@ -4845,7 +4845,7 @@ WDI_OID_GET_NEXT_ACTION_FRAME_DIALOG_TOKEN(
ULONG tlvlen = 0;
UINT8 *tlv = NULL;
-
+
FunctionIn(COMP_OID_SET);
do
@@ -4887,7 +4887,7 @@ WDI_OID_GET_NEXT_ACTION_FRAME_DIALOG_TOKEN(
}
GenerateWdiGetNextActionFrameDialogToken(
- &param, 0,
+ &param, 0,
&pAdapter->pPortCommonInfo->WdiData.TlvContext,
&tlvlen, &tlv);
@@ -4903,11 +4903,11 @@ WDI_OID_GET_NEXT_ACTION_FRAME_DIALOG_TOKEN(
tlv, tlvlen);
pNdisRequest->DATA.METHOD_INFORMATION.BytesWritten += tlvlen;
-
+
}while(FALSE);
// cleanup;
- if(req)
+ if(req)
Wdi_Xlat_FreeOid(req);
if(tlv)
@@ -4929,7 +4929,7 @@ WDI_OID_SET_P2P_WPS_ENABLED(
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
WDI_SET_P2P_WPS_ENABLED_PARAMETERS *param = pOidHandle->tlvParser.parsedTlv.paramSetP2pWpsEnabled;
NDIS_OID_REQUEST *req = NULL;
-
+
if( param == NULL )
return NDIS_STATUS_FAILURE;
@@ -4945,10 +4945,10 @@ WDI_OID_SET_P2P_WPS_ENABLED(
RT_TRACE_F(COMP_OID_SET, DBG_WARNING, ("N62C_OID_DOT11_WPS_ENABLED returns: 0x%08X\n", status));
break;
}
-
+
}while(FALSE);
- if(req)
+ if(req)
Wdi_Xlat_FreeOid(req);
FunctionOut(COMP_OID_SET);
@@ -4985,7 +4985,7 @@ WDI_OID_SET_FAST_BSS_TRANSITION_PARAMETERS(
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
WDI_SET_FAST_BSS_TRANSITION_PARAMETERS_COMMAND *param = pOidHandle->tlvParser.parsedTlv.paramSetFastBssTransitionParametersCommand;
u1Byte targetAddr[6] = {0};
-
+
if( param == NULL )
return NDIS_STATUS_FAILURE;
@@ -5008,7 +5008,7 @@ WDI_OID_SET_FAST_BSS_TRANSITION_PARAMETERS(
RT_PRINT_DATA(COMP_MLME, DBG_LOUD, "RSNIE:\n",
param->RSNIE.pElements, param->RSNIE.ElementCount);
}
-
+
if(param->Optional.MDE_IsPresent)
{
FtUpdateEntryInfo(pAdapter, FT_ENTRY_ACTION_UPDATE_MDE, targetAddr,
@@ -5048,8 +5048,8 @@ WDI_OID_SET_FAST_BSS_TRANSITION_PARAMETERS(
//
// Description:
// Prepare indication data for WDI create port.
-// Also add data path (via AddDataPathPeer()) as
-// it was copied from the original code in
+// Also add data path (via AddDataPathPeer()) as
+// it was copied from the original code in
// WdiSimpleTask().
//
// Note:
@@ -5066,12 +5066,12 @@ WDI_CMD_CreatePortComplete(
{
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
DOT11_MAC_INFO *macInfo = NULL;
-
+
UINT8 *tlv = NULL;
ULONG len = 0;
WDI_INDICATION_CREATE_PORT_COMPLETE_PARAMETERS param = {0};
-
+
macInfo = (DOT11_MAC_INFO *)req->DATA.METHOD_INFORMATION.InformationBuffer;
FunctionIn(COMP_OID_SET);
@@ -5108,7 +5108,7 @@ WDI_CMD_CreatePortComplete(
PlatformAcquireSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK);
pAdapter->pNdisCommon->PendedRequest = NULL;
PlatformReleaseSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK);
-
+
FunctionOut(COMP_OID_SET);
return TRUE;
@@ -5122,7 +5122,7 @@ WDI_CMD_DeletePortComplete(
)
{
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
-
+
UINT8 *tlv = NULL;
ULONG len = 0;
@@ -5149,7 +5149,7 @@ WDI_CMD_DeletePortComplete(
// Free pended oid
PlatformAcquireSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK);
pAdapter->pNdisCommon->PendedRequest = NULL;
- PlatformReleaseSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK);
+ PlatformReleaseSpinLock(pAdapter, RT_PENDED_OID_SPINLOCK);
FunctionOut(COMP_OID_SET);
@@ -5164,7 +5164,7 @@ WDI_CMD_ResetComplete(
)
{
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
-
+
UINT8 *tlv = NULL;
ULONG len = 0;
@@ -5177,7 +5177,7 @@ WDI_CMD_ResetComplete(
// generate TLV
//GenerateWdiIndicationDot11ResetComplete(&param, 0, &pAdapter->pPortCommonInfo->WdiData.TlvContext, &len, &tlv);
-
+
// copy tlv
wdi_task_WriteResult(hTask, tlv, len, status);
@@ -5201,7 +5201,7 @@ WDI_CMD_ChangeOpModeComplete(
)
{
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
-
+
UINT8 *tlv = NULL;
ULONG len = 0;
@@ -5237,7 +5237,7 @@ WDI_CMD_P2PDiscoverComplete(
)
{
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
-
+
UINT8 *tlv = NULL;
ULONG len = 0;
@@ -5255,7 +5255,7 @@ WDI_CMD_P2PDiscoverComplete(
// generate TLV
//GenerateWdiIndicationDot11ResetComplete(&param, 0, &pAdapter->pPortCommonInfo->WdiData.TlvContext, &len, &tlv);
-
+
// copy tlv
wdi_task_WriteResult(hTask, tlv, len, status);
@@ -5278,10 +5278,10 @@ WDI_CMD_P2pSendRequestActionFrameComplete(
{
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
OFF_CHNL_TX_STATUS_FLAG txStatusFlag;
-
+
u4Byte ieOffset = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS;
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
-
+
UINT8 *tlv = NULL;
ULONG len = 0;
@@ -5300,7 +5300,7 @@ WDI_CMD_P2pSendRequestActionFrameComplete(
FRAME_BUF *buf = OffChnlTx_GetTxFrameBuf(ctx->req);
RT_ASSERT(buf, ("%s(): buf is NULL!!!n", __FUNCTION__));
-
+
cpMacAddr(param.SendActionFrameResult.FrameParameters.PeerDeviceAddress.Address, (FrameBuf_Head(buf) + FRAME_OFFSET_ADDRESS1));
param.SendActionFrameResult.FrameParameters.DialogToken = ctx->token;
param.SendActionFrameResult.FrameIEs.ElementCount = FrameBuf_Length(buf) - ieOffset;
@@ -5308,13 +5308,13 @@ WDI_CMD_P2pSendRequestActionFrameComplete(
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("token: %u\n", param.SendActionFrameResult.FrameParameters.DialogToken));
}
-
+
// generate TLV
GenerateWdiIndicationP2pSendRequestActionFrameComplete(
- &param, 0,
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param, 0,
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&len, &tlv);
-
+
// copy tlv
wdi_task_WriteResult(hTask, tlv, len, status);
@@ -5337,10 +5337,10 @@ WDI_CMD_P2pSendResponseActionFrameComplete(
{
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
OFF_CHNL_TX_STATUS_FLAG txStatusFlag;
-
+
u4Byte ieOffset = FRAME_OFFSET_P2P_PUB_ACT_ELEMENTS;
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
-
+
UINT8 *tlv = NULL;
ULONG len = 0;
@@ -5351,13 +5351,13 @@ WDI_CMD_P2pSendResponseActionFrameComplete(
status = (TEST_FLAG(txStatusFlag.perTxAttemptFlag, OFF_CHNL_TX_PER_TX_ATTEMPT_FLAG_FRAME_SENT) ? NDIS_STATUS_SUCCESS : NDIS_STATUS_FAILURE);
FunctionIn(COMP_OID_SET);
-
+
if(NDIS_STATUS_SUCCESS == status)
{
FRAME_BUF *buf = OffChnlTx_GetTxFrameBuf(ctx->req);
RT_ASSERT(buf, ("%s(): buf is NULL!!!n", __FUNCTION__));
-
+
cpMacAddr(param.SendActionFrameResult.FrameParameters.PeerDeviceAddress.Address, (FrameBuf_Head(buf) + FRAME_OFFSET_ADDRESS1));
param.SendActionFrameResult.FrameParameters.DialogToken = ctx->token;
param.SendActionFrameResult.FrameIEs.ElementCount = FrameBuf_Length(buf) - ieOffset;
@@ -5365,13 +5365,13 @@ WDI_CMD_P2pSendResponseActionFrameComplete(
RT_TRACE_F(COMP_OID_SET, DBG_LOUD, ("token: %u\n", param.SendActionFrameResult.FrameParameters.DialogToken));
}
-
+
// generate TLV
GenerateWdiIndicationP2pSendResponseActionFrameComplete(
- &param, 0,
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param, 0,
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&len, &tlv);
-
+
// copy tlv
wdi_task_WriteResult(hTask, tlv, len, status);
@@ -5391,11 +5391,11 @@ WDI_CMD_SendReqActionFrameComplete(
IN PADAPTER pAdapter,
IN const WDI_SEND_ACTION_CTX *ctx
)
-{
+{
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
OFF_CHNL_TX_STATUS_FLAG txStatusFlag = {0};
-
+
UINT8 *tlv = NULL;
ULONG len = 0;
@@ -5413,13 +5413,13 @@ WDI_CMD_SendReqActionFrameComplete(
{
RT_TRACE(COMP_MLME, DBG_WARNING, ("Action Req frame send failure.\n"));
}
-
+
#if 0
//GenerateWdiIndicationSendRequestActionFrameComplete(
- // &param, 0,
- // &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ // &param, 0,
+ // &pAdapter->pPortCommonInfo->WdiData.TlvContext,
// &len, &tlv);
-
+
wdi_task_WriteResult(hTask, tlv, len, status);
FreeGenerated(tlv);
@@ -5434,11 +5434,11 @@ WDI_CMD_SendRspActionFrameComplete(
IN PADAPTER pAdapter,
IN const WDI_SEND_ACTION_CTX *ctx
)
-{
+{
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
RT_OID_HANDLER *hTask = &pAdapter->pPortCommonInfo->WdiData.TaskHandle;
OFF_CHNL_TX_STATUS_FLAG txStatusFlag = {0};
-
+
UINT8 *tlv = NULL;
ULONG len = 0;
@@ -5453,13 +5453,13 @@ WDI_CMD_SendRspActionFrameComplete(
{
RT_TRACE(COMP_MLME, DBG_WARNING, ("Action Rsp frame send failure.\n"));
}
-
+
#if 0
GenerateWdiIndicationSendRequestActionFrameComplete(
- &param, 0,
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param, 0,
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&len, &tlv);
-
+
wdi_task_WriteResult(hTask, tlv, len, status);
FreeGenerated(tlv);
@@ -5487,11 +5487,13 @@ WDI_CMD_SendApAssociationResponseComplete(
FunctionIn(COMP_MLME);
// prepare structure, ref N62CAPIndicateIncomAssocComplete
+#if !defined(NTDDI_WIN10_RS3)
param.Optional.ActivePhyList_IsPresent = FALSE;
+#endif
cpMacAddr(param.AssocResponseResult.PeerMACAddress.Address, sta->MacAddr);
- param.AssocResponseResult.IsReassociationRequest =
+ param.AssocResponseResult.IsReassociationRequest =
Type_Reasoc_Rsp == GET_80211_HDR_TYPE(sta->AP_SendAsocResp) ? TRUE : FALSE;
- param.AssocResponseResult.IsReAssociationResponse =
+ param.AssocResponseResult.IsReAssociationResponse =
param.AssocResponseResult.IsReassociationRequest;
if(RT_802_11AuthModeOpen == sta->AuthMode)
param.AssocResponseResult.AuthAlgorithm = WDI_AUTH_ALGO_80211_OPEN;
@@ -5509,7 +5511,7 @@ WDI_CMD_SendApAssociationResponseComplete(
param.AssocResponseResult.AuthAlgorithm = WDI_AUTH_ALGO_WPA_NONE;
else if(RT_802_11AuthModeWPA2PSK == sta->AuthMode)
param.AssocResponseResult.AuthAlgorithm = WDI_AUTH_ALGO_WPA_PSK;
- else
+ else
param.AssocResponseResult.AuthAlgorithm = WDI_AUTH_ALGO_80211_OPEN;
if(RT_ENC_ALG_NO_CIPHER == sta->perSTAKeyInfo.PairwiseCipherSuite[0])
@@ -5543,7 +5545,7 @@ WDI_CMD_SendApAssociationResponseComplete(
param.AssocResponseResult.UnicastCipherAlgorithm = WDI_CIPHER_ALGO_NONE;
param.AssocResponseFrame.ElementCount = MMPDU_BODY_LEN(sta->AP_SendAsocRespLength);
- param.AssocResponseFrame.pElements = MMPDU_BODY(sta->AP_SendAsocResp);
+ param.AssocResponseFrame.pElements = MMPDU_BODY(sta->AP_SendAsocResp);
if(pAdapter->MgntInfo.beaconframe.Length)
{
@@ -5555,13 +5557,13 @@ WDI_CMD_SendApAssociationResponseComplete(
param.BeaconIEs.ElementCount = 0;
param.BeaconIEs.pElements = NULL;
}
-
+
// generate TLV
GenerateWdiIndicationSendApAssociationResponseComplete(
- &param, 0,
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param, 0,
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&len, &tlv);
-
+
// copy tlv
wdi_task_WriteResult(hTask, tlv, len, status);
@@ -5569,7 +5571,7 @@ WDI_CMD_SendApAssociationResponseComplete(
FreeGenerated(tlv);
ndisStatus = WDI_AddDatapathPeer(pAdapter, sta->MacAddr);
-
+
// Free the OID
Wdi_Xlat_FreeOid(req);
@@ -5577,7 +5579,7 @@ WDI_CMD_SendApAssociationResponseComplete(
OidHandle_Complete(pAdapter, OIDHANDLE_TYPE_TASK);
if( ndisStatus != NDIS_STATUS_SUCCESS )
- {
+ {
RT_TRACE(COMP_MLME, DBG_WARNING, ("WDI_CMD_SendApAssociationResponseComplete: fail to create peer, so disconnect with this AP[%2x:%2x:%2x:%2x:%2x:%2x]\n", sta->MacAddr[0], sta->MacAddr[1], sta->MacAddr[2], sta->MacAddr[3], sta->MacAddr[4], sta->MacAddr[5]));
// 1. Send disassoc frame to the STA.
@@ -5612,7 +5614,7 @@ WDI_CMD_PreIndicateRxP2pActionFrameCb(
ADAPTER *pAdapter = pP2PInfo->pAdapter;
FunctionIn(COMP_OID_SET);
-
+
if(P2P_EVENT_RECEIVED_PROVISION_DISCOVERY_RESPONSE == EventID
|| P2P_EVENT_RECEIVED_INVITATION_RESPONSE == EventID
|| P2P_EVENT_RECEIVED_GO_NEGOTIATION_RESPONSE == EventID
@@ -5621,7 +5623,7 @@ WDI_CMD_PreIndicateRxP2pActionFrameCb(
{
WDI_SendAction_TerminateReq(pAdapter);
}
-
+
FunctionOut(COMP_OID_SET);
return;
@@ -5732,7 +5734,7 @@ WDI_CANCEL_OID_TASK_SEND_RESPONSE_ACTION_FRAME(
return NDIS_STATUS_SUCCESS;
}
-NDIS_STATUS
+NDIS_STATUS
WDI_PRE_M4_OID_TASK_SCAN(
IN PADAPTER pAdapter,
IN PRT_OID_HANDLER pOidHandle
diff --git a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.c b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.c
index 1b478b21..bfb1cce8 100644
--- a/network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.c
+++ b/network/wlan/WDI/PLATFORM/NDIS6/WDI_Common.c
@@ -24,7 +24,7 @@ wdi_UnsolicitedIndication(
NDIS_OID_REQUEST *req = NULL;
RT_TRACE(COMP_MLME, DBG_LOUD, ("==>wdi_UnsolicitedIndication(): status indication code = %x, length=%d\n", Indication, Length));
-
+
indic = (NDIS_STATUS_INDICATION *)pInput;
wdiHdr = (WDI_MESSAGE_HEADER *)(pInput + sizeof(*indic));
@@ -59,12 +59,12 @@ wdi_UnsolicitedIndication(
pAdapter->pNdisCommon->hNdisAdapter,
indic
);
-
+
RT_TRACE(COMP_MLME, DBG_LOUD, ("<== wdi_UnsolicitedIndication()\n"));
}
//
-// The following helper functions are used to determined if a
+// The following helper functions are used to determined if a
// BSS has the capability of specific wireless mode.
// 2005.01.13, by rcnjko.
//
@@ -106,7 +106,7 @@ WDIWithWirelessG(
{
return FALSE;
}
-
+
// Check supported rates.
for(i = 0; i < pRtBss->bdSupportRateEXLen; i++)
{
@@ -119,12 +119,12 @@ WDIWithWirelessG(
}
// Check if it contains ERP information element.
- // <NOTE> Some AP, WAG-302, will not always claim OFDM rates in their ProbeRsp or Beacon
+ // <NOTE> Some AP, WAG-302, will not always claim OFDM rates in their ProbeRsp or Beacon
// but it is in G mode. 2005.08.23, by rcnjko.
if(pRtBss->bERPInfoValid)
{
return TRUE;
- }
+ }
return FALSE;
}
@@ -158,7 +158,7 @@ WDIWithWirelessA(
////
// This routine determine if we should report the BSS scanned
-// to upper layer.
+// to upper layer.
// 2005.01.13, by rcnjko.
//
BOOLEAN
@@ -169,19 +169,19 @@ WDIFilterRtBss(
{
PRT_NDIS6_COMMON pNdisCommon = Adapter->pNdisCommon;
BOOLEAN bAcceptable = TRUE;
- BOOLEAN bHasB, bHasG, bHasA;
+ BOOLEAN bHasB, bHasG, bHasA;
// Determine the capability of wireless mode of the BSS.
bHasB = WDIWithWirelessB(pRtBss);
bHasG = WDIWithWirelessG(pRtBss);
bHasA = WDIWithWirelessA(pRtBss);
-
- // <RJ_TODO>
- // 1. Maybe we may need to use a table in the future.
+
+ // <RJ_TODO>
+ // 1. Maybe we may need to use a table in the future.
// 2. Currently, we only consider B/G case.
if( bHasB && !bHasG && !bHasA )
{ // The BSS is pure B.
- if( pNdisCommon->RegWirelessMode4ScanList == WIRELESS_MODE_G ||
+ if( pNdisCommon->RegWirelessMode4ScanList == WIRELESS_MODE_G ||
pNdisCommon->RegWirelessMode4ScanList == WIRELESS_MODE_A )
{ // We are pure A or pure G.
bAcceptable = FALSE;
@@ -219,7 +219,7 @@ wdiext_IndicateP2PDeviceFound(
// get info of last rx frame
if(RTIsListEmpty(&dev->rxFrameQ))
return;
-
+
if(!pAdapter->pPortCommonInfo->WdiData.TaskHandle.pNdisRequest)
return;
@@ -280,13 +280,13 @@ wdiext_IndicateP2PDeviceFound(
// Gen tlv
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationBssEntryList(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
return;
- wdi_UnsolicitedIndication(pAdapter,
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
(PVOID)req->RequestId,
NDIS_STATUS_WDI_INDICATION_BSS_ENTRY_LIST,
@@ -302,7 +302,7 @@ wdiext_IndicateP2PDeviceFound(
VOID
wdiext_IndicateP2PActionFrameReceived(
- IN VOID *pvP2PInfo,
+ IN VOID *pvP2PInfo,
IN u4Byte eid,
IN MEMORY_BUFFER *info
)
@@ -346,22 +346,22 @@ wdiext_IndicateP2PActionFrameReceived(
param.FrameInfo.FrameParams.ActionFrameType = WDI_P2P_ACTION_FRAME_INVITATION_RESPONSE;
else
return;
-
+
cpMacAddr(param.FrameInfo.FrameParams.PeerDeviceAddress.Address, evtData->Packet.Buffer + FRAME_OFFSET_ADDRESS2);
param.FrameInfo.FrameParams.DialogToken = *(evtData->Packet.Buffer + FRAME_OFFSET_P2P_PUB_ACT_DIALOG_TOKEN);
param.FrameInfo.FrameIEs.ElementCount = evtData->Packet.Length - ieOffset;
param.FrameInfo.FrameIEs.pElements = evtData->Packet.Buffer + ieOffset;
}
-
+
// gen TLV
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationP2pActionFrameReceived(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
return;
- wdi_UnsolicitedIndication(pAdapter,
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
NULL,
NDIS_STATUS_WDI_INDICATION_P2P_ACTION_FRAME_RECEIVED,
@@ -371,7 +371,7 @@ wdiext_IndicateP2PActionFrameReceived(
// cleanup
FreeGenerated((UINT8 *)buf);
-
+
FunctionOut(COMP_OID_SET);
return;
@@ -394,7 +394,7 @@ wdiext_IndicateBSSEntry(
WDI_MESSAGE_HEADER *reqWdiHdr = NULL;
u4Byte devSpecCtx = 0x07060504;
LARGE_INTEGER CurrentTime;
-
+
if(!pAdapter->pPortCommonInfo->WdiData.TaskHandle.pNdisRequest)
return;
@@ -417,7 +417,7 @@ wdiext_IndicateBSSEntry(
RT_TRACE(COMP_MLME, DBG_LOUD, ("Indicate actual scan result of BSS list\n"));
MgntActQuery_802_11_BSSID_LIST(pAdapter, &RtBssList, TRUE);
#endif
- }
+ }
req = pAdapter->pPortCommonInfo->WdiData.TaskHandle.pNdisRequest;
reqWdiHdr = (WDI_MESSAGE_HEADER *)req->DATA.METHOD_INFORMATION.InformationBuffer;
@@ -468,7 +468,7 @@ wdiext_IndicateBSSEntry(
else
{
FunctionOut(COMP_MLME);
- return;
+ return;
}
// WDI_SIGNAL_INFO_CONTAINER SignalInfo
@@ -487,23 +487,23 @@ wdiext_IndicateBSSEntry(
entry.DeviceSpecificContext.pElements = (UINT8 *)&devSpecCtx;
NdisGetCurrentSystemTime(&CurrentTime);
-
+
// WDI_AGE_INFO_CONTAINER EntryAgeInfo
entry.EntryAgeInfo.HostTimeStamp = CurrentTime.QuadPart;// [SDIO-482] in JIRA
entry.EntryAgeInfo.CachedInformation = 0;
// Gen tlv
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationBssEntryList(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
{
FunctionOut(COMP_MLME);
return;
}
-
- wdi_UnsolicitedIndication(pAdapter,
+
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
(PVOID)req->RequestId,
NDIS_STATUS_WDI_INDICATION_BSS_ENTRY_LIST,
@@ -516,7 +516,7 @@ wdiext_IndicateBSSEntry(
}
FunctionOut(COMP_MLME);
-
+
return;
}
@@ -539,7 +539,7 @@ wdiext_IndicateBSSEntryBySSID(
u4Byte devSpecCtx = 0x07060504;
BOOL bWildCardSSID = TRUE;
LARGE_INTEGER CurrentTime;
-
+
if(!pAdapter->pPortCommonInfo->WdiData.TaskHandle.pNdisRequest)
return;
@@ -565,7 +565,7 @@ wdiext_IndicateBSSEntryBySSID(
RT_TRACE(COMP_MLME, DBG_LOUD, ("Indicate actual scan result of BSS list\n"));
MgntActQuery_802_11_BSSID_LIST(pAdapter, &RtBssList, TRUE);
#endif
- }
+ }
req = pAdapter->pPortCommonInfo->WdiData.TaskHandle.pNdisRequest;
reqWdiHdr = (WDI_MESSAGE_HEADER *)req->DATA.METHOD_INFORMATION.InformationBuffer;
@@ -626,7 +626,7 @@ wdiext_IndicateBSSEntryBySSID(
else
{
FunctionOut(COMP_MLME);
- return;
+ return;
}
// WDI_SIGNAL_INFO_CONTAINER SignalInfo
@@ -645,23 +645,23 @@ wdiext_IndicateBSSEntryBySSID(
entry.DeviceSpecificContext.pElements = (UINT8 *)&devSpecCtx;
NdisGetCurrentSystemTime(&CurrentTime);
-
+
// WDI_AGE_INFO_CONTAINER EntryAgeInfo
entry.EntryAgeInfo.HostTimeStamp = CurrentTime.QuadPart;// [SDIO-482] in JIRA
entry.EntryAgeInfo.CachedInformation = 0;
// Gen tlv
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationBssEntryList(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
{
FunctionOut(COMP_MLME);
return;
}
-
- wdi_UnsolicitedIndication(pAdapter,
+
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
(PVOID)req->RequestId,
NDIS_STATUS_WDI_INDICATION_BSS_ENTRY_LIST,
@@ -674,7 +674,7 @@ wdiext_IndicateBSSEntryBySSID(
}
FunctionOut(COMP_MLME);
-
+
return;
}
@@ -720,7 +720,7 @@ wdiext_IndicateAssociationResult(
else
AssocComeBackTime = 0;
}
- else
+ else
AssocComeBackTime = 0;
if(pMgntInfo->dot11CurrentChannelNumber < 36)
BandID = WDI_BAND_ID_2400;
@@ -736,7 +736,7 @@ wdiext_IndicateAssociationResult(
case WIRELESS_MODE_A:
PhyType = WDI_PHY_TYPE_OFDM;
break;
-
+
case WIRELESS_MODE_G:
PhyType = WDI_PHY_TYPE_ERP;
break;
@@ -757,7 +757,7 @@ wdiext_IndicateAssociationResult(
PhyType = WDI_PHY_TYPE_VHT;
break;
-
+
}
PlatformZeroMemory(&AsocResult, sizeof(WDI_ASSOCIATION_RESULT_CONTAINER));
@@ -787,12 +787,14 @@ wdiext_IndicateAssociationResult(
AsocResult.Optional.BeaconProbeResponse_IsPresent = TRUE;
AsocResult.BeaconProbeResponse.ElementCount = MMPDU_BODY_LEN(pMgntInfo->AsocInfo.BeaconLength);
AsocResult.BeaconProbeResponse.pElements = MMPDU_BODY(pMgntInfo->AsocInfo.Beacon);
+#if 0
AsocResult.Optional.ActivePhyTypeList_IsPresent = TRUE;
+#endif
AsocResult.ActivePhyTypeList.ElementCount = 1;
AsocResult.ActivePhyTypeList.pElements = &PhyType;
ndisStatus = GenerateWdiIndicationAssociationResult(
- &AsocResultList,
+ &AsocResultList,
sizeof(NDIS_STATUS_INDICATION)+sizeof(WDI_MESSAGE_HEADER),
&pAdapter->pPortCommonInfo->WdiData.TlvContext,
&length,
@@ -802,10 +804,10 @@ wdiext_IndicateAssociationResult(
RT_TRACE(COMP_MLME, DBG_LOUD, ("GenerateWdiIndicationAssociationResult(): return length %d\n", length));
RT_PRINT_DATA(COMP_MLME, DBG_TRACE, ("buffer\n"), pOutput, length);
RT_TRACE(COMP_MLME, DBG_LOUD, ("SendUnsolictedIndication(): EthertypeEncapTable_IsPresent %d\n", AsocResult.Optional.EthertypeEncapTable_IsPresent));
-
+
ndisStatus = WDI_AddDatapathPeer(pAdapter, AsocResult.BSSID.Address);
-
- wdi_UnsolicitedIndication(pAdapter,
+
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
(PVOID)pAdapter->pPortCommonInfo->WdiData.TaskHandle.pNdisRequest->RequestId,
NDIS_STATUS_WDI_INDICATION_ASSOCIATION_RESULT,
@@ -833,7 +835,7 @@ wdiext_IndicateAssociationResult(
//
RT_STATUS
wdiext_IndicateFtAssocNeeded(
- IN PADAPTER pAdapter
+ IN PADAPTER pAdapter
)
{
RT_STATUS rtStatus = RT_STATUS_SUCCESS;
@@ -851,18 +853,18 @@ wdiext_IndicateFtAssocNeeded(
{
RT_TRACE_F(COMP_INDIC, DBG_WARNING, ("Too short of AuthSeq2Length = %d\n", pMgntInfo->AsocInfo.AuthSeq1Length));
rtStatus = RT_STATUS_INVALID_DATA;
- break;
+ break;
}
if(pMgntInfo->AsocInfo.AuthSeq2Length < sMacHdrLng)
{
RT_TRACE_F(COMP_INDIC, DBG_WARNING, ("Too short of AuthSeq2Length = %d\n", pMgntInfo->AsocInfo.AuthSeq2Length));
rtStatus = RT_STATUS_INVALID_DATA;
- break;
+ break;
}
cpMacAddr(param.BssId.Address, pMgntInfo->Bssid);
-
+
param.AuthRequest.ElementCount = MMPDU_BODY_LEN(pMgntInfo->AsocInfo.AuthSeq1Length);
param.AuthRequest.pElements = MMPDU_BODY(pMgntInfo->AsocInfo.AuthSeq1);
@@ -870,21 +872,21 @@ wdiext_IndicateFtAssocNeeded(
param.AuthResponse.pElements = MMPDU_BODY(pMgntInfo->AsocInfo.AuthSeq2);
// Gen tlv
- if(NDIS_STATUS_SUCCESS != (ndisStatus =
+ if(NDIS_STATUS_SUCCESS != (ndisStatus =
GenerateWdiIndicationFtAssocParamsNeeded(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&indicBufLen,
&((UINT8 *)pIndicBuf))))
{
RT_TRACE_F(COMP_INDIC, DBG_SERIOUS, ("Fail (ndisStatus = 0x%08X) from GenerateWdiIndicationFtAssocParamsNeeded()\n", ndisStatus));
rtStatus = RT_STATUS_OS_API_FAILED;
- break;
+ break;
}
RT_PRINT_DATA(COMP_INDIC, DBG_LOUD, "NDIS_STATUS_WDI_INDICATION_FT_ASSOC_PARAMS_NEEDED:\n", pIndicBuf, indicBufLen);
- wdi_UnsolicitedIndication(pAdapter,
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
NULL,
NDIS_STATUS_WDI_INDICATION_FT_ASSOC_PARAMS_NEEDED,
@@ -930,8 +932,8 @@ wdiext_IndicateDisassociation(
param.Optional.NeedPeerStateCleanup_IsPresent = FALSE;
cpMacAddr(param.DisconnectIndicationParameters.MacAddress.Address, addr);
- param.DisconnectIndicationParameters.DisassociationWABIReason = bDisassoc
- ? WDI_ASSOC_STATUS_PEER_DISASSOCIATED
+ param.DisconnectIndicationParameters.DisassociationWABIReason = bDisassoc
+ ? WDI_ASSOC_STATUS_PEER_DISASSOCIATED
: WDI_ASSOC_STATUS_PEER_DEAUTHENTICATED;
if(frameLen)
@@ -947,23 +949,23 @@ wdiext_IndicateDisassociation(
param.DeauthFrame.pElements = frame + sMacHdrLng;
}
}
-
+
// Gen tlv
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationDisassociation(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
return;
- wdi_UnsolicitedIndication(pAdapter,
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
NULL,
NDIS_STATUS_WDI_INDICATION_DISASSOCIATION,
NDIS_STATUS_SUCCESS,
buf,
buflen);
-
+
// cleanup
FreeGenerated((UINT8 *)buf);
@@ -987,24 +989,24 @@ wdiext_IndicateRadioStatus(
Params.RadioState.HardwareState = (pMgntInfo->RfOffReason&RF_CHANGE_BY_HW)?0:1;
RT_TRACE(COMP_RF, DBG_LOUD, ("wdiext_IndicateRadioStatus(): Params.RadioState.SoftwareState is %d, Params.RadioState.HardwareState is %d\n", Params.RadioState.SoftwareState, Params.RadioState.HardwareState));
-
+
ndisStatus = GenerateWdiIndicationRadioStatus(
&Params,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
&pAdapter->pPortCommonInfo->WdiData.TlvContext,
&length,
&pOutput);
if(NDIS_STATUS_SUCCESS == ndisStatus)
{
- wdi_UnsolicitedIndication(pAdapter,
+ wdi_UnsolicitedIndication(pAdapter,
TRUE,
NULL,
NDIS_STATUS_WDI_INDICATION_RADIO_STATUS,
NDIS_STATUS_SUCCESS,
pOutput,
length);
-
+
FreeGenerated(pOutput);
pOutput = NULL;
}
@@ -1023,7 +1025,7 @@ wdiext_IndicateLinkStateChanged(
PUCHAR pOutput = NULL;
ULONG length = 0;
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
-
+
if (pMgntInfo->mAssoc || pMgntInfo->mIbss)
{
Params.LinkStateChangeParameters.LinkQuality = GetSignalQuality(pAdapter);
@@ -1044,7 +1046,7 @@ wdiext_IndicateLinkStateChanged(
RT_TRACE(COMP_MLME, DBG_LOUD, ("wdiext_IndicateLinkStateChanged(): Params.LinkStateChangeParameters.TxLinkSpeed is %d\n", Params.LinkStateChangeParameters.TxLinkSpeed));
RT_TRACE(COMP_MLME, DBG_LOUD, ("wdiext_IndicateLinkStateChanged(): Params.LinkStateChangeParameters.RxLinkSpeed is %d\n", Params.LinkStateChangeParameters.RxLinkSpeed));
-
+
ndisStatus = GenerateWdiIndicationLinkStateChange(
&Params,
sizeof(NDIS_STATUS_INDICATION)+sizeof(WDI_MESSAGE_HEADER),
@@ -1080,7 +1082,7 @@ wdiext_IndicateRoamingNeeded(
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
pMgntInfo->bPrepareRoaming = TRUE;
-
+
Params.RoamingReason = IndicationReason;
RT_TRACE_F(COMP_MLME, DBG_LOUD, ("Params.RoamingReason %d\n", Params.RoamingReason));
@@ -1143,20 +1145,20 @@ wdiext_IndicateP2POpChnl(
// Gen tlv
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationP2pGroupOperatingChannel(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
return;
- wdi_UnsolicitedIndication(pAdapter,
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
(PVOID)req->RequestId,
NDIS_STATUS_WDI_INDICATION_P2P_GROUP_OPERATING_CHANNEL,
NDIS_STATUS_SUCCESS,
buf,
buflen);
-
+
// cleanup
FreeGenerated((UINT8 *)buf);
@@ -1173,7 +1175,7 @@ wdi_FindGroupPeerByPort(
PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter);
PRT_PEER_ENTRY pPeerEntry = NULL;
u1Byte i;
-
+
for(i = 0; i < MP_DEFAULT_NUMBER_OF_PORT; i++)
{
pPeerEntry = &pDefaultAdapter->RxPeerTable[i];
@@ -1185,7 +1187,7 @@ wdi_FindGroupPeerByPort(
}
}
}
-
+
return NULL;
}
@@ -1198,24 +1200,24 @@ wdi_FindPeerByAddr(
PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter);
PRT_PEER_ENTRY pPeerEntry = NULL;
u1Byte i = 0, count = 0;
-
+
count = pDefaultAdapter->RxPeerUsedCount;
for(i = MP_DEFAULT_NUMBER_OF_PORT; i < MAX_PEER_NUM; i++)
{
if( count == 0 )
break;
-
+
pPeerEntry = &pDefaultAdapter->RxPeerTable[i];
if( pPeerEntry->bUsed == TRUE )
{
- count--;
+ count--;
if( PlatformCompareMemory(pPeerEntry->PeerAddr, pAddr, 6) == 0 )
{
return (PVOID)pPeerEntry;
}
}
}
-
+
return NULL;
}
@@ -1230,18 +1232,18 @@ wdi_GetAvailablePeer(
PRT_PEER_ENTRY pCurPeerEntry = NULL, pPeerEntry = NULL;
u1Byte i = 0, UnusedIndex = 0, count = 0;
BOOLEAN bFound = FALSE;
-
+
FunctionIn(COMP_MLME);
-
+
count = pDefaultAdapter->RxPeerUsedCount;
-
+
for(i = MP_DEFAULT_NUMBER_OF_PORT; i < MAX_PEER_NUM; i++)
{
if( (count == 0) && (bFound == TRUE) )
break;
-
+
pPeerEntry = &pDefaultAdapter->RxPeerTable[i];
-
+
if( (pPeerEntry->bUsed == FALSE) && (bFound == FALSE) )
{
bFound = TRUE;
@@ -1252,32 +1254,32 @@ wdi_GetAvailablePeer(
count--;
if( PlatformCompareMemory(pPeerEntry->PeerAddr, pAddr, 6) == 0 )
{
- RT_TRACE(COMP_MLME, DBG_WARNING, ("wdi_GetAvailablePeer: The addres [%2x:%2x:%2x:%2x:%2x:%2x] had associated with specified Peer %d\n", pAddr[0], pAddr[1], pAddr[2], pAddr[3], pAddr[4], pAddr[5], pPeerEntry->uPeerId));
+ RT_TRACE(COMP_MLME, DBG_WARNING, ("wdi_GetAvailablePeer: The addres [%2x:%2x:%2x:%2x:%2x:%2x] had associated with specified Peer %d\n", pAddr[0], pAddr[1], pAddr[2], pAddr[3], pAddr[4], pAddr[5], pPeerEntry->uPeerId));
FunctionOut(COMP_MLME);
return (PVOID)pPeerEntry;
}
}
}
-
+
if( (i == MAX_PEER_NUM) && (bFound == FALSE) )
{
- RT_TRACE(COMP_MLME, DBG_WARNING, ("wdi_GetAvailablePeer: Peer is already full, so cannot find an unused peer to associate [%2x:%2x:%2x:%2x:%2x:%2x]\n", pAddr[0], pAddr[1], pAddr[2], pAddr[3], pAddr[4], pAddr[5]));
+ RT_TRACE(COMP_MLME, DBG_WARNING, ("wdi_GetAvailablePeer: Peer is already full, so cannot find an unused peer to associate [%2x:%2x:%2x:%2x:%2x:%2x]\n", pAddr[0], pAddr[1], pAddr[2], pAddr[3], pAddr[4], pAddr[5]));
FunctionOut(COMP_MLME);
return NULL;
}
-
+
pDefaultAdapter->RxPeerUsedCount++;
-
+
pCurPeerEntry = &pDefaultAdapter->RxPeerTable[UnusedIndex];
pCurPeerEntry->bUsed = TRUE;
pCurPeerEntry->uPeerId = UnusedIndex;
pCurPeerEntry->uPortId = (u2Byte)PortId;
PlatformMoveMemory(pCurPeerEntry->PeerAddr, pAddr, 6);
- RT_TRACE(COMP_MLME, DBG_LOUD, ("wdi_GetAvailablePeer: Port %d associate the addres [%2x:%2x:%2x:%2x:%2x:%2x] at Peer %d\n", (u2Byte)PortId, pAddr[0], pAddr[1], pAddr[2], pAddr[3], pAddr[4], pAddr[5], UnusedIndex));
-
+ RT_TRACE(COMP_MLME, DBG_LOUD, ("wdi_GetAvailablePeer: Port %d associate the addres [%2x:%2x:%2x:%2x:%2x:%2x] at Peer %d\n", (u2Byte)PortId, pAddr[0], pAddr[1], pAddr[2], pAddr[3], pAddr[4], pAddr[5], UnusedIndex));
+
FunctionOut(COMP_MLME);
-
+
return (PVOID)pCurPeerEntry;
}
@@ -1299,17 +1301,17 @@ wdi_NotifyPeerData(
WDI_EXTENDED_TID ExtendTid = (WDI_EXTENDED_TID)ExTid;
KIRQL Irql = 0;
BOOLEAN bLackResource = FALSE;
-
+
PlatformAcquireSpinLock(pAdapter, RT_RX_CONTROL_SPINLOCK);
if( (pNdisCommon->bRxControlState != RT_RX_STOP) && (pDefaultNdisCommon->bRxDataPathState != RT_RX_PAUSE) )
- {
+ {
pNdisCommon->bRxControlState = RT_RX_NOTIFYING;
PlatformReleaseSpinLock(pAdapter, RT_RX_CONTROL_SPINLOCK);
-
+
PlatformAcquireSpinLock(pAdapter, RT_RX_SPINLOCK);
bLackResource = RxCheckResource(pAdapter)?FALSE:TRUE;
PlatformReleaseSpinLock(pAdapter, RT_RX_SPINLOCK);
-
+
if( bLackResource )
RT_TRACE(COMP_RECV, DBG_WARNING, ("wdi_NotifyPeerData(): RFD is less than lower bound (%d)\n", RFD_LOWER_BOUND));
@@ -1349,7 +1351,7 @@ wdi_NotifyPeerData(
}
pTempAdapter = GetNextExtAdapter(pTempAdapter);
}while(pTempAdapter != NULL );
-
+
PlatformReleaseSpinLock(pAdapter, RT_RX_CONTROL_SPINLOCK);
RT_TRACE(COMP_INIT, DBG_WARNING, ("Driver call RxStopConfirm for Rx manager\n"));
pWdi->WdiDataApi.RxStopConfirm(pWdi->DataPathHandle);
@@ -1395,23 +1397,23 @@ WDI_Initialize(
// WorkAround for 0x9F BSOD
pMChars->ResetHandlerEx = N6SdioReset;
-
+
RtlZeroMemory(&WdiChar, sizeof(WdiChar));
WdiChar.WdiVersion = WDI_VERSION_LATEST;
WdiChar.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_WDI_CHARACTERISTICS,
WdiChar.Header.Size = NDIS_SIZEOF_MINIPORT_WDI_CHARACTERISTICS_REVISION_1;
- WdiChar.Header.Revision = NDIS_MINIPORT_DRIVER_WDI_CHARACTERISTICS_REVISION_1;
+ WdiChar.Header.Revision = NDIS_MINIPORT_DRIVER_WDI_CHARACTERISTICS_REVISION_1;
WdiChar.AllocateAdapterHandler = N6SdioWdi_AllocateAdapter;
WdiChar.FreeAdapterHandler = N6SdioWdi_FreeAdapter;
- WdiChar.OpenAdapterHandler = N6SdioWdi_OpenAdapter;
- WdiChar.CloseAdapterHandler = N6SdioWdi_CloseAdapter;
+ WdiChar.OpenAdapterHandler = N6SdioWdi_OpenAdapter;
+ WdiChar.CloseAdapterHandler = N6SdioWdi_CloseAdapter;
WdiChar.TalTxRxInitializeHandler = N6SdioWdi_TalTxRxInitialize;
WdiChar.TalTxRxDeinitializeHandler = N6SdioWdi_TalTxRxDeinitialize;
- WdiChar.HangDiagnoseHandler = N6SdioWdi_HangDiagnose;
+ WdiChar.HangDiagnoseHandler = N6SdioWdi_HangDiagnose;
// Optional handler
WdiChar.StartOperationHandler = N6SdioWdi_StartOperation;
@@ -1432,7 +1434,7 @@ WDI_Initialize(
VOID
-WDI_DeInitialize(
+WDI_DeInitialize(
IN NDIS_HANDLE DriverHandle
)
{
@@ -1440,7 +1442,7 @@ WDI_DeInitialize(
}
VOID
-WDI_InitRxQueue(
+WDI_InitRxQueue(
IN PADAPTER pAdapter
)
{
@@ -1463,14 +1465,14 @@ WDI_InitRxQueue(
}
VOID
-WDI_DeInitRxQueue(
+WDI_DeInitRxQueue(
IN PADAPTER pAdapter
)
{
PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter);
u2Byte index = 0;
PNET_BUFFER_LIST pNetBufferList=NULL;
-
+
RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], WDI_DeInitRxQueue() ==> \n"));
PlatformAcquireSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
for(index=0; index<MAX_PEER_NUM; index++)
@@ -1491,12 +1493,12 @@ WDI_DeInitRxQueue(
VOID
-WDI_PnPNotiry(
+WDI_PnPNotiry(
IN PADAPTER pAdapter
)
{
PWDI_DATA_STRUCT pWdi = &(pAdapter->pPortCommonInfo->WdiData);
-
+
if( pWdi->TaskHandle.Status & RT_OID_HANDLER_STATUS_SET )
{
OidHandle_Complete(pAdapter, OIDHANDLE_TYPE_TASK);
@@ -1541,11 +1543,11 @@ WdiExt_IndicateApAssocReqReceived(
PlatformZeroMemory(&param, sizeof(param));
- cpMacAddr(param.IncomingRequestInfo.AssocRequestParams.PeerMacAddress.Address,
+ cpMacAddr(param.IncomingRequestInfo.AssocRequestParams.PeerMacAddress.Address,
assocReq + FRAME_OFFSET_ADDRESS2
);
- param.IncomingRequestInfo.AssocRequestParams.IsReassociationRequest =
+ param.IncomingRequestInfo.AssocRequestParams.IsReassociationRequest =
(Type_Reasoc_Req == GET_80211_HDR_TYPE(assocReq)) ? TRUE : FALSE;
FillOctetString(osAssocReq, assocReq, (u2Byte)assocReqLen);
@@ -1561,20 +1563,20 @@ WdiExt_IndicateApAssocReqReceived(
// Gen tlv
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationApAssociationRequestReceived(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
return;
- wdi_UnsolicitedIndication(pAdapter,
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
NULL,
NDIS_STATUS_WDI_INDICATION_AP_ASSOCIATION_REQUEST_RECEIVED,
NDIS_STATUS_SUCCESS,
buf,
buflen);
-
+
// cleanup
FreeGenerated((UINT8 *)buf);
@@ -1593,16 +1595,16 @@ WdiExt_IndicateApAssocRspSent(
if(FALSE == OidHandle_VerifyTask(pAdapter, OID_WDI_TASK_SEND_AP_ASSOCIATION_RESPONSE))
{
- RT_TRACE(COMP_OID_SET, DBG_WARNING,
+ RT_TRACE(COMP_OID_SET, DBG_WARNING,
("WdiExt_IndicateApAssocRspSent(): skip indication because OidHandle_VerifyTask() returns FALSE\n"));
return;
}
-
+
if(task->pvCtx)
{
if(WDI_CMD_SendApAssociationResponseComplete(
- pAdapter,
- (NDIS_OID_REQUEST *)task->pvCtx,
+ pAdapter,
+ (NDIS_OID_REQUEST *)task->pvCtx,
StatusCode_success == status ? RT_STATUS_SUCCESS : RT_STATUS_FAILURE))
{// set pvCtx to NULL only when it is freed in WDI_CMD_SendApAssociationResponseComplete
task->pvCtx = NULL;
@@ -1621,18 +1623,18 @@ WDIAllocateMetaData(
{
PWDI_DATA_STRUCT pWdi = &(pAdapter->pPortCommonInfo->WdiData);
PWDI_FRAME_METADATA pWdiFrameMeta = NULL;
-
+
pWdiFrameMeta = pWdi->WdiDataApi.AllocateWiFiFrameMetaData(pWdi->DataPathHandle);
if( pWdiFrameMeta == NULL )
return RT_STATUS_FAILURE;
pWdiFrameMeta->u.rxMetaData.PayloadType = WDI_FRAME_MSDU;
pWdiFrameMeta->pNBL = pNBL;
-
+
RT_TRACE(COMP_RECV, DBG_TRACE, ("PayloadType %d\n", pWdiFrameMeta->u.rxMetaData.PayloadType));
MP_SET_PACKET_RFD_RESERVED_0(pNBL, pWdiFrameMeta);
-
+
return RT_STATUS_SUCCESS;
}
@@ -1673,7 +1675,7 @@ WDI_InsertDataInQueue(
FillOctetString(osMpdu, pRfd->Buffer.VirtualAddress + pRfd->FragOffset, pRfd->FragLength);
PlatformAcquireSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
-
+
/****************************************************************************************************
* 20150707 Sinda
* We insert frames in queue as below rules
@@ -1694,12 +1696,12 @@ WDI_InsertDataInQueue(
else
PeerId = pPeerEntry->uPeerId;
}
-
+
if(pPeerEntry->bUsed == TRUE)
{
RT_TRACE(COMP_RECV, DBG_TRACE, ("WDI_InsertDataInQueue: Port %d, PeerId %d\n", PortNumber, PeerId));
for (pCurrNetBufferList = pNBL; pCurrNetBufferList != NULL; pCurrNetBufferList = pNextNetBufferList)
- {
+ {
pNextNetBufferList = NET_BUFFER_LIST_NEXT_NBL(pCurrNetBufferList);
NET_BUFFER_LIST_NEXT_NBL(pCurrNetBufferList) = NULL;
N6CAddNblWaitQueue(&pDefaultAdapter->RxPeerQueue[PeerId], pCurrNetBufferList, FALSE);
@@ -1808,7 +1810,7 @@ WDI_IndicateBssListBySSID(
}
VOID
-WDI_IndicateConnectionComplete(
+WDI_IndicateConnectionComplete(
PADAPTER pAdapter,
RT_STATUS status
)
@@ -1817,7 +1819,7 @@ WDI_IndicateConnectionComplete(
if(FALSE == OidHandle_VerifyTask(pAdapter, OID_WDI_TASK_CONNECT))
return;
-
+
OidHandle_Complete(pAdapter, OIDHANDLE_TYPE_TASK);
}
@@ -1827,7 +1829,7 @@ WDI_IndicateAssociationComplete(
PADAPTER pAdapter,
RT_STATUS status
)
-{
+{
if( status == RT_STATUS_SUCCESS )
{
wdiext_IndicateAssociationResult(pAdapter);
@@ -1837,17 +1839,17 @@ WDI_IndicateAssociationComplete(
VOID
-WDI_IndicateDisassociation(
+WDI_IndicateDisassociation(
PADAPTER pAdapter,
u2Byte reason,
pu1Byte pAddr
)
{
PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo);
-
+
if(ACTING_AS_AP(pAdapter))
{// AP mode
- RT_WLAN_STA *sta = pMgntInfo->pCurrentSta;
+ RT_WLAN_STA *sta = pMgntInfo->pCurrentSta;
RT_ASSERT(sta, ("%s(): sta is NULL!!!\n", __FUNCTION__));
@@ -1856,7 +1858,7 @@ WDI_IndicateDisassociation(
RT_TRACE_F(COMP_AP, DBG_SERIOUS, ("pMgntInfo->pCurrentSta is NULL!\n"));
return;
}
-
+
wdiext_IndicateDisassociation(pAdapter, sta->MacAddr, 0, NULL, TRUE, reason);
}
else
@@ -1876,17 +1878,17 @@ WDI_IndicateNLODiscovery(
)
{
WDI_INDICATION_NLO_DISCOVERY_PARAMETERS param;
- PWDI_BSS_ENTRY_CONTAINER pEntry;
+ PWDI_BSS_ENTRY_CONTAINER pEntry;
PRT_NLO_INFO pNLOInfo = &(pAdapter->MgntInfo.NLOInfo);
PRT_WLAN_BSS pRtBss = NULL;
- RT_802_11_BSSID_LIST RtBssList = {0};
+ RT_802_11_BSSID_LIST RtBssList = {0};
u4Byte i = 0;
u4Byte j = 0;
- u4Byte nBss = 0;
+ u4Byte nBss = 0;
ULONG buflen = 0;
- pu1Byte buf = NULL;
- pu1Byte pBssList = NULL;
+ pu1Byte buf = NULL;
+ pu1Byte pBssList = NULL;
u4Byte devSpecCtx = 0x07060504;
BOOLEAN Hit = FALSE;
LARGE_INTEGER CurrentTime;
@@ -1898,15 +1900,15 @@ WDI_IndicateNLODiscovery(
// zero
PlatformZeroMemory(&param, sizeof(param));
-
+
//Get scan list
RtBssList.NumberOfItems = 0;
RtBssList.pbssidentry = pAdapter->bssDescList;
-
+
MgntActQuery_802_11_BSSID_LIST(pAdapter, &RtBssList, FALSE);
- PlatformAllocateMemoryWithZero(pAdapter, (PVOID *)&pEntry, sizeof(WDI_BSS_ENTRY_CONTAINER)*RtBssList.NumberOfItems);
-
+ PlatformAllocateMemoryWithZero(pAdapter, (PVOID *)&pEntry, sizeof(WDI_BSS_ENTRY_CONTAINER)*RtBssList.NumberOfItems);
+
param.DeviceDescriptor.pElements = pEntry;
nBss = 0;
@@ -1922,14 +1924,14 @@ WDI_IndicateNLODiscovery(
}
pRtBss = &(RtBssList.pbssidentry[i]);
-
+
// Determine if we shall report the BSS found by RegWirelessMode4ScanList.
if(!WDIFilterRtBss(pAdapter, pRtBss))
{
// Skip this BSS.
continue;
}
-
+
for( j=0 ; j<pNLOInfo->NumDot11OffloadNetwork ; ++j )
{
// Compare to check whether it is what we desired or not
@@ -1942,7 +1944,7 @@ WDI_IndicateNLODiscovery(
if( !Hit ) // This BSS is not we desired.
continue;
-
+
// WIFI_MAC_ADDRESS_CONTAINER BSSID
cpMacAddr(pEntry->BSSID.Address, pRtBss->bdBssIdBuf);
@@ -1963,7 +1965,7 @@ WDI_IndicateNLODiscovery(
{
RT_TRACE(COMP_POWER, DBG_LOUD, ("Unknown BssPacketType: %u\n", pRtBss->BssPacketType));
FunctionOut(COMP_POWER);
- return;
+ return;
}
// WDI_SIGNAL_INFO_CONTAINER SignalInfo
@@ -1975,9 +1977,9 @@ WDI_IndicateNLODiscovery(
pEntry->ChannelInfo.ChannelNumber = (UINT32)pRtBss->ChannelNumber;
pEntry->ChannelInfo.BandId = (pRtBss->ChannelNumber < 36) ? WDI_BAND_ID_2400 : WDI_BAND_ID_5000;
RT_TRACE(COMP_POWER, DBG_LOUD, ("pRtBss->ChannelNumber=%d, ", pRtBss->ChannelNumber));
- RT_TRACE(COMP_POWER, DBG_LOUD, ("%x:%x:%x:%x:%x:%x, ",
- pEntry->BSSID.Address[0], pEntry->BSSID.Address[1],
- pEntry->BSSID.Address[2], pEntry->BSSID.Address[3],
+ RT_TRACE(COMP_POWER, DBG_LOUD, ("%x:%x:%x:%x:%x:%x, ",
+ pEntry->BSSID.Address[0], pEntry->BSSID.Address[1],
+ pEntry->BSSID.Address[2], pEntry->BSSID.Address[3],
pEntry->BSSID.Address[4], pEntry->BSSID.Address[5]));
RT_TRACE(COMP_POWER, DBG_LOUD, ("SSID: %s\n", pRtBss->bdSsIdBuf));
@@ -1988,7 +1990,7 @@ WDI_IndicateNLODiscovery(
// Get current timestamp
NdisGetCurrentSystemTime(&CurrentTime);
-
+
// WDI_AGE_INFO_CONTAINER EntryAgeInfo
pEntry->EntryAgeInfo.HostTimeStamp = CurrentTime.QuadPart; // [SDIO-482] in JIRA
pEntry->EntryAgeInfo.CachedInformation = 0;
@@ -2007,17 +2009,17 @@ WDI_IndicateNLODiscovery(
// Gen tlv
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationNloDiscovery(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
{
RT_TRACE(COMP_POWER, DBG_LOUD, ("WDI_IndicateNLODiscovery(): GenerateWdiIndicationNloDiscovery Failed\n"));
FunctionOut(COMP_POWER);
return;
}
-
- wdi_UnsolicitedIndication( pAdapter,
+
+ wdi_UnsolicitedIndication( pAdapter,
FALSE,
NULL,
NDIS_STATUS_WDI_INDICATION_NLO_DISCOVERY,
@@ -2026,8 +2028,8 @@ WDI_IndicateNLODiscovery(
buflen);
// cleanup
- FreeGenerated((UINT8 *)buf);
-
+ FreeGenerated((UINT8 *)buf);
+
FunctionOut(COMP_POWER);
}
@@ -2042,7 +2044,7 @@ WDI_IndicateCurrentPhyStatus(
VOID
-WDI_IndicateP2PEvent(
+WDI_IndicateP2PEvent(
VOID *pvP2PInfo,
u4Byte EventID,
MEMORY_BUFFER *pInformation
@@ -2051,7 +2053,7 @@ WDI_IndicateP2PEvent(
{
P2P_INFO *pP2PInfo = (P2P_INFO *)pvP2PInfo;
RT_OID_HANDLER *task = &pP2PInfo->pAdapter->pPortCommonInfo->WdiData.TaskHandle;
-
+
if(P2P_EVENT_DEV_FOUND == EventID)
{
wdiext_IndicateP2PDeviceFound(pP2PInfo->pAdapter, pInformation->Buffer);
@@ -2060,8 +2062,8 @@ WDI_IndicateP2PEvent(
|| P2P_EVENT_RECEIVED_GO_NEGOTIATION_REQUEST == EventID
|| P2P_EVENT_RECEIVED_INVITATION_REQUEST == EventID
)
- {// rx req action
- WDI_CMD_PreIndicateRxP2pActionFrameCb(pvP2PInfo, EventID, pInformation);
+ {// rx req action
+ WDI_CMD_PreIndicateRxP2pActionFrameCb(pvP2PInfo, EventID, pInformation);
wdiext_IndicateP2PActionFrameReceived(pvP2PInfo, EventID, pInformation);
WDI_CMD_PostIndicateRxP2pActionFrameCb(pvP2PInfo, EventID, pInformation);
}
@@ -2072,10 +2074,10 @@ WDI_IndicateP2PEvent(
)
{// rx rsp action
WDI_CMD_PreIndicateRxP2pActionFrameCb(pvP2PInfo, EventID, pInformation);
-
+
// indicate in the corresp. OffChnlTx complete cb
//wdiext_IndicateP2PActionFrameReceived(pvP2PInfo, EventID, pInformation);
-
+
WDI_CMD_PostIndicateRxP2pActionFrameCb(pvP2PInfo, EventID, pInformation);
}
else if(P2P_EVENT_GO_OPERATING_CHANNEL == EventID)
@@ -2083,7 +2085,7 @@ WDI_IndicateP2PEvent(
wdiext_IndicateP2POpChnl(pP2PInfo->pAdapter, pP2PInfo);
}
- return;
+ return;
}
@@ -2105,7 +2107,7 @@ WDI_CompleteCreateDeleteMac(
}
VOID
-WDI_IndicateLinkStateChanged(
+WDI_IndicateLinkStateChanged(
PADAPTER pAdapter,
BOOLEAN bForceLinkQuality,
u1Byte ucLinkQuality
@@ -2122,14 +2124,14 @@ WDI_IndicateActionFrame(
{
NDIS_STATUS_INDICATION *indic = NULL;
WDI_MESSAGE_HEADER *wdiHdr = NULL;
-
+
u1Byte *buf = NULL;
ULONG buflen = 0;
WDI_INDICATION_ACTION_FRAME_RECEIVED_PARAMETERS param = {0};
RT_TRACE(COMP_OID_SET, DBG_WARNING, ("WDI_IndicateActionFrame +\n"));
-
+
// TODO: fill the valid info into param
PlatformMoveMemory(param.SourceAddress.Address,Frame_pSaddr(*posMpdu),6);
@@ -2137,13 +2139,13 @@ WDI_IndicateActionFrame(
param.ActionFrameBody.ElementCount = posMpdu->Length;
// TODO: double check here to make sure channel correct
- param.ChannelInfo.ChannelNumber = RT_GetChannelNumber(pAdapter);
+ param.ChannelInfo.ChannelNumber = RT_GetChannelNumber(pAdapter);
param.ChannelInfo.BandId = WDI_BAND_ID_2400;
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationActionFrameReceived(
- &param,
- sizeof(*indic) + sizeof(*wdiHdr),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(*indic) + sizeof(*wdiHdr),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
{
RT_TRACE(COMP_OID_SET, DBG_WARNING, ("ActionFrame generate tlv failed\n"));
@@ -2173,7 +2175,7 @@ WDI_IndicateActionFrame(
NdisMIndicateStatusEx(pAdapter->pNdisCommon->hNdisAdapter, indic);
FreeGenerated((UINT8 *)buf);
-
+
return RT_STATUS_SUCCESS;
}
@@ -2184,12 +2186,12 @@ WDI_IndicateWakeReason(
IN pu1Byte pBuffer,
IN u2Byte BufferLen
)
-{
+{
WDI_INDICATION_WAKE_REASON_PARAMETERS param;
PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo);
PRT_POWER_SAVE_CONTROL pPSC = GET_POWER_SAVE_CONTROL(pMgntInfo);
- pu1Byte pWakePktbuf = NULL;
+ pu1Byte pWakePktbuf = NULL;
BOOLEAN bIndicate = TRUE;
u1Byte *buf = NULL;
ULONG buflen = 0;
@@ -2207,7 +2209,7 @@ WDI_IndicateWakeReason(
RT_TRACE(COMP_POWER, DBG_SERIOUS, ("WDI_IndicateWakeReason(): Unknown pPSC->WakeUpReason(%#x)\n", pPSC->WakeUpReason));
}
- param.WakeEventCode = WDI_WAKE_REASON_CODE_PACKET;
+ param.WakeEventCode = WDI_WAKE_REASON_CODE_PACKET;
param.WakePacketPatternId = pPSC->MagicPacketPatternId;
PlatformAllocateMemoryWithZero(pAdapter, (PVOID *)&pWakePktbuf, BufferLen);
@@ -2241,47 +2243,47 @@ WDI_IndicateWakeReason(
bIndicate = FALSE;
}
}
-
+
if(bIndicate)
{
RT_TRACE(COMP_POWER, DBG_LOUD, ("WDI_IndicateWakeReason(): WakeEventCode(%#X)\n", param.WakeEventCode));
// Gen tlv
if(NDIS_STATUS_SUCCESS != GenerateWdiIndicationWakeReasonFromIhv(
- &param,
- sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
- &pAdapter->pPortCommonInfo->WdiData.TlvContext,
+ &param,
+ sizeof(NDIS_STATUS_INDICATION) + sizeof(WDI_MESSAGE_HEADER),
+ &pAdapter->pPortCommonInfo->WdiData.TlvContext,
&buflen, &((UINT8 *)buf)))
{
RT_TRACE(COMP_POWER, DBG_LOUD, ("WDI_IndicateWakeReason(): GenerateWdiIndicationWakeReasonFromIhv Failed\n"));
return;
}
-
- wdi_UnsolicitedIndication(pAdapter,
+
+ wdi_UnsolicitedIndication(pAdapter,
FALSE,
NULL,
NDIS_STATUS_WDI_INDICATION_WAKE_REASON,
NDIS_STATUS_SUCCESS,
buf,
buflen);
-
+
// cleanup
FreeGenerated((UINT8 *)buf);
- }
-
+ }
+
}
VOID
-WDI_IndicateRoamingNeeded(
+WDI_IndicateRoamingNeeded(
PADAPTER pAdapter,
RT_PREPARE_ROAM_TYPE IndicationReason
)
{
PMGNT_INFO pMgntInfo = &(pAdapter->MgntInfo);
-
+
pMgntInfo->PrepareRoamState = IndicationReason;
-
+
switch(IndicationReason)
{
case RT_PREPARE_ROAM_DEAUTH_DISASSOC:
@@ -2299,7 +2301,7 @@ WDI_IndicateRoamingNeeded(
}
VOID
-WDI_IndicateRoamingComplete(
+WDI_IndicateRoamingComplete(
PADAPTER pAdapter
)
{
@@ -2307,11 +2309,11 @@ WDI_IndicateRoamingComplete(
if(FALSE == OidHandle_VerifyTask(pAdapter, OID_WDI_TASK_ROAM))
return;
-
+
OidHandle_Complete(pAdapter, OIDHANDLE_TYPE_TASK);
}
-VOID
+VOID
WDI_AddGroupPeer(
IN PADAPTER pAdapter,
IN u2Byte PortNumber
@@ -2319,44 +2321,44 @@ WDI_AddGroupPeer(
{
PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter);
PWDI_DATA_STRUCT pWdi = &(pAdapter->pPortCommonInfo->WdiData);
- WDI_MAC_ADDRESS PeerAddr = {0};
+ WDI_MAC_ADDRESS PeerAddr = {0};
PRT_PEER_ENTRY pPeerEntry = NULL;
u1Byte i = 0;
-
+
FunctionIn(COMP_INIT);
-
+
PlatformAcquireSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
for(i = 0; i < MP_DEFAULT_NUMBER_OF_PORT; i++)
{
pPeerEntry = &pDefaultAdapter->RxPeerTable[i];
if( pPeerEntry->bUsed == FALSE )
{
- RT_TRACE(COMP_INIT, DBG_LOUD, ("WDI_AddGroupPeer: create group peer %d for port %d\n", i, PortNumber));
+ RT_TRACE(COMP_INIT, DBG_LOUD, ("WDI_AddGroupPeer: create group peer %d for port %d\n", i, PortNumber));
break;
}
}
-
+
if( i == MP_DEFAULT_NUMBER_OF_PORT )
{
- RT_TRACE(COMP_INIT, DBG_WARNING, ("WDI_AddGroupPeer: there is no available group peer for port %d\n", PortNumber));
+ RT_TRACE(COMP_INIT, DBG_WARNING, ("WDI_AddGroupPeer: there is no available group peer for port %d\n", PortNumber));
FunctionOut(COMP_INIT);
PlatformReleaseSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
return ;
}
-
+
pPeerEntry->bUsed = TRUE;
pPeerEntry->uPeerId = i;
pPeerEntry->uPortId = PortNumber;
PlatformMoveMemory(pPeerEntry->PeerAddr, MAC_BROADCAST_ADDR, 6);
PlatformMoveMemory(PeerAddr.Address, pPeerEntry->PeerAddr, 6);
pWdi->WdiDataApi.PeerCreateIndication(pWdi->DataPathHandle, (WDI_PORT_ID)pPeerEntry->uPortId, (WDI_PEER_ID)pPeerEntry->uPeerId, PeerAddr);
-
+
PlatformReleaseSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
-
+
FunctionOut(COMP_INIT);
}
-VOID
+VOID
WDI_DeleteGroupPeer(
IN PADAPTER pAdapter,
IN u2Byte PortNumber
@@ -2368,15 +2370,15 @@ WDI_DeleteGroupPeer(
WDI_PEER_ID PeerId = 0;
PRT_PEER_ENTRY pPeerEntry = NULL;
u1Byte i;
-
+
FunctionIn(COMP_INIT);
PlatformAcquireSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
-
+
pPeerEntry = (PRT_PEER_ENTRY)wdi_FindGroupPeerByPort(pAdapter, PortNumber);
if( pPeerEntry == NULL )
{
- RT_TRACE(COMP_INIT, DBG_WARNING, ("wdi_FindPeerByAddr: Cannot find group peer of port %d\n", PortNumber));
+ RT_TRACE(COMP_INIT, DBG_WARNING, ("wdi_FindPeerByAddr: Cannot find group peer of port %d\n", PortNumber));
FunctionOut(COMP_INIT);
PlatformReleaseSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
return ;
@@ -2385,23 +2387,23 @@ WDI_DeleteGroupPeer(
{
PeerId = (WDI_PEER_ID)pPeerEntry->uPeerId;
pPeerEntry->bUsed = FALSE;
-
- PlatformZeroMemory(pPeerEntry->PeerAddr, 6);
-
+
+ PlatformZeroMemory(pPeerEntry->PeerAddr, 6);
+
pWdi->WdiDataApi.PeerDeleteIndication(pWdi->DataPathHandle, (WDI_PORT_ID)PortNumber, PeerId, &ndisStatus);
-
+
WDI_FreeRxFrame(pAdapter, (PNET_BUFFER_LIST)N6CGetHeadNblWaitQueue(pDefaultAdapter->RxPeerQueue[PeerId]));
RTInitializeSListHead(&pDefaultAdapter->RxPeerQueue[PeerId]);
-
+
RT_TRACE(COMP_INIT, DBG_LOUD, ("WDI_DeleteGroupPeer: delete group peer %d of port %d, Status: %d\n", PeerId, PortNumber, ndisStatus));
}
-
+
PlatformReleaseSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
-
+
FunctionOut(COMP_INIT);
}
-NDIS_STATUS
+NDIS_STATUS
WDI_AddDatapathPeer(
IN PADAPTER pAdapter,
IN pu1Byte pAddr)
@@ -2412,28 +2414,28 @@ WDI_AddDatapathPeer(
WDI_PORT_ID PortId = (WDI_PORT_ID)pAdapter->pNdis62Common->PortNumber;
WDI_MAC_ADDRESS PeerAddr = {0};
PRT_PEER_ENTRY pPeerEntry = NULL;
-
+
FunctionIn(COMP_MLME);
-
+
PlatformAcquireSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
-
+
pPeerEntry = (PRT_PEER_ENTRY)wdi_GetAvailablePeer(pAdapter, pAddr);
if( pPeerEntry != NULL )
- {
+ {
PlatformMoveMemory(PeerAddr.Address, pPeerEntry->PeerAddr, 6);
pWdi->WdiDataApi.PeerCreateIndication(pWdi->DataPathHandle, (WDI_PORT_ID)pPeerEntry->uPortId, (WDI_PEER_ID)pPeerEntry->uPeerId, PeerAddr);
-
+
PlatformReleaseSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
-
+
FunctionOut(COMP_MLME);
-
+
return NDIS_STATUS_SUCCESS;
}
-
+
PlatformReleaseSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
-
+
FunctionOut(COMP_MLME);
-
+
return NDIS_STATUS_FAILURE;
}
@@ -2448,11 +2450,11 @@ void WDI_DeleteDatapathPeer(
NDIS_STATUS ndisStatus = NDIS_STATUS_SUCCESS;
WDI_PEER_ID PeerId = 0;
PRT_PEER_ENTRY pPeerEntry = NULL;
-
+
FunctionIn(COMP_MLME);
-
+
PlatformAcquireSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
-
+
pPeerEntry = (PRT_PEER_ENTRY)wdi_FindPeerByAddr(pAdapter, pAddr);
if( pPeerEntry == NULL )
{
@@ -2461,23 +2463,23 @@ void WDI_DeleteDatapathPeer(
PlatformReleaseSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
return ;
}
- RT_TRACE(COMP_INIT, DBG_LOUD, ("WDI_DeleteDatapathPeer: Find the addres [%2x:%2x:%2x:%2x:%2x:%2x] associated at Peer %d\n", pAddr[0], pAddr[1], pAddr[2], pAddr[3], pAddr[4], pAddr[5], pPeerEntry->uPeerId));
-
+ RT_TRACE(COMP_INIT, DBG_LOUD, ("WDI_DeleteDatapathPeer: Find the addres [%2x:%2x:%2x:%2x:%2x:%2x] associated at Peer %d\n", pAddr[0], pAddr[1], pAddr[2], pAddr[3], pAddr[4], pAddr[5], pPeerEntry->uPeerId));
+
pDefaultAdapter->RxPeerUsedCount--;
PeerId = (WDI_PEER_ID)pPeerEntry->uPeerId;
PortId = (WDI_PORT_ID)pPeerEntry->uPortId;
pPeerEntry->bUsed = FALSE;
- PlatformZeroMemory(pPeerEntry->PeerAddr, 6);
-
+ PlatformZeroMemory(pPeerEntry->PeerAddr, 6);
+
pWdi->WdiDataApi.PeerDeleteIndication(pWdi->DataPathHandle, PortId, PeerId, &ndisStatus);
-
+
WDI_FreeRxFrame(pAdapter, (PNET_BUFFER_LIST)N6CGetHeadNblWaitQueue(pDefaultAdapter->RxPeerQueue[PeerId]));
RTInitializeSListHead(&pDefaultAdapter->RxPeerQueue[PeerId]);
-
+
PlatformReleaseSpinLock(pAdapter, RT_RX_QUEUE_SPINLOCK);
-
+
RT_TRACE(COMP_MLME, DBG_LOUD, ("WDI_DeleteDatapathPeer: delete peer %d, Status: %d\n", PeerId, ndisStatus));
-
+
FunctionOut(COMP_MLME);
}
@@ -2491,7 +2493,7 @@ WDI_FetchNBLByPort(
PADAPTER pDefaultAdapter = GetDefaultAdapter(pAdapter);
u2Byte index = 0;
PRT_SINGLE_LIST_ENTRY pFirst = NULL, pTemp = NULL;
-
+
*ppNetBufferList = NULL;
RT_TRACE(COMP_RECV, DBG_LOUD, ("WDI_FetchNBLByPort: fetch frames of all peers at port %d\n", Port_ID));
@@ -2505,7 +2507,7 @@ WDI_FetchNBLByPort(
{
if(N6CIsNblWaitQueueEmpty(pDefaultAdapter->RxPeerQueue[index]))
continue;
-
+
pTemp = RTGetHeadSList(&pDefaultAdapter->RxPeerQueue[index]);
if( pFirst == NULL )
{
@@ -2518,7 +2520,7 @@ WDI_FetchNBLByPort(
RTInitializeSListHead(&pDefaultAdapter->RxPeerQueue[index]);
}
}
-
+
if( pFirst != NULL )
{
*ppNetBufferList = RT_GET_NBL_FROM_QUEUE_LINK(pFirst);
@@ -2534,7 +2536,7 @@ WDI_FetchNBLByPort(
{
if(N6CIsNblWaitQueueEmpty(pDefaultAdapter->RxPeerQueue[index]))
continue;
-
+
pTemp = RTGetHeadSList(&pDefaultAdapter->RxPeerQueue[index]);
if( pFirst == NULL )
{
@@ -2547,7 +2549,7 @@ WDI_FetchNBLByPort(
RTInitializeSListHead(&pDefaultAdapter->RxPeerQueue[index]);
}
}
-
+
if( pFirst != NULL )
{
*ppNetBufferList = RT_GET_NBL_FROM_QUEUE_LINK(pFirst);
@@ -2577,11 +2579,11 @@ WDI_FreeRxFrame(
FunctionOut(COMP_RECV);
return;
}
-
+
do
- {
+ {
//Get next NBL
- pNextNBL = NET_BUFFER_LIST_NEXT_NBL(pNetBufferList);
+ pNextNBL = NET_BUFFER_LIST_NEXT_NBL(pNetBufferList);
//Get RFD from NBL
pRfd = MP_GET_PACKET_RFD(pNetBufferList);
@@ -2617,22 +2619,22 @@ WDI_FreeRxFrame(
//Assign NextNBL pointer
pNetBufferList = pNextNBL;
}while(pNetBufferList!=NULL);
-
+
if (Count == 0)
{
NdisSetEvent(&pNdisCommon->AllPacketReturnedEvent);
- if(pAdapter->MgntInfo.NdisVersion >= RT_NDIS_VERSION_6_20)
- {
+ if(pAdapter->MgntInfo.NdisVersion >= RT_NDIS_VERSION_6_20)
+ {
PADAPTER pTempAdapter = GetFirstExtAdapter(pAdapter);
while(pTempAdapter != NULL)
{
NdisSetEvent(&pTempAdapter->pNdisCommon->AllPacketReturnedEvent);
- pTempAdapter = GetNextExtAdapter(pTempAdapter);
- }
+ pTempAdapter = GetNextExtAdapter(pTempAdapter);
+ }
}
}
-
+
FunctionOut(COMP_RECV);
}
@@ -2641,7 +2643,7 @@ WDI_IndicateTKIPMICFailure(
PADAPTER pAdapter
)
{
- PMGNT_INFO pMgntInfo;
+ PMGNT_INFO pMgntInfo;
pMgntInfo = &(pAdapter->MgntInfo);
PUCHAR pOutput = NULL;
ULONG length = 0;
@@ -2650,13 +2652,13 @@ WDI_IndicateTKIPMICFailure(
FunctionIn(COMP_SEC);
-
+
Params.FailureInfo.DefaultKeyFailure = FALSE;
Params.FailureInfo.KeyIndex=0;
//WDI_TKIPFailureParam.PeerMacAddress=pMgntInfo->Bssid;
cpMacAddr(Params.FailureInfo.PeerMacAddress.Address, pMgntInfo->Bssid);
-
-
+
+
ndisStatus = GenerateWdiIndicationTkipMicFailure(
&Params,
@@ -2696,7 +2698,7 @@ WDI_TxCreditCheck(
GLWdiTxRxStatistics.monitorTxPauseReason = pWdi->txPauseReason;
// First check if we have pause indication before.
- // not to acquire tx lock frequently, so we do not acquire tx lock when read, but remember
+ // not to acquire tx lock frequently, so we do not acquire tx lock when read, but remember
// we should acquire tx lock when need to change the pause reason.
if(pWdi->txPauseReason)
{
@@ -2704,26 +2706,26 @@ WDI_TxCreditCheck(
txCredit = *Get_NUM_IDLE_TCB(pAdapter);
preTxPauseReason = pWdi->txPauseReason;
-
+
RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], WDI_TxCreditCheck(): txCredit=%d\n", txCredit));
-
+
if(txCredit > (pAdapter->RT_TCB_NUM/4))
{
GLWdiTxRxStatistics.numTxResourceAvailable++;
-
+
if( (preTxPauseReason&WDI_TX_PAUSE_REASON_CREDIT) == WDI_TX_PAUSE_REASON_CREDIT)
{
- RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], WDI_TxCreditCheck(): TxPauseReason = 0x%x!!!\n", preTxPauseReason));
+ RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], WDI_TxCreditCheck(): TxPauseReason = 0x%x!!!\n", preTxPauseReason));
GLWdiTxRxStatistics.numWdiTxRestartIndicate++;
RT_TRACE(COMP_INIT, DBG_LOUD, ("[WDI], WDI_TxCreditCheck(): TxSendRestart: %d times!!!\n",
GLWdiTxRxStatistics.numWdiTxRestartIndicate));
-
+
pWdi->txPauseReason &= ~WDI_TX_PAUSE_REASON_CREDIT;
PlatformReleaseSpinLock(pAdapter, RT_TX_SPINLOCK);
// Before indicate to WDI, release the tx lock.
- pWdi->WdiDataApi.TxSendRestartIndication(pWdi->DataPathHandle,
- WDI_PORT_ANY,
+ pWdi->WdiDataApi.TxSendRestartIndication(pWdi->DataPathHandle,
+ WDI_PORT_ANY,
WDI_PEER_ANY,
WDI_EXT_TID_UNKNOWN,
WDI_TX_PAUSE_REASON_CREDIT);
@@ -2749,10 +2751,10 @@ WDI_IndicateFWStalled(
PWDI_DATA_STRUCT pWdi = &(pAdapter->pPortCommonInfo->WdiData);
NDIS_STATUS_INDICATION statusIndication = {0};
WDI_MESSAGE_HEADER WdiHeader = {0};
-
+
if(!pWdi->bWdiLEPLDR)
return;
-
+
RT_TRACE(COMP_OID_SET, DBG_LOUD, ("==> WDI_IndicateFWStalled\n"));
N6_ASSIGN_OBJECT_HEADER(
@@ -2818,7 +2820,7 @@ WDI_IndicateGeneralEvent(
)
{
RT_STATUS rtStatus = RT_STATUS_SUCCESS;
-
+
switch(Event)
{
default:
diff --git a/network/wsk/echosrv/README.md b/network/wsk/echosrv/README.md
index 8b93db2d..96cc02d5 100644
--- a/network/wsk/echosrv/README.md
+++ b/network/wsk/echosrv/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WSK TCP Echo Server
+ platform: WDM
+ language: cpp
+ category: Network
+ description: A minimal sample driver to demonstrate the usage of the Winsock Kernel (WSK) programming interface.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617935
+--->
+
+
WSK TCP Echo Server
===================
diff --git a/nfc/Simulator/README.md b/nfc/Simulator/README.md
index dfdeaa7c..17b3bdac 100644
--- a/nfc/Simulator/README.md
+++ b/nfc/Simulator/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: NFC Simulator Driver Sample
+ platform: UMDF2
+ language: cpp
+ category: NFC
+ description: Demonstrates how to use UMDF to write a Near-Field Communication (NFC) universal driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620199
+--->
+
+
NFC Simulator Driver Sample
===========================
This sample demonstrates how to use User-Mode Driver Framework (UMDF) to write a Near-Field Communication (NFC) universal driver along with best practices.
diff --git a/nfp/net/README.md b/nfp/net/README.md
index aeb2c630..5f9c670b 100644
--- a/nfp/net/README.md
+++ b/nfp/net/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Near-Field Proximity Sample Driver (UMDF Version 1)
+ platform: UMDF1
+ language: cpp
+ category: Proximity
+ description: Demonstrates how to use UMDF version 1 to write a near-field proximity driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620200
+--->
+
+
Near-Field Proximity Sample Driver (UMDF Version 1)
===================================================
diff --git a/pofx/PEP/README.md b/pofx/PEP/README.md
index 41bef908..079dbec6 100644
--- a/pofx/PEP/README.md
+++ b/pofx/PEP/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Power Engine Plugin (PEP) ACPI Sample
+ platform: KMDF
+ language: cpp
+ category: ACPI Power
+ description: Demonstrates an interface which allows PEP to implement ACPI runtime methods natively via a driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620311
+--->
+
+
PEP ACPI Sample
===============
diff --git a/pofx/UMDF2/README.md b/pofx/UMDF2/README.md
index db47b385..78cf1f40 100644
--- a/pofx/UMDF2/README.md
+++ b/pofx/UMDF2/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Power Framework (PoFx) Sample (UMDF Version 2)
+ platform: UMDF2
+ language: cpp
+ category: Power
+ description: Demonstrates how a UMDF version 2 driver can implement F-state-based power management.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617936
+--->
+
+
Power Framework (PoFx) Sample (UMDF Version 2)
==============================================
diff --git a/pofx/WDF/README.md b/pofx/WDF/README.md
index 2f8009c3..7915dbd7 100644
--- a/pofx/WDF/README.md
+++ b/pofx/WDF/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: KMDF Power Framework (PoFx) Sample
+ platform: KMDF
+ language: cpp
+ category: Power
+ description: Demonstrate how a KMDF driver can implement F-state-based power management.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617937
+--->
+
+
KMDF Power Framework (PoFx) Sample
==================================
diff --git a/pos/drivers/MagneticStripeReader/README.md b/pos/drivers/MagneticStripeReader/README.md
index 5530f60c..4e8d8088 100644
--- a/pos/drivers/MagneticStripeReader/README.md
+++ b/pos/drivers/MagneticStripeReader/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Magnetic Stripe Reader Driver Sample
+ platform: UMDF2
+ language: cpp
+ category: POS
+ description: This UMDF version 2 sample serves as a template for creating a new Magnetic Stripe Reader driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620202
+--->
+
+
Magnetic Stripe Reader Driver Sample
====================================
This sample serves as a template for creating a new Magnetic Stripe Reader driver.
diff --git a/pos/drivers/barcodescanner/README.md b/pos/drivers/barcodescanner/README.md
index 8df934b3..f6d7926b 100644
--- a/pos/drivers/barcodescanner/README.md
+++ b/pos/drivers/barcodescanner/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Barcode Scanner Driver Sample
+ platform: UMDF2
+ language: cpp
+ category: POS
+ description: This UDMF version 2 sample serves as a template for creating a new Barcode Scanner driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620201
+--->
+
+
Barcode Scanner Driver Sample
====================================
This sample serves as a template for creating a new Barcode Scanner driver.
diff --git a/print/SampleOpenXPS/README.md b/print/SampleOpenXPS/README.md
index a50148e4..f939583f 100644
--- a/print/SampleOpenXPS/README.md
+++ b/print/SampleOpenXPS/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: OpenXPS Documents Print Sample
+ platform: Application
+ language: cpp
+ category: Print
+ description: Contains a set of documents that exercise a variety of features of OpenXPS.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617941
+--->
+
+
OpenXPS Documents Print Sample
==============================
diff --git a/print/SampleXPS/README.md b/print/SampleXPS/README.md
index 18a242bb..b1c39d3e 100644
--- a/print/SampleXPS/README.md
+++ b/print/SampleXPS/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: XPS Documents Print Sample
+ platform: Application
+ language: cpp
+ category: Print
+ description: Contains a set of documents that exercise a variety of features of the XML Paper Specification.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617942
+--->
+
+
XPS Documents Print Sample
==========================
diff --git a/print/SimplePipelineFilter/README.md b/print/SimplePipelineFilter/README.md
index 06f17b61..c7a92e48 100644
--- a/print/SimplePipelineFilter/README.md
+++ b/print/SimplePipelineFilter/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Print Pipeline Simple Filter
+ platform: DLL
+ language: cpp
+ category: Print
+ description: This sample shows how to use the print pipeline's filter interfaces.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617944
+--->
+
+
Print Pipeline Simple Filter
============================
diff --git a/print/XPSDrvSmpl/README.md b/print/XPSDrvSmpl/README.md
index f90ae5cf..7c75a314 100644
--- a/print/XPSDrvSmpl/README.md
+++ b/print/XPSDrvSmpl/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: XPSDrv Driver and Filter Sample
+ platform: DLL
+ language: cpp
+ category: Print
+ description: Provide a starting point for developing XPSDrv printer drivers and to illustrate the facility and potential of an XPSDrv print driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617950
+--->
+
+
XPSDrv Driver and Filter Sample
===============================
diff --git a/print/XPSDrvSmpl/src/common/pshndlr.cpp b/print/XPSDrvSmpl/src/common/pshndlr.cpp
index 868378da..90acda70 100644
--- a/print/XPSDrvSmpl/src/common/pshndlr.cpp
+++ b/print/XPSDrvSmpl/src/common/pshndlr.cpp
@@ -1259,7 +1259,7 @@ Note:
The annotation for pbstrValue is intended to express that the BSTR may
be NULL when S_FALSE is returned, but not when S_OK is returned.
-
+
In any case, when a failure HRESULT is returned, all out parameter
annotations are ignored.
diff --git a/print/XPSDrvSmpl/src/common/ptquerybld.cpp b/print/XPSDrvSmpl/src/common/ptquerybld.cpp
index c2113932..cc7faa8a 100644
--- a/print/XPSDrvSmpl/src/common/ptquerybld.cpp
+++ b/print/XPSDrvSmpl/src/common/ptquerybld.cpp
@@ -496,7 +496,8 @@ CPTQueryBuilder::AddOption(
SUCCEEDED(hr = m_bstrQuery.Append(szPTQOrNodes)) &&
SUCCEEDED(hr = m_bstrQuery.Append(cstrQueryRoot)))
{
- cstrOptionQuery.Format(szPTQOptionLH, static_cast<LPCWSTR>(m_bstrFrameworkNS), bstrKeywordNS, static_cast<LPCWSTR>(m_bstrFrameworkNS));
+ cstrOptionQuery.Format(szPTQOptionLH, static_cast<LPCWSTR>(m_bstrFrameworkNS),
+ static_cast<LPCWSTR>(bstrKeywordNS), static_cast<LPCWSTR>(m_bstrFrameworkNS));
hr = m_bstrQuery.Append(cstrOptionQuery);
}
}
diff --git a/print/XPSDrvSmpl/src/filters/color/cmimg.cpp b/print/XPSDrvSmpl/src/filters/color/cmimg.cpp
index 5f861422..6c312629 100644
--- a/print/XPSDrvSmpl/src/filters/color/cmimg.cpp
+++ b/print/XPSDrvSmpl/src/filters/color/cmimg.cpp
@@ -537,7 +537,7 @@ CColorManagedImage::GetResURI(
// Create a unique name for the bitmap for this print session
//
CStringXDW cstrURI;
- cstrURI.Format(L"%s_%u.wdp", static_cast<LPCTSTR>(cstrFileName), GetUniqueNumber());
+ cstrURI.Format(L"%s_%u.wdp", static_cast<LPCWSTR>(cstrFileName), GetUniqueNumber());
SysFreeString(*pbstrResURI);
*pbstrResURI = cstrURI.AllocSysString();
diff --git a/print/XPSDrvSmpl/src/filters/common/ptmanage.cpp b/print/XPSDrvSmpl/src/filters/common/ptmanage.cpp
index b1c52db2..fa50170f 100644
--- a/print/XPSDrvSmpl/src/filters/common/ptmanage.cpp
+++ b/print/XPSDrvSmpl/src/filters/common/ptmanage.cpp
@@ -178,9 +178,9 @@ CPTManager::Initialise(
//
// We couldn't revert the security context. The filter pipeline
// manager will clean up the thread when operation is complete,
- // when it is determined that the security context was not
- // reverted. Since there are no security implications with
- // running this filter in an elevated context, we can
+ // when it is determined that the security context was not
+ // reverted. Since there are no security implications with
+ // running this filter in an elevated context, we can
// continue to run.
//
}
@@ -589,7 +589,7 @@ CPTManager::GetCapabilities(
{
}
}
-
+
//
// Always revert back to the default security context
//
@@ -598,9 +598,9 @@ CPTManager::GetCapabilities(
//
// We couldn't revert the security context. The filter pipeline
// manager will clean up the thread when operation is complete,
- // when it is determined that the security context was not
- // reverted. Since there are no security implications with
- // running this filter in an elevated context, we can
+ // when it is determined that the security context was not
+ // reverted. Since there are no security implications with
+ // running this filter in an elevated context, we can
// continue to run.
//
}
@@ -1047,9 +1047,9 @@ CPTManager::GetMergedTicket(
//
// We couldn't revert the security context. The filter pipeline
// manager will clean up the thread when operation is complete,
- // when it is determined that the security context was not
- // reverted. Since there are no security implications with
- // running this filter in an elevated context, we can
+ // when it is determined that the security context was not
+ // reverted. Since there are no security implications with
+ // running this filter in an elevated context, we can
// continue to run.
//
}
diff --git a/print/XPSDrvSmpl/src/filters/nup/nupsax.cpp b/print/XPSDrvSmpl/src/filters/nup/nupsax.cpp
index 399b353b..6c92730c 100644
--- a/print/XPSDrvSmpl/src/filters/nup/nupsax.cpp
+++ b/print/XPSDrvSmpl/src/filters/nup/nupsax.cpp
@@ -266,7 +266,7 @@ CNUpSaxHandler::startElement(
if (sizePage.Width < 1.f)
{
//
- // According to the Xps Specification,
+ // According to the Xps Specification,
// FixedPage Width must be >= 1.0
//
hr = E_FAIL;
@@ -364,7 +364,7 @@ CNUpSaxHandler::startElement(
cstrOut.Format(L"<Canvas RenderTransform=\"%s\" Clip=\"%s\"",
static_cast<LPCWSTR>(bstrMatrix),
- static_cast<LPCTSTR>(strClip));
+ static_cast<LPCWSTR>(strClip));
//
// Add additional namespaces from the FixedPage
diff --git a/print/XPSDrvSmpl/src/filters/watermark/wmvect.cpp b/print/XPSDrvSmpl/src/filters/watermark/wmvect.cpp
index a7c9d595..3c73b2ba 100644
--- a/print/XPSDrvSmpl/src/filters/watermark/wmvect.cpp
+++ b/print/XPSDrvSmpl/src/filters/watermark/wmvect.cpp
@@ -159,7 +159,8 @@ CVectorWatermark::CreateXMLElement(
try
{
CStringXDW strOpenCanvas;
- strOpenCanvas.Format(L"<Canvas Opacity=\"%s\" RenderTransform=\"%s\">", static_cast<LPCWSTR>(bstrWMOpacity), static_cast<LPCWSTR>(bstrMatrixXForm));
+ strOpenCanvas.Format(L"<Canvas Opacity=\"%s\" RenderTransform=\"%s\">",
+ static_cast<LPCWSTR>(bstrWMOpacity), static_cast<LPCWSTR>(bstrMatrixXForm));
IStream* pStream;
CComBSTR bstrContent;
diff --git a/print/XpsRasFilter/README.md b/print/XpsRasFilter/README.md
index a742f66c..344c6bf9 100644
--- a/print/XpsRasFilter/README.md
+++ b/print/XpsRasFilter/README.md
@@ -1,3 +1,14 @@
+<!---
+ name: XPS Rasterization Filter Service Sample
+ platform: DLL
+ language: cpp
+ category: Print
+ description: Implements an XPSDrv filter that rasterizes fixed pages in an XPS document.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617951
+--->
+
+
+
XPS Rasterization Filter Service Sample
=======================================
diff --git a/print/autoconfig/README.md b/print/autoconfig/README.md
index d215c36f..38a442e2 100644
--- a/print/autoconfig/README.md
+++ b/print/autoconfig/README.md
@@ -1,4 +1,14 @@
-Print auto-configuration sample test
+<!---
+ name: Print auto-configuration sample
+ platform: Utility
+ language: cpp
+ category: Print
+ description: Demonstrates how to implement auto-configuration in v4 print drivers.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617938
+--->
+
+
+Print auto-configuration sample
===============================
This sample demonstrates how to implement auto-configuration in v4 print drivers.
diff --git a/print/cpsuisam/README.md b/print/cpsuisam/README.md
index a4fddfb9..b289ad82 100644
--- a/print/cpsuisam/README.md
+++ b/print/cpsuisam/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Common Property Sheet User Interface (CPSUI) Sample
+ platform: Application
+ language: cpp
+ category: Print
+ description: The CPSUISAM application causes the CPSUI to call the print spooler to create property sheet pages for the default printer.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617940
+--->
+
+
Common Property Sheet UI Sample
===============================
diff --git a/print/v4PrintDriverSamples/PrinterExtensionSample/README.md b/print/v4PrintDriverSamples/PrinterExtensionSample/README.md
index ca5f6837..c76f31d8 100644
--- a/print/v4PrintDriverSamples/PrinterExtensionSample/README.md
+++ b/print/v4PrintDriverSamples/PrinterExtensionSample/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Printer Extension Sample
+ platform: Application
+ language: cs
+ category: Print
+ description: Demonstrates how to use .NET to build a customized, desktop UI for a v4 print driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617945
+--->
+
+
Printer Extension Sample
========================
diff --git a/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md b/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md
index 71a6f72b..f0f64424 100644
--- a/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md
+++ b/print/v4PrintDriverSamples/v4PrintDriver-ConstraintScript/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Print Driver Constraints Sample
+ platform: Utility
+ language: js
+ category: Print
+ description: Demonstrates how to implement advanced constraint handling and PrintTicket/PrintCapabilities handling using JavaScript.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617946
+--->
+
+
Print Driver Constraints Sample
===============================
diff --git a/print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver/README.md b/print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver/README.md
index 6d3b77d0..09fdd30c 100644
--- a/print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver/README.md
+++ b/print/v4PrintDriverSamples/v4PrintDriver-HostBasedSampleDriver/README.md
@@ -1,3 +1,14 @@
+<!---
+ name: USB Host-Based Print Driver Sample
+ platform: Utility
+ language: js
+ category: Print
+ description: Demonstrates how to support host-based devices that use the v4 print driver model and are connected via USB.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617947
+--->
+
+
+
USB Host-Based Print Driver Sample
==================================
diff --git a/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/README.md b/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/README.md
index 294dee1e..cebf8145 100644
--- a/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/README.md
+++ b/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Print Driver USB Monitor and Bidi Sample
+ platform: Utility
+ language: js xml
+ category: Print
+ description: Demonstrates how to support bidirectional (Bidi) communication over the USB bus using JavaScript and XML.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617948
+--->
+
+
Print Driver USB Monitor and Bidi Sample
========================================
diff --git a/print/v4PrintDriverSamples/v4PrintDriver-WSDMon-Bidi-Extension/README.md b/print/v4PrintDriverSamples/v4PrintDriver-WSDMon-Bidi-Extension/README.md
index 6556ab25..385002c0 100644
--- a/print/v4PrintDriverSamples/v4PrintDriver-WSDMon-Bidi-Extension/README.md
+++ b/print/v4PrintDriverSamples/v4PrintDriver-WSDMon-Bidi-Extension/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WSDMon Bidi Extension Sample
+ platform: Utility
+ language: xml
+ category: Print
+ description: Demonstrates how to use an XML extension file to support bidirectional (Bidi) communication with a WSD connected printer.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617949
+--->
+
+
WSDMon Bidi Extension Sample
============================
diff --git a/sd/miniport/sdhc/README.md b/sd/miniport/sdhc/README.md
index b5c35093..a1e81cde 100644
--- a/sd/miniport/sdhc/README.md
+++ b/sd/miniport/sdhc/README.md
@@ -1,5 +1,15 @@
+<!---
+ name: Standard SD Host Controller Miniport
+ platform: WDM
+ language: cpp
+ category: Storage
+ description: Provides a functional miniport implementation for a standard SD host controller.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617952
+--->
+
+
Standard SD Host Controller Miniport
-===================
+====================================
This is a sample for a Secure Digital (SD) Host Controller miniport driver. The driver works in conjunction with sdport.sys, which implements SD/SDIO/eMMC protocol and WDM interfaces, to provide the host register interface.
diff --git a/sd/sdiomars/README.md b/sd/sdiomars/README.md
index 322ac5a4..2f248936 100644
--- a/sd/sdiomars/README.md
+++ b/sd/sdiomars/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SDIO Driver
+ platform: KMDF
+ language: cpp
+ category: Storage
+ description: A functional KMDF Secure Digital (SD) IO driver for use with a generic mars development board.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617953
+--->
+
+
Storage SDIO Driver
===================
diff --git a/sd/sdiomars/mars.vcxproj b/sd/sdiomars/mars.vcxproj
index fc11a774..21ca54ce 100644
--- a/sd/sdiomars/mars.vcxproj
+++ b/sd/sdiomars/mars.vcxproj
@@ -101,15 +101,15 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\sdbus.lib;$(DDK_LIB_PATH)\ntstrsafe.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
</Midl>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -117,15 +117,15 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\sdbus.lib;$(DDK_LIB_PATH)\ntstrsafe.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
</Midl>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -133,15 +133,15 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\sdbus.lib;$(DDK_LIB_PATH)\ntstrsafe.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
</Midl>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -149,15 +149,15 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\sdbus.lib;$(DDK_LIB_PATH)\ntstrsafe.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
</Midl>
</ItemDefinitionGroup>
<ItemGroup>
@@ -176,4 +176,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/security/elam/README.md b/security/elam/README.md
index 927dc32d..bbd5b772 100644
--- a/security/elam/README.md
+++ b/security/elam/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Early Launch Anti-Malware Driver
+ platform: KMDF
+ language: cpp
+ category: Security
+ description: Demonstrates how to receive notifications about the initialization of regular boot start drivers in an Early Launch Anti-Malware driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617954
+--->
+
+
Early Launch Anti-Malware Driver
================================
diff --git a/security/elam/elamsample.c b/security/elam/elamsample.c
index 13654d6e..0877ee71 100644
--- a/security/elam/elamsample.c
+++ b/security/elam/elamsample.c
@@ -20,7 +20,7 @@
// Kernel mode only.
//
-#include <elamsample.h>
+#include "elamsample.h"
#ifdef ALLOC_PRAGMA
#pragma alloc_text(INIT, DriverEntry)
diff --git a/sensors/ADXL345Acc/ADXL345Acc.inx b/sensors/ADXL345Acc/ADXL345Acc.inx
index 763a75e8..14ae5aad 100644
--- a/sensors/ADXL345Acc/ADXL345Acc.inx
+++ b/sensors/ADXL345Acc/ADXL345Acc.inx
Binary files differ
diff --git a/sensors/ADXL345Acc/Gallery.xml b/sensors/ADXL345Acc/Gallery.xml
deleted file mode 100644
index 2d3eabf5..00000000
--- a/sensors/ADXL345Acc/Gallery.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="../../buildx/script2/preview.xslt"?>
-<gallery_sample xmlns="http://microsoft.com/wdcml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://microsoft.com/wdcml ../../buildx/schema/xsd/wdcml.xsd">
- <metadata id="gallery_samples.107a_gallery" type="gallery_sample" msdnID="7cba6311-f0db-4c3d-8f1f-25de8648b353">
- <title>ADXL345Accelerometer</title>
- <!-- Add a devlang for each programming language in all versions of the sample. -->
- <devlang value="cpp" />
- <!-- Do not change tech value -->
- <tech value="gallery_samples" />
- <index />
- <sample_langs>
- <!-- Describes the languages to which the sample code itself has been localized. -->
- <sample_lang xml:lang="en-us" />
- </sample_langs>
- </metadata>
- <content>
- <desc>
- <p><abstract>The ADXL345Accelerometer sample shows how to write a UMDF v2 driver to control an ADXL345 accelerometer chip.</abstract></p>
- </desc>
- <outline />
- <license_info>
- <default_license />
- </license_info>
- <programming_models>
- <programming_model value="win32" />
- </programming_models>
- <application_frameworks>
- </application_frameworks>
- <!-- For Driver Samples Only -->
- <driver_models>
- <!-- possible values: kmdf, umdf, wdm, ndis, wddm -->
- <driver_model value="UMDF" />
- </driver_models>
- <driver_techs>
- <driver_tech value="Windows Driver" />
- </driver_techs>
- <related_techs>
- </related_techs>
- <os_requirements>
- <min_os>
- <client name="winblue"/>
- <server name="wbluesrv"/>
- </min_os>
- </os_requirements>
- <required_sdks>
- <min_sdk>
- <tla rid="windows_driver_kit_8" />
- </min_sdk>
- </required_sdks>
- <supported_ides>
- <supported_ide>
- <tla rid="tla_visualstu2013" />
- </supported_ide>
- </supported_ides>
- <build_info>
- <authored_instructions>
- <section>
- <!-- Include any special instructions for compiling your sample -->
- <sectioncontents>
- </sectioncontents>
- </section>
- </authored_instructions>
- </build_info>
- <run_info>
- <authored_instructions>
- <section>
- <sectioncontents>
- <p>To install the sample driver, follow these steps:</p>
- <proch>
- <item>Ensure that the driver builds without errors.</item>
- <item>Ensure the appropriate hardware resources have been assigned in the ACPI table using ASL. A device node with HWID ACPI\ADXL345Acc should be created.</item>
- <item>Copy the DLL and INF files to a separate folder.</item>
- <item>Enter the command "<inline_code devlang="cmd">devcon.exe update ADXL345Acc.inf ACPI\ADXL345Acc</inline_code>" to install the driver on an existing device node. You can find the devcon.exe program in the tools\devcon folder where you installed the WDK.</item>
- </proch>
- </sectioncontents>
- </section>
- <section>
- <title>File manifest</title>
- <sectioncontents>
- <p>The following source files are in the src\Sensors\ADXL345Acc folder and are used to build the ADXL345Acc.dll and ADXL345Acc.inf files.</p>
- <table>
- <tr>
- <th>File</th>
- <th>Description</th>
- </tr>
- <tr>
- <td>
- <p>device.h, device.cpp</p>
- </td>
- <td>
- <p>Implements the driver's WDF PnP event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>client.cpp</p>
- </td>
- <td>
- <p>Implements the driver's callback functions from the class extension to the ADXL345 accelerometer.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>driver.h, driver.cpp</p>
- </td>
- <td>
- <p>WDF driver entry event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>ADXL345.h</p>
- </td>
- <td>
- <p>Device specific definitions.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>makefile.inc</p>
- </td>
- <td>
- <p>Defines custom build actions. Includes the conversion of the .INX file into a .INF file.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>SensorsTrace.h</p>
- </td>
- <td>
- <p>Implementation the sensor traces files.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>ADXL345Acc.ctl</p>
- </td>
- <td>
- <p>Declaration of driver's tracing GUID</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>ADXL345Acc.inx</p>
- </td>
- <td>
- <p>Describes the installation of the driver. The build process converts this into a .INF.</p>
- </td>
- </tr>
- </table>
- </sectioncontents>
- </section>
- </authored_instructions>
- </run_info>
- </content>
- <!-- List the component compcentral path -->
- <feature_teams>
- <feature_team_info comp_central_path="CORE-OS Core\SiGMa-Silicon, Graphics and Media\SiPlat - Silicon Platform\Sensors" dev_owner="osamasal" writer_owner="ericdoku" />
- </feature_teams>
- <workflow_control_host />
-</gallery_sample>
diff --git a/sensors/ADXL345Acc/readme.md b/sensors/ADXL345Acc/readme.md
new file mode 100644
index 00000000..3d49e89f
--- /dev/null
+++ b/sensors/ADXL345Acc/readme.md
@@ -0,0 +1,12 @@
+<!---
+ name: ADXL345 Accelerometer Sample Driver
+ platform: UMDF2
+ language: cpp
+ category: Sensors
+ description: Demonstrates how to write a UMDF v2 driver to control an ADXL345 accelerometer chip.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617957
+--->
+
+# ADXL345 Accelerometer Sample Driver
+
+The ADXL345 accelerometer sample shows how to write a UMDF v2 driver to control an ADXL345 accelerometer chip.
diff --git a/sensors/Activity/Activity.inx b/sensors/Activity/Activity.inx
index 91c32a5c..01f2fd3b 100644
--- a/sensors/Activity/Activity.inx
+++ b/sensors/Activity/Activity.inx
Binary files differ
diff --git a/sensors/Activity/Device.h b/sensors/Activity/Device.h
index 64b2a5e4..afd205db 100644
--- a/sensors/Activity/Device.h
+++ b/sensors/Activity/Device.h
@@ -12,7 +12,7 @@
#include <wdf.h>
#include <math.h>
-#include <SensorsTrace.h>
+#include "SensorsTrace.h"
#include <SensorsCx.h>
#include <SensorsUtils.h>
@@ -197,4 +197,4 @@ private:
//
// Set up accessor function to retrieve device context
//
-WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(ActivityDevice, GetActivityContextFromSensorInstance); \ No newline at end of file
+WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(ActivityDevice, GetActivityContextFromSensorInstance);
diff --git a/sensors/Activity/Gallery.xml b/sensors/Activity/Gallery.xml
deleted file mode 100644
index bb6e792a..00000000
--- a/sensors/Activity/Gallery.xml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="../../buildx/script2/preview.xslt"?>
-<gallery_sample xmlns="http://microsoft.com/wdcml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://microsoft.com/wdcml ../../buildx/schema/xsd/wdcml.xsd">
- <metadata id="gallery_samples.107a_gallery" type="gallery_sample" msdnID="7cba6311-f0db-4c3d-8f1f-25de8648b353">
- <title>Activity</title>
- <!-- Add a devlang for each programming language in all versions of the sample. -->
- <devlang value="cpp" />
- <!-- Do not change tech value -->
- <tech value="gallery_samples" />
- <index />
- <sample_langs>
- <!-- Describes the languages to which the sample code itself has been localized. -->
- <sample_lang xml:lang="en-us" />
- </sample_langs>
- </metadata>
- <content>
- <desc>
- <p><abstract>The activity sensor sample shows how to write a UMDF v2 driver to control a virtual activity sensor.</abstract></p>
- </desc>
- <outline />
- <license_info>
- <default_license />
- </license_info>
- <programming_models>
- <programming_model value="win32" />
- </programming_models>
- <application_frameworks>
- </application_frameworks>
- <!-- For Driver Samples Only -->
- <driver_models>
- <!-- possible values: kmdf, umdf, wdm, ndis, wddm -->
- <driver_model value="UMDF" />
- </driver_models>
- <driver_techs>
- <driver_tech value="Windows Driver" />
- </driver_techs>
- <related_techs>
- </related_techs>
- <os_requirements>
- <min_os>
- <client name="winblue"/>
- <server name="wbluesrv"/>
- </min_os>
- </os_requirements>
- <required_sdks>
- <min_sdk>
- <tla rid="windows_driver_kit_8" />
- </min_sdk>
- </required_sdks>
- <supported_ides>
- <supported_ide>
- <tla rid="tla_visualstu2012" />
- </supported_ide>
- </supported_ides>
- <build_info>
- <authored_instructions>
- <section>
- <!-- Include any special instructions for compiling your sample -->
- <sectioncontents>
- </sectioncontents>
- </section>
- </authored_instructions>
- </build_info>
- <run_info>
- <authored_instructions>
- <section>
- <sectioncontents>
- <p>To install the sample driver, follow these steps:</p>
- <proch>
- <item>Ensure that the driver builds without errors.</item>
- <item>Copy the DLL and INF files to a separate folder.</item>
- <item>Enter the command "<inline_code devlang="cmd">devcon.exe update Activity.inf ACPI\&lt;HWID&gt;</inline_code>" to install the driver on an existing device node. You can find the devcon.exe program in the tools\devcon folder where you installed the WDK.</item>
- </proch>
- </sectioncontents>
- </section>
- <section>
- <title>File manifest</title>
- <sectioncontents>
- <p>The following source files are in the src\Sensors\Activity folder and are used to build the Activity.dll and Activity.inf files.</p>
- <table>
- <tr>
- <th>File</th>
- <th>Description</th>
- </tr>
- <tr>
- <td>
- <p>device.h, device.cpp</p>
- </td>
- <td>
- <p>Implements the driver's WDF PnP event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>client.cpp</p>
- </td>
- <td>
- <p>Implements the driver's callback functions from the class extension to activity sensors.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>driver.h, driver.cpp</p>
- </td>
- <td>
- <p>WDF driver entry event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>hardwaresimulator.h, hardwaresimulator.cpp</p>
- </td>
- <td>
- <p>Hardware simulator implementation</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>makefile.inc</p>
- </td>
- <td>
- <p>Defines custom build actions. Includes the conversion of the .INX file into a .INF file.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>SensorsTrace.h</p>
- </td>
- <td>
- <p>Implementation the sensor traces files.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Activity.ctl</p>
- </td>
- <td>
- <p>Declaration of driver's tracing GUID</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Activity.inx</p>
- </td>
- <td>
- <p>Describes the installation of the driver. The build process converts this into a .INF.</p>
- </td>
- </tr>
- </table>
- </sectioncontents>
- </section>
- </authored_instructions>
- </run_info>
- </content>
- <!-- List the component compcentral path -->
- <feature_teams>
- <feature_team_info comp_central_path="CORE-OS Core\SiGMa-Silicon, Graphics and Media\SiPlat - Silicon Platform\Sensors" dev_owner="osamasal" writer_owner="ericdoku" />
- </feature_teams>
- <workflow_control_host />
-</gallery_sample>
diff --git a/sensors/Activity/readme.md b/sensors/Activity/readme.md
new file mode 100644
index 00000000..7c9292e0
--- /dev/null
+++ b/sensors/Activity/readme.md
@@ -0,0 +1,12 @@
+<!---
+ name: Activity Sensor Driver Sample
+ platform: UMDF2
+ language: cpp
+ category: Sensors
+ description: Demonstrates how to write a UMDF v2 driver to control an activity sensor.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617956
+--->
+
+# Activity Sensor Driver Sample
+
+The Activity sample shows how to write a UMDF v2 driver to control an activity sensor. \ No newline at end of file
diff --git a/sensors/CustomSensors/CustomSensors.inx b/sensors/CustomSensors/CustomSensors.inx
index 6a0ec8cc..fb73ab41 100644
--- a/sensors/CustomSensors/CustomSensors.inx
+++ b/sensors/CustomSensors/CustomSensors.inx
Binary files differ
diff --git a/sensors/CustomSensors/Device.h b/sensors/CustomSensors/Device.h
index 0679b137..692bf675 100644
--- a/sensors/CustomSensors/Device.h
+++ b/sensors/CustomSensors/Device.h
@@ -15,7 +15,7 @@
#include <wdf.h>
#include <math.h>
-#include <SensorsTrace.h>
+#include "SensorsTrace.h"
#include <SensorsCx.h>
#include <SensorsUtils.h>
@@ -135,4 +135,4 @@ WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(CustomSensorDevice, GetCustomSensorContextFro
#define CustomSensorDevice_Resolution (0.1f) // CO2 concentration resolution in parts per million (ppmv).
#define CustomSensorDevice_Minimum_CO2Level (0.0f) // Minimum CO2 concentration in parts per million (ppmv).
-#define CustomSensorDevice_Maximum_CO2Level (10000.0f) // Maximum CO2 concentration in parts per million (ppmv). \ No newline at end of file
+#define CustomSensorDevice_Maximum_CO2Level (10000.0f) // Maximum CO2 concentration in parts per million (ppmv).
diff --git a/sensors/CustomSensors/Gallery.xml b/sensors/CustomSensors/Gallery.xml
deleted file mode 100644
index 8f84093a..00000000
--- a/sensors/CustomSensors/Gallery.xml
+++ /dev/null
@@ -1,168 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="../../buildx/script2/preview.xslt"?>
-<gallery_sample xmlns="http://microsoft.com/wdcml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://microsoft.com/wdcml ../../buildx/schema/xsd/wdcml.xsd">
- <metadata id="gallery_samples.107a_gallery" type="gallery_sample" msdnID="7cba6311-f0db-4c3d-8f1f-25de8648b353">
- <title>CustomSensors</title>
- <!-- Add a devlang for each programming language in all versions of the sample. -->
- <devlang value="cpp" />
- <!-- Do not change tech value -->
- <tech value="gallery_samples" />
- <index />
- <sample_langs>
- <!-- Describes the languages to which the sample code itself has been localized. -->
- <sample_lang xml:lang="en-us" />
- </sample_langs>
- </metadata>
- <content>
- <desc>
- <p><abstract>The CustomSensors sample shows how to write a UMDF v2 driver to control a virtual CO2 sensor.</abstract></p>
- </desc>
- <outline />
- <license_info>
- <default_license />
- </license_info>
- <programming_models>
- <programming_model value="win32" />
- </programming_models>
- <application_frameworks>
- </application_frameworks>
- <!-- For Driver Samples Only -->
- <driver_models>
- <!-- possible values: kmdf, umdf, wdm, ndis, wddm -->
- <driver_model value="UMDF" />
- </driver_models>
- <driver_techs>
- <driver_tech value="Windows Driver" />
- </driver_techs>
- <related_techs>
- </related_techs>
- <os_requirements>
- <min_os>
- <client name="winblue"/>
- <server name="wbluesrv"/>
- </min_os>
- </os_requirements>
- <required_sdks>
- <min_sdk>
- <tla rid="windows_driver_kit_8" />
- </min_sdk>
- </required_sdks>
- <supported_ides>
- <supported_ide>
- <tla rid="tla_visualstu2012" />
- </supported_ide>
- </supported_ides>
- <build_info>
- <authored_instructions>
- <section>
- <!-- Include any special instructions for compiling your sample -->
- <sectioncontents>
- </sectioncontents>
- </section>
- </authored_instructions>
- </build_info>
- <run_info>
- <authored_instructions>
- <section>
- <sectioncontents>
- <p>To install the sample driver, follow these steps:</p>
- <proch>
- <item>Ensure that the driver builds without errors.</item>
- <item>Copy the DLL and INF files to a separate folder.</item>
- <item>Enter the command "<inline_code devlang="cmd">devcon.exe update CustomSensors.inf ACPI\&lt;HWID&gt;</inline_code>" to install the driver on an existing device node. You can find the devcon.exe program in the tools\devcon folder where you installed the WDK.</item>
- </proch>
- </sectioncontents>
- </section>
- <section>
- <title>File manifest</title>
- <sectioncontents>
- <p>The following source files are in the src\Sensors\CustomSensors folder and are used to build the CustomSensors.dll and CustomSensors.inf files.</p>
- <table>
- <tr>
- <th>File</th>
- <th>Description</th>
- </tr>
- <tr>
- <td>
- <p>device.h, device.cpp</p>
- </td>
- <td>
- <p>Implements the driver's WDF PnP event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>client.cpp</p>
- </td>
- <td>
- <p>Implements the driver's callback functions from the class extension to custom sensors.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>driver.h, driver.cpp</p>
- </td>
- <td>
- <p>WDF driver entry event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>hardwaresimulator.h, hardwaresimulator.cpp</p>
- </td>
- <td>
- <p>Hardware simulator implementation</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>makefile.inc</p>
- </td>
- <td>
- <p>Defines custom build actions. Includes the conversion of the .INX file into a .INF file.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>SensorsTrace.h</p>
- </td>
- <td>
- <p>Implementation the sensor traces files.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>CustomSensors.ctl</p>
- </td>
- <td>
- <p>Declaration of driver's tracing GUID</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>CustomSensor.inx</p>
- </td>
- <td>
- <p>Describes the installation of the driver. The build process converts this into a .INF.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Trace.h</p>
- </td>
- <td>
- <p>Sets up WPP tracing.</p>
- </td>
- </tr>
- </table>
- </sectioncontents>
- </section>
- </authored_instructions>
- </run_info>
- </content>
- <!-- List the component compcentral path -->
- <feature_teams>
- <feature_team_info comp_central_path="CORE-OS Core\SiGMa-Silicon, Graphics and Media\SiPlat - Silicon Platform\Sensors" dev_owner="osamasal" writer_owner="ericdoku" />
- </feature_teams>
- <workflow_control_host />
-</gallery_sample>
diff --git a/sensors/CustomSensors/HardwareSimulator.h b/sensors/CustomSensors/HardwareSimulator.h
index e170918b..3bb6e04c 100644
--- a/sensors/CustomSensors/HardwareSimulator.h
+++ b/sensors/CustomSensors/HardwareSimulator.h
@@ -14,7 +14,7 @@
#include <windows.h>
#include <wdf.h>
-#include <SensorsTrace.h>
+#include "SensorsTrace.h"
#include <SensorsCx.h>
#define SIMULATOR_HARDWARE_INTERVAL_MS (100) // 100ms
diff --git a/sensors/CustomSensors/readme.md b/sensors/CustomSensors/readme.md
new file mode 100644
index 00000000..4f58fd68
--- /dev/null
+++ b/sensors/CustomSensors/readme.md
@@ -0,0 +1,12 @@
+<!---
+ name: Custom Sensor Driver Sample
+ platform: UMDF2
+ language: cpp
+ category: Sensors
+ description: Demonstrates how to write a UMDF v2 driver to control a custom sensor.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617958
+--->
+
+# Custom Sensor Driver Sample
+
+The CustomSensor sample shows how to write a UMDF v2 driver to control a custom sensor.
diff --git a/sensors/Fusion/Device.h b/sensors/Fusion/Device.h
new file mode 100644
index 00000000..89d45ed9
--- /dev/null
+++ b/sensors/Fusion/Device.h
@@ -0,0 +1,195 @@
+//Copyright (C) Microsoft Corporation, All Rights Reserved
+//
+//Abstract:
+//
+// This module contains the type definitions for the client
+// driver's device callback class.
+//
+//Environment:
+//
+// Windows User-Mode Driver Framework (UMDF)
+
+#pragma once
+
+#include <windows.h>
+#include <wdf.h>
+#include <math.h>
+
+#include "SensorsTrace.h"
+#include <SensorsCx.h>
+#include <SensorsUtils.h>
+#include <Math3DHelper.h>
+#include <SensorsDef.h>
+
+#define SENSOR_POOL_TAG_FUSIONSENSOR 'esuF'
+
+#define FusionSensor_Default_MinDataInterval_Ms (16) // 60Hz
+#define FusionSensor_Default_DataInterval (100) // 10Hz
+#define FusionSensor_Quarternion_Maximum (1.0f)
+#define FusionSensor_Quarternion_Minimum (-1.0f)
+#define FusionSensor_Quarternion_Resolution ((FusionSensor_Quarternion_Maximum-FusionSensor_Quarternion_Minimum)/65536)
+
+
+// TODO: Customize the following 5 lines based on the hardware being used
+#define GyrFakeDevice_Minimum_DegreesPerSecond (-2000.0f)
+#define GyrFakeDevice_Maximum_DegreesPerSecond (2000.0f)
+#define GyrFakeDevice_Precision (65536.0f) // 65536 = 2^16, 16 bit data
+#define GyrFakeDevice_Range_DegreesPerSecond (GyrFakeDevice_Maximum_DegreesPerSecond - GyrFakeDevice_Minimum_DegreesPerSecond)
+#define GyrFakeDevice_Resolution_DegreesPerSecond (GyrFakeDevice_Range_DegreesPerSecond / GyrFakeDevice_Precision)
+
+// TODO: Customize the following 3 lines based on the hardware being used
+#define AccFakeDevice_Axis_Resolution (4.0f / 65536.0f) // in delta g
+#define AccFakeDevice_Axis_Minimum (-2.0f) // in g
+#define AccFakeDevice_Axis_Maximum (2.0f) // in g
+
+// Sensor Common Properties
+typedef enum
+{
+ SENSOR_PROPERTY_STATE = 0,
+ SENSOR_PROPERTY_MIN_INTERVAL,
+ SENSOR_PROPERTY_MAX_DATAFIELDSIZE,
+ SENSOR_PROPERTY_SENSOR_TYPE,
+ SENSOR_PROPERTY_USE_GYRO,
+ SENSOR_PROPERTIES_COUNT
+} SENSOR_COMMON_PROPERTIES_INDEX;
+
+// Sensor Enumeration Properties
+typedef enum
+{
+ SENSOR_TYPE_GUID = 0,
+ SENSOR_MANUFACTURER,
+ SENSOR_MODEL,
+ SENSOR_PERSISTENT_UNIQUEID,
+ SENSOR_ISPRIMARY,
+ SENSOR_ENUMERATION_PROPERTIES_COUNT
+} SENSOR_ENUMERATION_PROPERTIES_INDEX;
+
+// Accelerometer related data-field Properties
+typedef enum
+{
+ SENSOR_ACC_RESOLUTION = 0,
+ SENSOR_ACC_MIN_RANGE,
+ SENSOR_ACC_MAX_RANGE,
+ SENSOR_ACC_DATA_FIELD_PROPERTY_COUNT
+} SENSOR_ACC_DATA_FIELD_PROPERTY_INDEX;
+
+// Gyroscope related data-field Properties
+typedef enum
+{
+ SENSOR_GYR_RESOLUTION = 0,
+ SENSOR_GYR_MIN_RANGE,
+ SENSOR_GYR_MAX_RANGE,
+ SENSOR_GYR_DATA_FIELD_PROPERTY_COUNT
+} SENSOR_GYR_DATA_FIELD_PROPERTY_INDEX;
+
+// Supported Data
+typedef enum
+{
+ FUSIONSENSOR_DATA_TIMESTAMP = 0,
+ FUSIONSENSOR_DATA_QUATERNION_W,
+ FUSIONSENSOR_DATA_QUATERNION_X,
+ FUSIONSENSOR_DATA_QUATERNION_Y,
+ FUSIONSENSOR_DATA_QUATERNION_Z,
+ FUSIONSENSOR_DATA_ACCURACY,
+ FUSIONSENSOR_DATA_DECLINATION_ANGLE,
+ FUSIONSENSOR_DATA_COUNT
+} FUSIONSENSOR_DATA_INDEX;
+
+typedef enum
+{
+ FUSIONSENSOR_THRESHOLD_ROTATION_ANGLE = 0,
+ FUSIONSENSOR_THRESHOLD_LINEAR_ACCELERATION_X,
+ FUSIONSENSOR_THRESHOLD_LINEAR_ACCELERATION_Y,
+ FUSIONSENSOR_THRESHOLD_LINEAR_ACCELERATION_Z,
+ FUSIONSENSOR_THRESHOLD_ROTATION_RATE_X,
+ FUSIONSENSOR_THRESHOLD_ROTATION_RATE_Y,
+ FUSIONSENSOR_THRESHOLD_ROTATION_RATE_Z,
+ FUSIONSENSOR_THRESHOLD_COUNT
+} FUSIONSENSOR_THRESHOLD_INDEX;
+
+typedef struct FusionSensorSample
+{
+ FILETIME Timestamp;
+ QUATERNION Quaternion;
+ ULONG Accuracy;
+ FLOAT DeclinationAngle;
+} FusionSensorSample, *PFusionSensorSample;
+
+//
+// Fusion Threshold
+//
+typedef struct _FusThreshold
+{
+ FLOAT RotationAngle;
+ VEC3D LinearAcceleration;
+ VEC3D RotationRate;
+} FusThreshold, *PFusThreshold;
+
+typedef class FusionSensorDevice
+{
+private:
+ // Simulator
+ WDFOBJECT m_SimulatorInstance;
+
+ // WDF
+ WDFDEVICE m_FxDevice;
+ SENSOROBJECT m_SensorInstance;
+ WDFWAITLOCK m_Lock;
+ WDFTIMER m_Timer;
+
+ // Sensor operation
+ BOOLEAN m_PoweredOn;
+ BOOLEAN m_Started;
+ ULONG m_Interval;
+
+ BOOLEAN m_FirstSample;
+ ULONG m_StartTime;
+ ULONGLONG m_SampleCount;
+
+ FusThreshold m_CachedThresholds;
+
+ FusionSensorSample m_LastSample;
+
+ // Sensor Specific Properties
+ PSENSOR_COLLECTION_LIST m_pEnumerationProperties;
+ PSENSOR_COLLECTION_LIST m_pProperties;
+ PSENSOR_PROPERTY_LIST m_pSupportedDataFields;
+ PSENSOR_COLLECTION_LIST m_pAccDataFieldProperties; // Accelerometer related datafield properties
+ PSENSOR_COLLECTION_LIST m_pGyrDataFieldProperties; // Gyroscope related datafield properties
+ PSENSOR_COLLECTION_LIST m_pThresholds;
+ PSENSOR_COLLECTION_LIST m_pData;
+
+public:
+ // WDF callbacks
+ static EVT_WDF_DRIVER_DEVICE_ADD OnDeviceAdd;
+ static EVT_WDF_DEVICE_PREPARE_HARDWARE OnPrepareHardware;
+ static EVT_WDF_DEVICE_RELEASE_HARDWARE OnReleaseHardware;
+ static EVT_WDF_DEVICE_D0_ENTRY OnD0Entry;
+ static EVT_WDF_DEVICE_D0_EXIT OnD0Exit;
+ static EVT_WDF_TIMER OnTimerExpire;
+
+ // CLX callbacks
+ static EVT_SENSOR_DRIVER_START_SENSOR OnStart;
+ static EVT_SENSOR_DRIVER_STOP_SENSOR OnStop;
+ static EVT_SENSOR_DRIVER_GET_SUPPORTED_DATA_FIELDS OnGetSupportedDataFields;
+ static EVT_SENSOR_DRIVER_GET_PROPERTIES OnGetProperties;
+ static EVT_SENSOR_DRIVER_GET_DATA_FIELD_PROPERTIES OnGetDataFieldProperties;
+ static EVT_SENSOR_DRIVER_GET_DATA_INTERVAL OnGetDataInterval;
+ static EVT_SENSOR_DRIVER_SET_DATA_INTERVAL OnSetDataInterval;
+ static EVT_SENSOR_DRIVER_GET_DATA_THRESHOLDS OnGetDataThresholds;
+ static EVT_SENSOR_DRIVER_SET_DATA_THRESHOLDS OnSetDataThresholds;
+ static EVT_SENSOR_DRIVER_DEVICE_IO_CONTROL OnIoControl;
+
+private:
+
+ NTSTATUS Initialize(_In_ WDFDEVICE Device, _In_ SENSOROBJECT SensorObj);
+ NTSTATUS GetData();
+
+} FusionSensorDevice, *PFusionSensorDevice;
+
+// Set up accessor function to retrieve device context
+WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(FusionSensorDevice, GetFusionSensorContextFromSensorInstance);
+
+#define FusionSensorDevice_StepCount_Resolution (1)
+#define FusionSensorDevice_StepCount_Minimum (0)
+#define FusionSensorDevice_StepCount_Maximum (0xFFFFFFFF)
diff --git a/sensors/Fusion/Driver.h b/sensors/Fusion/Driver.h
new file mode 100644
index 00000000..46153894
--- /dev/null
+++ b/sensors/Fusion/Driver.h
@@ -0,0 +1,19 @@
+//Copyright (C) Microsoft Corporation, All Rights Reserved
+//
+//Abstract:
+//
+// This module contains the type definitions for the FusionSensor sample driver's
+// driver callback class.
+//
+//Environment:
+//
+// Windows User-Mode Driver Framework (UMDF)
+
+#pragma once
+
+WDF_EXTERN_C_START
+
+DRIVER_INITIALIZE DriverEntry;
+EVT_WDF_DRIVER_UNLOAD OnDriverUnload;
+
+WDF_EXTERN_C_END \ No newline at end of file
diff --git a/sensors/Fusion/FusionSensor.ctl b/sensors/Fusion/FusionSensor.ctl
new file mode 100644
index 00000000..54959227
--- /dev/null
+++ b/sensors/Fusion/FusionSensor.ctl
@@ -0,0 +1 @@
+0E08A3BA,F045,44EE,B00C,292C91C5F95A FusionSensorTraceGuid
diff --git a/sensors/Fusion/FusionSensor.def b/sensors/Fusion/FusionSensor.def
new file mode 100644
index 00000000..f49a363a
--- /dev/null
+++ b/sensors/Fusion/FusionSensor.def
@@ -0,0 +1,6 @@
+; FusionSensor.def : Declares the module parameters.
+
+LIBRARY FusionSensor
+
+EXPORTS
+
diff --git a/sensors/Fusion/FusionSensor.inx b/sensors/Fusion/FusionSensor.inx
new file mode 100644
index 00000000..1c562304
--- /dev/null
+++ b/sensors/Fusion/FusionSensor.inx
Binary files differ
diff --git a/sensors/Fusion/FusionSensor.sln b/sensors/Fusion/FusionSensor.sln
new file mode 100644
index 00000000..39ab0322
--- /dev/null
+++ b/sensors/Fusion/FusionSensor.sln
@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0
+MinimumVisualStudioVersion = 12.0
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FusionSensor", "FusionSensor.vcxproj", "{2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ Debug|x64 = Debug|x64
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}.Debug|Win32.Build.0 = Debug|Win32
+ {2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}.Release|Win32.ActiveCfg = Release|Win32
+ {2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}.Release|Win32.Build.0 = Release|Win32
+ {2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}.Debug|x64.ActiveCfg = Debug|x64
+ {2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}.Debug|x64.Build.0 = Debug|x64
+ {2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}.Release|x64.ActiveCfg = Release|x64
+ {2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/sensors/Fusion/FusionSensor.vcxproj b/sensors/Fusion/FusionSensor.vcxproj
new file mode 100644
index 00000000..bdcad389
--- /dev/null
+++ b/sensors/Fusion/FusionSensor.vcxproj
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{2D98FAA6-F523-420D-9F3A-480CD7C3F9CA}</ProjectGuid>
+ <RootNamespace>$(MSBuildProjectName)</RootNamespace>
+ <UMDF_VERSION_MAJOR>2</UMDF_VERSION_MAJOR>
+ <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+ <SampleGuid>{63E5D8E2-D2E3-4B7E-9F5A-78DA39FA9BED}</SampleGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>False</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <DriverType>UMDF</DriverType>
+ <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>True</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <DriverType>UMDF</DriverType>
+ <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>False</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <DriverType>UMDF</DriverType>
+ <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>True</UseDebugLibraries>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <DriverType>UMDF</DriverType>
+ <PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <OutDir>$(IntDir)</OutDir>
+ </PropertyGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ItemGroup Label="WrappedTaskItems">
+ <ClCompile Include="client.cpp; device.cpp; driver.cpp; hardwaresimulator.cpp">
+ <WppEnabled>true</WppEnabled>
+ <WppDllMacro>true</WppDllMacro>
+ <WppModuleName>FusionSensor</WppModuleName>
+ <WppScanConfigurationData>sensorstrace.h</WppScanConfigurationData>
+ </ClCompile>
+ <Inf Include="FusionSensor.inx">
+ <Architecture>$(InfArch)</Architecture>
+ <SpecifyArchitecture>true</SpecifyArchitecture>
+ <CopyOutput>.\$(IntDir)\FusionSensor.inf</CopyOutput>
+ </Inf>
+ </ItemGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetName>FusionSensor</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetName>FusionSensor</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>FusionSensor</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>FusionSensor</TargetName>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\mincore.lib;$(SDK_LIB_PATH)\propsys.lib;$(SDK_LIB_PATH)\sensors\1.1\sensorscxstub.lib;$(SDK_LIB_PATH)\sensorsutils.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>FusionSensor.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\mincore.lib;$(SDK_LIB_PATH)\propsys.lib;$(SDK_LIB_PATH)\sensors\1.1\sensorscxstub.lib;$(SDK_LIB_PATH)\sensorsutils.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>FusionSensor.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\mincore.lib;$(SDK_LIB_PATH)\propsys.lib;$(SDK_LIB_PATH)\sensors\1.1\sensorscxstub.lib;$(SDK_LIB_PATH)\sensorsutils.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>FusionSensor.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_UNICODE;UNICODE;WPP_MACRO_USE_KM_VERSION_FOR_UM</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(SDK_INC_PATH);$(DDK_INC_PATH)\sensors\1.1;$(SDK_INC_PATH)\sensors\1.1</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\mincore.lib;$(SDK_LIB_PATH)\propsys.lib;$(SDK_LIB_PATH)\sensors\1.1\sensorscxstub.lib;$(SDK_LIB_PATH)\sensorsutils.lib</AdditionalDependencies>
+ <ModuleDefinitionFile>FusionSensor.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Inf Exclude="@(Inf)" Include="*.inf" />
+ <FilesToPackage Include="$(TargetPath)" Condition="'$(ConfigurationType)'=='Driver' or '$(ConfigurationType)'=='DynamicLibrary'" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Exclude="@(None)" Include="*.txt;*.htm;*.html" />
+ <None Exclude="@(None)" Include="*.ico;*.cur;*.bmp;*.dlg;*.rct;*.gif;*.jpg;*.jpeg;*.wav;*.jpe;*.tiff;*.tif;*.png;*.rc2" />
+ <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project> \ No newline at end of file
diff --git a/sensors/Fusion/FusionSensor.vcxproj.Filters b/sensors/Fusion/FusionSensor.vcxproj.Filters
new file mode 100644
index 00000000..a5ed8ef6
--- /dev/null
+++ b/sensors/Fusion/FusionSensor.vcxproj.Filters
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
+ <UniqueIdentifier>{47BC76FB-31D6-4043-A1F0-24C8EE1EC77D}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files">
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ <UniqueIdentifier>{822384CB-A39F-4A21-8529-34A65C4CE181}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resource Files">
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
+ <UniqueIdentifier>{C6D84098-A64B-429D-8EE2-D8ED8C5BF2FE}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Driver Files">
+ <Extensions>inf;inv;inx;mof;mc;</Extensions>
+ <UniqueIdentifier>{A379ED39-5FF0-4DB2-A773-BDEA4FB77D87}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="client.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="device.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="driver.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="hardwaresimulator.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <None Include="FusionSensor.def">
+ <Filter>Source Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <Inf Include="FusionSensor.inx">
+ <Filter>Driver Files</Filter>
+ </Inf>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/sensors/Fusion/HardwareSimulator.h b/sensors/Fusion/HardwareSimulator.h
new file mode 100644
index 00000000..67e56436
--- /dev/null
+++ b/sensors/Fusion/HardwareSimulator.h
@@ -0,0 +1,60 @@
+//Copyright (C) Microsoft Corporation, All Rights Reserved
+//
+//Abstract:
+//
+// This module contains the type definitions for the FusionSensor sample driver
+// hardware simulator.
+//
+//Environment:
+//
+// Windows User-Mode Driver Framework (UMDF)
+
+#pragma once
+
+#include <windows.h>
+#include <wdf.h>
+
+#include "SensorsTrace.h"
+#include <SensorsCx.h>
+
+#include "Device.h"
+
+#define SIMULATOR_HARDWARE_INTERVAL_MS (1000) // 1 second interval in milliseconds
+
+typedef enum SIMULATOR_STATE
+{
+ SimulatorState_NotInitialized = 0,
+ SimulatorState_Initialized,
+ SimulatorState_Started
+} SIMULATOR_STATE;
+
+typedef class HardwareSimulator
+{
+private:
+ WDFTIMER m_Timer;
+ ULONG m_Index;
+ WDFWAITLOCK m_Lock;
+ SIMULATOR_STATE m_State;
+ WDFOBJECT m_SimulatorInstance;
+ BOOLEAN m_HasReset;
+
+public:
+ HardwareSimulator();
+ ~HardwareSimulator();
+
+ // WDF callbacks
+ static EVT_WDF_TIMER OnTimerExpire;
+
+ static NTSTATUS Initialize(_In_ WDFDEVICE Device, _Out_ WDFOBJECT *SimulatorInstance);
+ NTSTATUS Cleanup();
+ NTSTATUS Start();
+ NTSTATUS Stop();
+ NTSTATUS GetSample(_Out_ FusionSensorSample *Sample);
+
+private:
+ NTSTATUS InitializeInternal(_In_ WDFOBJECT SimulatorInstance);
+} HardwareSimulator, *PHardwareSimulator;
+
+
+// Set up accessor function to retrieve device context
+WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(HardwareSimulator, GetHardwareSimulatorContextFromInstance);
diff --git a/sensors/Fusion/SensorsTrace.h b/sensors/Fusion/SensorsTrace.h
new file mode 100644
index 00000000..8b3b8769
--- /dev/null
+++ b/sensors/Fusion/SensorsTrace.h
@@ -0,0 +1,102 @@
+//Copyright (C) Microsoft Corporation, All Rights Reserved
+//
+//Abstract:
+//
+// Header file for the debug tracing related function defintions and macros.
+//
+//Environment:
+//
+// User mode
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Define the tracing flags.
+//
+// Tracing GUID - 0E08A3BA-F045-44EE-B00C-292C91C5F95A
+
+#define WPP_CONTROL_GUIDS \
+ WPP_DEFINE_CONTROL_GUID( \
+ FusionSensorTraceGuid, (0E08A3BA,F045,44EE,B00C,292C91C5F95A), \
+ WPP_DEFINE_BIT(EntryExit) \
+ WPP_DEFINE_BIT(DataFlow) \
+ WPP_DEFINE_BIT(Verbose) \
+ WPP_DEFINE_BIT(Information) \
+ WPP_DEFINE_BIT(Warning) \
+ WPP_DEFINE_BIT(Error) \
+ WPP_DEFINE_BIT(Fatal) \
+ WPP_DEFINE_BIT(DriverStatus) \
+ )
+
+#define WPP_FLAG_LEVEL_LOGGER(flag, level) WPP_LEVEL_LOGGER(flag)
+
+#define WPP_FLAG_LEVEL_ENABLED(flag, level) (WPP_LEVEL_ENABLED(flag) && WPP_CONTROL(WPP_BIT_ ## flag).Level >= level)
+
+#define WPP_LEVEL_FLAGS_LOGGER(level,flags) WPP_LEVEL_LOGGER(flags)
+
+#define WPP_LEVEL_FLAGS_ENABLED(level, flags) (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= level)
+
+// This comment block is scanned by the trace preprocessor to define our
+// Trace function.
+//
+// begin_wpp config
+//
+// FUNC TraceEvents(LEVEL, FLAGS, MSG, ...);
+//
+// FUNC TraceFatal{LEVEL=TRACE_LEVEL_FATAL,FLAGS=Fatal}(MSG,...);
+// FUNC TraceError{LEVEL=TRACE_LEVEL_ERROR,FLAGS=Error}(MSG,...);
+// FUNC TraceWarning{LEVEL=TRACE_LEVEL_WARNING,FLAGS=Warning}(MSG,...);
+// FUNC TraceInformation{LEVEL=TRACE_LEVEL_INFORMATION,FLAGS=Information}(MSG,...);
+// FUNC TraceVerbose{LEVEL=TRACE_LEVEL_VERBOSE,FLAGS=Verbose}(MSG,...);
+// FUNC TracePerformance{PERF=DUMMY,LEVEL=TRACE_LEVEL_PERF}(FLAGS,MSG,...);
+//
+// FUNC TraceData{LEVEL=TRACE_LEVEL_VERBOSE,FLAGS=DataFlow}(MSG,...);
+//
+// FUNC TraceDriverStatus{LEVEL=TRACE_LEVEL_INFORMATION,FLAGS=DriverStatus}(MSG,...);
+//
+// end_wpp
+
+
+
+// SENSOR ------------------------------------------------------------------------------------------------
+
+// MACRO: SENSOR_FunctionEnter
+//
+// begin_wpp config
+// USEPREFIX (SENSOR_FunctionEnter, "%!STDPREFIX! SENSOR %!FUNC! FunctionEnter");
+// FUNC SENSOR_FunctionEnter{LEVEL=TRACE_LEVEL_VERBOSE,FLAGS=EntryExit}(...);
+// end_wpp
+
+
+// MACRO: SENSOR_FunctionExit
+//
+// begin_wpp config
+// USEPREFIX (SENSOR_FunctionExit, "%!STDPREFIX! SENSOR %!FUNC! FunctionExit: %!STATUS!", __status);
+// FUNC SENSOR_FunctionExit{LEVEL=TRACE_LEVEL_VERBOSE,FLAGS=EntryExit}(SENSOREXIT);
+// end_wpp
+#define WPP_LEVEL_FLAGS_SENSOREXIT_ENABLED(LEVEL, FLAGS, status) WPP_LEVEL_FLAGS_ENABLED(LEVEL, FLAGS)
+#define WPP_LEVEL_FLAGS_SENSOREXIT_LOGGER(LEVEL, FLAGS, status) WPP_LEVEL_FLAGS_LOGGER(LEVEL, FLAGS)
+
+#define WPP_LEVEL_FLAGS_SENSOREXIT_PRE(LEVEL, FLAGS, status) { \
+ NTSTATUS __status = status;
+#define WPP_LEVEL_FLAGS_SENSOREXIT_POST(LEVEL, FLAGS, status) /*TraceMessage()*/; \
+ }
+
+
+
+// WPP Recorder -------------------------------------------------------------------------------------------
+//
+// The following two macros are required to enable WPP Recorder functionality for clients of the Sensor Class Extension
+//
+#define WPP_RECORDER_LEVEL_FLAGS_SENSOREXIT_FILTER(LEVEL, FLAGS, status) WPP_RECORDER_LEVEL_FLAGS_FILTER(LEVEL, FLAGS)
+#define WPP_RECORDER_LEVEL_FLAGS_SENSOREXIT_ARGS(LEVEL, FLAGS, status) WPP_RECORDER_LEVEL_FLAGS_ARGS(LEVEL, FLAGS)
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
diff --git a/sensors/Fusion/client.cpp b/sensors/Fusion/client.cpp
new file mode 100644
index 00000000..686b4197
--- /dev/null
+++ b/sensors/Fusion/client.cpp
@@ -0,0 +1,789 @@
+//Copyright (C) Microsoft Corporation, All Rights Reserved.
+//
+//Abstract:
+//
+// This module contains the implementation of driver callback function
+// from clx to FusionSensor.
+//
+//Environment:
+//
+// Windows User-Mode Driver Framework (UMDF)
+
+#include "Device.h"
+#include "HardwareSimulator.h"
+
+#include <timeapi.h>
+#include <Intsafe.h>
+
+#include "Client.tmh"
+
+// This routine is called by worker thread to read a single sample, compare threshold
+// and push it back to CLX. It simulates hardware thresholding by only generating data
+// when the change of data is greater than threshold.
+NTSTATUS
+FusionSensorDevice::GetData(
+)
+{
+ // TODO: Remove the HardwareSimulator code in your final driver. The HardwareSimulator is only used for the purpose of demonstrating how sensor driver samples work.
+ PHardwareSimulator pSimulator = GetHardwareSimulatorContextFromInstance(m_SimulatorInstance);
+ BOOLEAN DataReady = FALSE;
+ NTSTATUS Status = STATUS_SUCCESS;
+ FusionSensorSample Sample = {};
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == pSimulator)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! GetHardwareSimulatorContextFromInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // TODO: In this case, we are calling into the HardwareSimulator code to get some simulated data.
+ // In a real driver (which either communicates with real hardware or some other drivers), this call should be replaced by some
+ // logic to get data comming from the hardware/other drivers. The "Sample" variable is expected to contain actual data from here on.
+ Status = pSimulator->GetSample(&Sample);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! GetSample failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ if (FALSE != m_FirstSample)
+ {
+ Status = GetPerformanceTime(&m_StartTime);
+ if (!NT_SUCCESS(Status))
+ {
+ m_StartTime = 0;
+ TraceError("FUS %!FUNC! GetPerformanceTime failed %!STATUS!", Status);
+ }
+
+ m_SampleCount = 0;
+
+ DataReady = TRUE;
+ }
+ else
+ {
+ // Compare the change of data to threshold, and only push the data back to
+ // clx if the change exceeds threshold.
+
+ CQUATERNION Quaternion = Sample.Quaternion;
+ FLOAT RotationAngle = Quaternion.ToAngleAxis(nullptr) * RadToDegRatio;
+
+ CQUATERNION LastQuaternion = m_LastSample.Quaternion;
+ FLOAT LastRotationAngle = LastQuaternion.ToAngleAxis(nullptr) * RadToDegRatio;
+
+ TraceData("FUS %!FUNC! Rotation Angle: new=%f, old=%f", RotationAngle, LastRotationAngle);
+
+ if ((abs(RotationAngle - LastRotationAngle) >= m_CachedThresholds.RotationAngle))
+ {
+ DataReady = TRUE;
+ }
+ }
+
+ if (FALSE != DataReady)
+ {
+ // update last sample
+ m_LastSample.Quaternion = Sample.Quaternion;
+ m_LastSample.Accuracy = Sample.Accuracy;
+ m_LastSample.DeclinationAngle = Sample.DeclinationAngle;
+
+ // push to clx
+ InitPropVariantFromFileTime(&m_LastSample.Timestamp, &(m_pData->List[FUSIONSENSOR_DATA_TIMESTAMP].Value));
+ InitPropVariantFromFloat(m_LastSample.Quaternion.W, &(m_pData->List[FUSIONSENSOR_DATA_QUATERNION_W].Value));
+ InitPropVariantFromFloat(m_LastSample.Quaternion.X, &(m_pData->List[FUSIONSENSOR_DATA_QUATERNION_X].Value));
+ InitPropVariantFromFloat(m_LastSample.Quaternion.Y, &(m_pData->List[FUSIONSENSOR_DATA_QUATERNION_Y].Value));
+ InitPropVariantFromFloat(m_LastSample.Quaternion.Z, &(m_pData->List[FUSIONSENSOR_DATA_QUATERNION_Z].Value));
+ InitPropVariantFromUInt32(m_LastSample.Accuracy, &(m_pData->List[FUSIONSENSOR_DATA_ACCURACY].Value));
+ InitPropVariantFromFloat(m_LastSample.DeclinationAngle, &(m_pData->List[FUSIONSENSOR_DATA_DECLINATION_ANGLE].Value));
+
+
+ SensorsCxSensorDataReady(m_SensorInstance, m_pData);
+ m_FirstSample = FALSE;
+ }
+ else
+ {
+ Status = STATUS_DATA_NOT_ACCEPTED;
+ TraceInformation("FUS %!FUNC! Data did NOT meet the threshold");
+ }
+
+ SENSOR_FunctionExit(Status);
+
+Exit:
+ return Status;
+}
+
+
+
+// This callback is called when interval wait time has expired and driver is ready
+// to collect new sample. The callback reads current value, compare value to threshold,
+// pushes it up to CLX framework, and schedule next wake up time.
+VOID
+FusionSensorDevice::OnTimerExpire(
+ _In_ WDFTIMER Timer // WDF timer object
+ )
+{
+ PFusionSensorDevice pDevice = nullptr;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ pDevice = GetFusionSensorContextFromSensorInstance(WdfTimerGetParentObject(Timer));
+ if (nullptr == pDevice)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! GetFusionSensorContextFromSensorInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Get data and push to clx
+ WdfWaitLockAcquire(pDevice->m_Lock, NULL);
+ Status = pDevice->GetData();
+ if (!NT_SUCCESS(Status) && Status != STATUS_DATA_NOT_ACCEPTED)
+ {
+ TraceError("FUS %!FUNC! GetData Failed %!STATUS!", Status);
+ }
+ WdfWaitLockRelease(pDevice->m_Lock);
+
+ // Schedule next wake up time
+ if (FALSE != pDevice->m_PoweredOn &&
+ FALSE != pDevice->m_Started)
+ {
+ LONGLONG WaitTimeHundredNanoseconds = 0; // in unit of 100ns
+
+ if (0 == pDevice->m_StartTime)
+ {
+ // in case we fail to get sensor start time, use static wait time
+ WaitTimeHundredNanoseconds = WDF_REL_TIMEOUT_IN_MS(pDevice->m_Interval);
+ }
+ else
+ {
+ ULONG CurrentTimeMs = 0;
+
+ // dynamically calculate wait time to avoid jitter
+ Status = GetPerformanceTime (&CurrentTimeMs);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! GetPerformanceTime %!STATUS!", Status);
+ WaitTimeHundredNanoseconds = WDF_REL_TIMEOUT_IN_MS(pDevice->m_Interval);
+ }
+ else
+ {
+ pDevice->m_SampleCount++;
+ if (CurrentTimeMs > (pDevice->m_StartTime + (pDevice->m_Interval * (pDevice->m_SampleCount + 1))))
+ {
+ // If we skipped two or more beats, reschedule the timer with a zero due time to catch up on missing samples
+ WaitTimeHundredNanoseconds = 0;
+ }
+ else
+ {
+ WaitTimeHundredNanoseconds = (pDevice->m_StartTime +
+ (pDevice->m_Interval * (pDevice->m_SampleCount + 1))) - CurrentTimeMs;
+ }
+ WaitTimeHundredNanoseconds = WDF_REL_TIMEOUT_IN_MS(WaitTimeHundredNanoseconds);
+ }
+ }
+ WdfTimerStart(pDevice->m_Timer, WaitTimeHundredNanoseconds);
+ }
+
+Exit:
+
+ SENSOR_FunctionExit(Status);
+}
+
+
+
+// Called by Sensor CLX to begin continuously sampling the sensor.
+NTSTATUS
+FusionSensorDevice::OnStart(
+ _In_ SENSOROBJECT SensorInstance // Sensor device object
+ )
+{
+ PHardwareSimulator pSimulator = nullptr;
+ PFusionSensorDevice pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == pDevice)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! Sensor(0x%p) parameter is invalid. Failed %!STATUS!", SensorInstance, Status);
+ goto Exit;
+ }
+
+ // Get the simulator context
+ pSimulator = GetHardwareSimulatorContextFromInstance(pDevice->m_SimulatorInstance);
+ if (nullptr == pSimulator)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! GetHardwareSimulatorContextFromInstance failed %!STATUS!", Status);
+ }
+
+ if (NT_SUCCESS(Status))
+ {
+ // Start the simulator
+ pSimulator->Start();
+
+ pDevice->m_FirstSample = TRUE;
+
+ // Start polling
+
+ pDevice->m_Started = TRUE;
+
+ InitPropVariantFromUInt32(SensorState_Active,
+ &(pDevice->m_pProperties->List[SENSOR_PROPERTY_STATE].Value));
+
+ // Start the sample polling timer.
+ //
+ // Note: The polling timer is configured to allow for the first sample to be reported immediately.
+ // Some hardware may want to delay the first sample report a little to account for hardware start time.
+ WdfTimerStart(pDevice->m_Timer, WDF_REL_TIMEOUT_IN_MS(FusionSensor_Default_MinDataInterval_Ms));
+ }
+Exit:
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+
+// Called by Sensor CLX to stop continuously sampling the sensor.
+NTSTATUS
+FusionSensorDevice::OnStop(
+ _In_ SENSOROBJECT SensorInstance // Sensor device object
+ )
+{
+ PHardwareSimulator pSimulator = nullptr;
+ PFusionSensorDevice pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == pDevice)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! Sensor(0x%p) parameter is invalid. Failed %!STATUS!", SensorInstance, Status);
+ goto Exit;
+ }
+
+ // Stop polling
+ pDevice->m_Started = FALSE;
+
+ // Waiting for the callback to complete, then stopping the timer
+ WdfTimerStop(pDevice->m_Timer, TRUE);
+
+ InitPropVariantFromUInt32(SensorState_Idle,
+ &(pDevice->m_pProperties->List[SENSOR_PROPERTY_STATE].Value));
+
+ // Stop the simulator
+ pSimulator = GetHardwareSimulatorContextFromInstance(pDevice->m_SimulatorInstance);
+ if (nullptr == pSimulator)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! GetHardwareSimulatorContextFromInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ pSimulator->Stop();
+
+Exit:
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+// Called by Sensor CLX to get supported data fields. The typical usage is to call
+// this function once with buffer pointer as NULL to acquire the required size
+// for the buffer, allocate buffer, then call the function again to retrieve
+// sensor information.
+NTSTATUS
+FusionSensorDevice::OnGetSupportedDataFields(
+ _In_ SENSOROBJECT SensorInstance, // Sensor device object
+ _Inout_opt_ PSENSOR_PROPERTY_LIST pFields, // Pointer to a list of supported properties
+ _Out_ PULONG pSize // Number of bytes for the list of supported properties
+ )
+{
+ PFusionSensorDevice pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == pDevice || nullptr == pSize)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! Invalid parameters! %!STATUS!", Status);
+ goto Exit;
+ }
+
+ if (nullptr == pFields)
+ {
+ // Just return size
+ *pSize = pDevice->m_pSupportedDataFields->AllocatedSizeInBytes;
+ }
+ else
+ {
+ if (pFields->AllocatedSizeInBytes < pDevice->m_pSupportedDataFields->AllocatedSizeInBytes)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! Buffer is too small. Failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Fill out data
+ Status = PropertiesListCopy(pFields, pDevice->m_pSupportedDataFields);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! PropertiesListCopy failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ *pSize = pDevice->m_pSupportedDataFields->AllocatedSizeInBytes;
+ }
+
+Exit:
+ if (!NT_SUCCESS(Status))
+ {
+ *pSize = 0;
+ }
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+
+// Called by Sensor CLX to get sensor properties. The typical usage is to call
+// this function once with buffer pointer as NULL to acquire the required size
+// for the buffer, allocate buffer, then call the function again to retrieve
+// sensor information.
+NTSTATUS
+FusionSensorDevice::OnGetProperties(
+ _In_ SENSOROBJECT SensorInstance, // Sensor device object
+ _Inout_opt_ PSENSOR_COLLECTION_LIST pProperties, // Pointer to a list of sensor properties
+ _Out_ PULONG pSize // Number of bytes for the list of sensor properties
+ )
+{
+ PFusionSensorDevice pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == pDevice || nullptr == pSize)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! Invalid parameters! %!STATUS!", Status);
+ goto Exit;
+ }
+
+ if (nullptr == pProperties)
+ {
+ // Just return size
+ *pSize = CollectionsListGetMarshalledSize(pDevice->m_pProperties);
+ }
+ else
+ {
+ if (pProperties->AllocatedSizeInBytes <
+ CollectionsListGetMarshalledSize(pDevice->m_pProperties))
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! Buffer is too small. Failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Fill out all data
+ Status = CollectionsListCopyAndMarshall(pProperties, pDevice->m_pProperties);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! CollectionsListCopyAndMarshall failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ *pSize = CollectionsListGetMarshalledSize(pDevice->m_pProperties);
+ }
+
+Exit:
+ if (!NT_SUCCESS(Status))
+ {
+ *pSize = 0;
+ }
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+// Called by Sensor CLX to get data field properties. The typical usage is to call
+// this function once with buffer pointer as NULL to acquire the required size
+// for the buffer, allocate buffer, then call the function again to retrieve
+// sensor information.
+NTSTATUS
+FusionSensorDevice::OnGetDataFieldProperties(
+ _In_ SENSOROBJECT SensorInstance, // Sensor device object
+ _In_ const PROPERTYKEY *DataField, // Pointer to the propertykey of requested property
+ _Inout_opt_ PSENSOR_COLLECTION_LIST pProperties, // Pointer to a list of sensor properties
+ _Out_ PULONG pSize // Number of bytes for the list of sensor properties
+ )
+{
+ PFusionSensorDevice pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == pDevice || nullptr == pSize || nullptr == DataField)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! Invalid parameters! %!STATUS!", Status);
+ goto Exit;
+ }
+
+
+ if ((*DataField == PKEY_SensorData_LinearAccelerationX_Gs) ||
+ (*DataField == PKEY_SensorData_LinearAccelerationY_Gs) ||
+ (*DataField == PKEY_SensorData_LinearAccelerationZ_Gs))
+ {
+ // Linear Acceleration
+ if (nullptr == pProperties)
+ {
+ // Just return size
+ *pSize = CollectionsListGetMarshalledSize(pDevice->m_pAccDataFieldProperties);
+ }
+ else
+ {
+ if (pProperties->AllocatedSizeInBytes <
+ CollectionsListGetMarshalledSize(pDevice->m_pAccDataFieldProperties))
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! Buffer is too small. Failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Fill out all data
+ Status = CollectionsListCopyAndMarshall(pProperties, pDevice->m_pAccDataFieldProperties);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! CollectionsListCopyAndMarshall failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ *pSize = CollectionsListGetMarshalledSize(pDevice->m_pAccDataFieldProperties);
+ }
+ }
+ else if ((*DataField == PKEY_SensorData_CorrectedAngularVelocityX_DegreesPerSecond) ||
+ (*DataField == PKEY_SensorData_CorrectedAngularVelocityY_DegreesPerSecond) ||
+ (*DataField == PKEY_SensorData_CorrectedAngularVelocityZ_DegreesPerSecond))
+ {
+ // Rotation Rate
+ if (nullptr == pProperties)
+ {
+ // Just return size
+ *pSize = CollectionsListGetMarshalledSize(pDevice->m_pGyrDataFieldProperties);
+ }
+ else
+ {
+ if (pProperties->AllocatedSizeInBytes <
+ CollectionsListGetMarshalledSize(pDevice->m_pGyrDataFieldProperties))
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! Buffer is too small. Failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Fill out all data
+ Status = CollectionsListCopyAndMarshall(pProperties, pDevice->m_pGyrDataFieldProperties);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! CollectionsListCopyAndMarshall failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ *pSize = CollectionsListGetMarshalledSize(pDevice->m_pGyrDataFieldProperties);
+ }
+ }
+ else
+ {
+ Status = STATUS_NOT_SUPPORTED;
+ TraceError("FUS %!FUNC! Fusion sensor does NOT have properties for this data field. Failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+Exit:
+ if (!NT_SUCCESS(Status))
+ {
+ *pSize = 0;
+ }
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+
+// Called by Sensor CLX to get sampling rate of the sensor.
+NTSTATUS
+FusionSensorDevice::OnGetDataInterval(
+ _In_ SENSOROBJECT SensorInstance, // Sensor device object
+ _Out_ PULONG DataRateMs // Sampling rate in ms
+ )
+{
+ PFusionSensorDevice pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == pDevice)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! Sensor(0x%p) parameter is invalid. Failed %!STATUS!", SensorInstance, Status);
+ goto Exit;
+ }
+
+ if (nullptr == DataRateMs)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! DataRateMs(0x%p) parameter is invalid. Failed %!STATUS!", DataRateMs, Status);
+ goto Exit;
+ }
+
+ *DataRateMs = pDevice->m_Interval;
+
+Exit:
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+
+// Called by Sensor CLX to set sampling rate of the sensor.
+NTSTATUS
+FusionSensorDevice::OnSetDataInterval(
+ _In_ SENSOROBJECT SensorInstance, // Sensor device object
+ _In_ ULONG DataRateMs // Sampling rate in ms
+ )
+{
+ PFusionSensorDevice pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == pDevice)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! Sensor(0x%p) parameter is invalid. Failed %!STATUS!", SensorInstance, Status);
+ goto Exit;
+ }
+
+ if (FusionSensor_Default_MinDataInterval_Ms > DataRateMs)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! DataRateMs(%d) parameter is smaller than the minimum data interval. Failed %!STATUS!", DataRateMs, Status);
+ goto Exit;
+ }
+
+ pDevice->m_Interval = DataRateMs;
+
+ // reschedule sample to return as soon as possible if it's started
+ if (FALSE != pDevice->m_Started)
+ {
+ pDevice->m_Started = FALSE;
+ WdfTimerStop(pDevice->m_Timer, TRUE);
+
+ pDevice->m_Started = TRUE;
+ pDevice->m_FirstSample = TRUE;
+ WdfTimerStart(pDevice->m_Timer, WDF_REL_TIMEOUT_IN_MS(FusionSensor_Default_MinDataInterval_Ms));
+ }
+
+Exit:
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+
+// Called by Sensor CLX to get data thresholds. The typical usage is to call
+// this function once with buffer pointer as NULL to acquire the required size
+// for the buffer, allocate buffer, then call the function again to retrieve
+// sensor information.
+NTSTATUS
+FusionSensorDevice::OnGetDataThresholds(
+ _In_ SENSOROBJECT SensorInstance, // Sensor device object
+ _Inout_opt_ PSENSOR_COLLECTION_LIST pThresholds, // Pointer to a list of sensor thresholds
+ _Out_ PULONG pSize // Number of bytes for the list of sensor thresholds
+ )
+{
+ PFusionSensorDevice pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == pDevice || nullptr == pSize)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! Invalid parameters! %!STATUS!", Status);
+ goto Exit;
+ }
+
+ if (nullptr == pThresholds)
+ {
+ // Just return size
+ *pSize = CollectionsListGetMarshalledSize(pDevice->m_pThresholds);
+ }
+ else
+ {
+ if (pThresholds->AllocatedSizeInBytes <
+ CollectionsListGetMarshalledSize(pDevice->m_pThresholds))
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! Buffer is too small. Failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Fill out all data
+ Status = CollectionsListCopyAndMarshall(pThresholds, pDevice->m_pThresholds);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! CollectionsListCopyAndMarshall failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ *pSize = CollectionsListGetMarshalledSize(pDevice->m_pThresholds);
+ }
+
+Exit:
+ if (!NT_SUCCESS(Status))
+ {
+ *pSize = 0;
+ }
+
+ SENSOR_FunctionExit(Status);
+
+ return Status;
+}
+
+
+
+// Called by Sensor CLX to set data thresholds.
+NTSTATUS
+FusionSensorDevice::OnSetDataThresholds(
+ _In_ SENSOROBJECT SensorInstance, // Sensor device object
+ _In_ PSENSOR_COLLECTION_LIST pThresholds // Pointer to a list of sensor thresholds
+ )
+{
+ ULONG Element;
+ BOOLEAN IsLocked = FALSE;
+ PFusionSensorDevice pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (pDevice == nullptr)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! Sensor(0x%p) parameter is invalid. Failed %!STATUS!", SensorInstance, Status);
+ goto Exit;
+ }
+
+ WdfWaitLockAcquire(pDevice->m_Lock, NULL);
+ IsLocked = TRUE;
+
+ for (Element = 0; Element < pThresholds->Count; Element++)
+ {
+ Status = PropKeyFindKeySetPropVariant(pDevice->m_pThresholds,
+ &(pThresholds->List[Element].Key),
+ TRUE,
+ &(pThresholds->List[Element].Value));
+ if (!NT_SUCCESS(Status))
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! FusionSensor driver does NOT have threshold for this data field. Failed %!STATUS!", Status);
+ goto Exit;
+ }
+ }
+
+ // Get data thresholds
+ Status = PropKeyFindKeyGetFloat(pDevice->m_pThresholds,
+ &PKEY_SensorData_RotationAngle_Degrees,
+ &(pDevice->m_CachedThresholds.RotationAngle));
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! PropKeyFindKeyGetFloat for rotation angle failed! %!STATUS!", Status);
+ goto Exit;
+ }
+
+ Status = PropKeyFindKeyGetFloat(pDevice->m_pThresholds,
+ &PKEY_SensorData_LinearAccelerationX_Gs,
+ &(pDevice->m_CachedThresholds.LinearAcceleration.X));
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! PropKeyFindKeyGetFloat for linear acceleration X failed! %!STATUS!", Status);
+ goto Exit;
+ }
+
+ Status = PropKeyFindKeyGetFloat(pDevice->m_pThresholds,
+ &PKEY_SensorData_LinearAccelerationY_Gs,
+ &(pDevice->m_CachedThresholds.LinearAcceleration.Y));
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! PropKeyFindKeyGetFloat for linear acceleration Y failed! %!STATUS!", Status);
+ goto Exit;
+ }
+
+ Status = PropKeyFindKeyGetFloat(pDevice->m_pThresholds,
+ &PKEY_SensorData_LinearAccelerationZ_Gs,
+ &(pDevice->m_CachedThresholds.LinearAcceleration.Z));
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! PropKeyFindKeyGetFloat for linear acceleration Z failed! %!STATUS!", Status);
+ goto Exit;
+ }
+
+ Status = PropKeyFindKeyGetFloat(pDevice->m_pThresholds,
+ &PKEY_SensorData_CorrectedAngularVelocityX_DegreesPerSecond,
+ &(pDevice->m_CachedThresholds.RotationRate.X));
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! PropKeyFindKeyGetFloat for rotation rate X failed! %!STATUS!", Status);
+ goto Exit;
+ }
+
+ Status = PropKeyFindKeyGetFloat(pDevice->m_pThresholds,
+ &PKEY_SensorData_CorrectedAngularVelocityY_DegreesPerSecond,
+ &(pDevice->m_CachedThresholds.RotationRate.Y));
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! PropKeyFindKeyGetFloat for rotation rate Y failed! %!STATUS!", Status);
+ goto Exit;
+ }
+
+ Status = PropKeyFindKeyGetFloat(pDevice->m_pThresholds,
+ &PKEY_SensorData_CorrectedAngularVelocityZ_DegreesPerSecond,
+ &(pDevice->m_CachedThresholds.RotationRate.Z));
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! PropKeyFindKeyGetFloat for rotation rate Z failed! %!STATUS!", Status);
+ goto Exit;
+ }
+
+Exit:
+ if (FALSE != IsLocked)
+ {
+ WdfWaitLockRelease(pDevice->m_Lock);
+ IsLocked = FALSE;
+ }
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+// Called by Sensor CLX to handle IOCTLs that clx does not support
+NTSTATUS
+FusionSensorDevice::OnIoControl(
+ _In_ SENSOROBJECT /*SensorInstance*/, // WDF queue object
+ _In_ WDFREQUEST /*Request*/, // WDF request object
+ _In_ size_t /*OutputBufferLength*/, // number of bytes to retrieve from output buffer
+ _In_ size_t /*InputBufferLength*/, // number of bytes to retrieve from input buffer
+ _In_ ULONG /*IoControlCode*/ // IOCTL control code
+ )
+{
+ NTSTATUS Status = STATUS_NOT_SUPPORTED;
+
+ SENSOR_FunctionEnter();
+
+ SENSOR_FunctionExit(Status);
+ return Status;
+} \ No newline at end of file
diff --git a/sensors/Fusion/device.cpp b/sensors/Fusion/device.cpp
new file mode 100644
index 00000000..0ac6e042
--- /dev/null
+++ b/sensors/Fusion/device.cpp
@@ -0,0 +1,729 @@
+//Copyright (C) Microsoft Corporation, All Rights Reserved.
+//
+//Abstract:
+//
+// This module contains the implementation of WDF callback functions
+// for FusionSensor driver.
+//
+//Environment:
+//
+// Windows User-Mode Driver Framework (UMDF)
+
+#include "Device.h"
+#include "HardwareSimulator.h"
+
+#include "Device.tmh"
+
+// FusionSensor Unique ID
+// {997335D7-A71C-4C89-9D95-58EAEF917C6A}
+//
+// TODO: The unique ID below must be set per sensor. A different GUID must be provided for each sensor. Please generate a new GUID.
+DEFINE_GUID(GUID_FusionSensorDevice_UniqueID,
+ 0x997335d7, 0xa71c, 0x4c89, 0x9d, 0x95, 0x58, 0xea, 0xef, 0x91, 0x7c, 0x6a);
+
+
+// This routine initializes the sensor to its default properties
+NTSTATUS
+FusionSensorDevice::Initialize(
+ _In_ WDFDEVICE Device, // WDFDEVICE object
+ _In_ SENSOROBJECT SensorInstance // SENSOROBJECT for each sensor instance
+ )
+{
+ ULONG Size = 0;
+ WDF_OBJECT_ATTRIBUTES MemoryAttributes;
+ WDFMEMORY MemoryHandle = NULL;
+ FILETIME Time = {};
+ WDF_OBJECT_ATTRIBUTES TimerAttributes;
+ WDF_TIMER_CONFIG TimerConfig;
+ NTSTATUS Status = STATUS_SUCCESS;
+ PHardwareSimulator pSimulator = nullptr;
+
+ SENSOR_FunctionEnter();
+
+ // Store device and instance
+ m_FxDevice = Device;
+ m_SensorInstance = SensorInstance;
+ m_Started = FALSE;
+
+ // TODO: Remove the HardwareSimulator code in your final driver. The HardwareSimulator is only used for the purpose of demonstrating how sensor driver samples work.
+ // Initialize the FusionSensor simulator
+ Status = HardwareSimulator::Initialize(Device, &m_SimulatorInstance);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! HardwareSimulator::Initialize failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ pSimulator = GetHardwareSimulatorContextFromInstance(m_SimulatorInstance);
+ if (nullptr == pSimulator)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! GetHardwareSimulatorContextFromInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Create Lock
+ Status = WdfWaitLockCreate(WDF_NO_OBJECT_ATTRIBUTES, &m_Lock);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! WdfWaitLockCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Create timer object for polling sensor samples
+ WDF_TIMER_CONFIG_INIT(&TimerConfig, FusionSensorDevice::OnTimerExpire);
+ WDF_OBJECT_ATTRIBUTES_INIT(&TimerAttributes);
+ TimerAttributes.ParentObject = SensorInstance;
+ TimerAttributes.ExecutionLevel = WdfExecutionLevelPassive;
+
+ Status = WdfTimerCreate(&TimerConfig, &TimerAttributes, &m_Timer);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! WdfTimerCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ //
+ // Sensor Enumeration Properties
+ //
+ {
+ Size = SENSOR_COLLECTION_LIST_SIZE(SENSOR_ENUMERATION_PROPERTIES_COUNT);
+
+ MemoryHandle = NULL;
+ WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
+ MemoryAttributes.ParentObject = SensorInstance;
+ Status = WdfMemoryCreate(&MemoryAttributes,
+ PagedPool,
+ SENSOR_POOL_TAG_FUSIONSENSOR,
+ Size,
+ &MemoryHandle,
+ (PVOID*)&m_pEnumerationProperties);
+ if (!NT_SUCCESS(Status) || m_pEnumerationProperties == nullptr)
+ {
+ TraceError("FUS %!FUNC! WdfMemoryCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ SENSOR_COLLECTION_LIST_INIT(m_pEnumerationProperties, Size);
+ m_pEnumerationProperties->Count = SENSOR_ENUMERATION_PROPERTIES_COUNT;
+
+ m_pEnumerationProperties->List[SENSOR_TYPE_GUID].Key = DEVPKEY_Sensor_Type;
+ InitPropVariantFromCLSID(GUID_SensorType_Orientation,
+ &(m_pEnumerationProperties->List[SENSOR_TYPE_GUID].Value));
+
+ m_pEnumerationProperties->List[SENSOR_MANUFACTURER].Key = DEVPKEY_Sensor_Manufacturer;
+ InitPropVariantFromString(L"TODO-Set-Manufacturer",
+ &(m_pEnumerationProperties->List[SENSOR_MANUFACTURER].Value));
+
+ m_pEnumerationProperties->List[SENSOR_MODEL].Key = DEVPKEY_Sensor_Model;
+ InitPropVariantFromString(L"Sample fusion sensor",
+ &(m_pEnumerationProperties->List[SENSOR_MODEL].Value));
+
+ m_pEnumerationProperties->List[SENSOR_PERSISTENT_UNIQUEID].Key = DEVPKEY_Sensor_PersistentUniqueId;
+ InitPropVariantFromCLSID(GUID_FusionSensorDevice_UniqueID,
+ &(m_pEnumerationProperties->List[SENSOR_PERSISTENT_UNIQUEID].Value));
+
+ m_pEnumerationProperties->List[SENSOR_ISPRIMARY].Key = DEVPKEY_Sensor_IsPrimary;
+ InitPropVariantFromBoolean(FALSE,
+ &(m_pEnumerationProperties->List[SENSOR_ISPRIMARY].Value));
+ }
+
+ //
+ // Supported Data-Fields
+ //
+ {
+ Size = SENSOR_PROPERTY_LIST_SIZE(FUSIONSENSOR_DATA_COUNT);
+
+ MemoryHandle = NULL;
+ WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
+ MemoryAttributes.ParentObject = SensorInstance;
+ Status = WdfMemoryCreate(&MemoryAttributes,
+ PagedPool,
+ SENSOR_POOL_TAG_FUSIONSENSOR,
+ Size,
+ &MemoryHandle,
+ (PVOID*)&m_pSupportedDataFields);
+ if (!NT_SUCCESS(Status) || m_pSupportedDataFields == nullptr)
+ {
+ TraceError("FUS %!FUNC! WdfMemoryCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ SENSOR_PROPERTY_LIST_INIT(m_pSupportedDataFields, Size);
+ m_pSupportedDataFields->Count = FUSIONSENSOR_DATA_COUNT;
+
+ m_pSupportedDataFields->List[FUSIONSENSOR_DATA_TIMESTAMP] = PKEY_SensorData_Timestamp;
+ m_pSupportedDataFields->List[FUSIONSENSOR_DATA_QUATERNION_W] = PKEY_SensorData_QuaternionW;
+ m_pSupportedDataFields->List[FUSIONSENSOR_DATA_QUATERNION_X] = PKEY_SensorData_QuaternionX;
+ m_pSupportedDataFields->List[FUSIONSENSOR_DATA_QUATERNION_Y] = PKEY_SensorData_QuaternionY;
+ m_pSupportedDataFields->List[FUSIONSENSOR_DATA_QUATERNION_Z] = PKEY_SensorData_QuaternionZ;
+ m_pSupportedDataFields->List[FUSIONSENSOR_DATA_ACCURACY] = PKEY_SensorData_MagnetometerAccuracy;
+ m_pSupportedDataFields->List[FUSIONSENSOR_DATA_DECLINATION_ANGLE] = PKEY_SensorData_DeclinationAngle_Degrees;
+ }
+
+ //
+ // Data
+ //
+ {
+ Size = SENSOR_COLLECTION_LIST_SIZE(FUSIONSENSOR_DATA_COUNT);
+
+ MemoryHandle = NULL;
+ WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
+ MemoryAttributes.ParentObject = SensorInstance;
+ Status = WdfMemoryCreate(&MemoryAttributes,
+ PagedPool,
+ SENSOR_POOL_TAG_FUSIONSENSOR,
+ Size,
+ &MemoryHandle,
+ (PVOID*)&m_pData);
+ if (!NT_SUCCESS(Status) || m_pData == nullptr)
+ {
+ TraceError("FUS %!FUNC! WdfMemoryCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ SENSOR_COLLECTION_LIST_INIT(m_pData, Size);
+ m_pData->Count = FUSIONSENSOR_DATA_COUNT;
+
+ m_pData->List[FUSIONSENSOR_DATA_TIMESTAMP].Key = PKEY_SensorData_Timestamp;
+ GetSystemTimePreciseAsFileTime(&Time);
+ InitPropVariantFromFileTime(&Time, &(m_pData->List[FUSIONSENSOR_DATA_TIMESTAMP].Value));
+
+ m_pData->List[FUSIONSENSOR_DATA_QUATERNION_W].Key = PKEY_SensorData_QuaternionW;
+ InitPropVariantFromFloat(0.0, &(m_pData->List[FUSIONSENSOR_DATA_QUATERNION_W].Value));
+
+ m_pData->List[FUSIONSENSOR_DATA_QUATERNION_X].Key = PKEY_SensorData_QuaternionX;
+ InitPropVariantFromFloat(0.0, &(m_pData->List[FUSIONSENSOR_DATA_QUATERNION_X].Value));
+
+ m_pData->List[FUSIONSENSOR_DATA_QUATERNION_Y].Key = PKEY_SensorData_QuaternionY;
+ InitPropVariantFromFloat(0.0, &(m_pData->List[FUSIONSENSOR_DATA_QUATERNION_Y].Value));
+
+ m_pData->List[FUSIONSENSOR_DATA_QUATERNION_Z].Key = PKEY_SensorData_QuaternionZ;
+ InitPropVariantFromFloat(0.0, &(m_pData->List[FUSIONSENSOR_DATA_QUATERNION_Z].Value));
+
+ m_pData->List[FUSIONSENSOR_DATA_ACCURACY].Key = PKEY_SensorData_MagnetometerAccuracy;
+ InitPropVariantFromUInt32(Unknown, &(m_pData->List[FUSIONSENSOR_DATA_ACCURACY].Value));
+
+ // Declination angle is optional, it will be computed by the system if not present.
+ m_pData->List[FUSIONSENSOR_DATA_DECLINATION_ANGLE].Key = PKEY_SensorData_DeclinationAngle_Degrees;
+ InitPropVariantFromFloat(0.0, &(m_pData->List[FUSIONSENSOR_DATA_DECLINATION_ANGLE].Value));
+ }
+
+ //
+ // Sensor Properties
+ //
+ {
+ m_Interval = FusionSensor_Default_DataInterval;
+
+ Size = SENSOR_COLLECTION_LIST_SIZE(SENSOR_PROPERTIES_COUNT);
+
+ MemoryHandle = NULL;
+ WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
+ MemoryAttributes.ParentObject = SensorInstance;
+ Status = WdfMemoryCreate(&MemoryAttributes,
+ PagedPool,
+ SENSOR_POOL_TAG_FUSIONSENSOR,
+ Size,
+ &MemoryHandle,
+ (PVOID*)&m_pProperties);
+ if (!NT_SUCCESS(Status) || m_pProperties == nullptr)
+ {
+ TraceError("FUS %!FUNC! WdfMemoryCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ SENSOR_COLLECTION_LIST_INIT(m_pProperties, Size);
+ m_pProperties->Count = SENSOR_PROPERTIES_COUNT;
+
+ m_pProperties->List[SENSOR_PROPERTY_STATE].Key = PKEY_Sensor_State;
+ InitPropVariantFromUInt32(SensorState_Initializing,
+ &(m_pProperties->List[SENSOR_PROPERTY_STATE].Value));
+
+ m_pProperties->List[SENSOR_PROPERTY_MIN_INTERVAL].Key = PKEY_Sensor_MinimumDataInterval_Ms;
+ InitPropVariantFromUInt32(FusionSensor_Default_MinDataInterval_Ms,
+ &(m_pProperties->List[SENSOR_PROPERTY_MIN_INTERVAL].Value));
+
+ m_pProperties->List[SENSOR_PROPERTY_MAX_DATAFIELDSIZE].Key = PKEY_Sensor_MaximumDataFieldSize_Bytes;
+ InitPropVariantFromUInt32(CollectionsListGetMarshalledSize(m_pData),
+ &(m_pProperties->List[SENSOR_PROPERTY_MAX_DATAFIELDSIZE].Value));
+
+ m_pProperties->List[SENSOR_PROPERTY_SENSOR_TYPE].Key = PKEY_Sensor_Type;
+ InitPropVariantFromCLSID(GUID_SensorType_Orientation,
+ &(m_pProperties->List[SENSOR_PROPERTY_SENSOR_TYPE].Value));
+
+ m_pProperties->List[SENSOR_PROPERTY_USE_GYRO].Key = PKEY_OrientationSensor_GyroscopeUsed;
+ InitPropVariantFromBoolean(FALSE, &(m_pProperties->List[SENSOR_PROPERTY_USE_GYRO].Value));
+ }
+
+ //
+ // Accelerometer related data field properties
+ //
+ {
+ Size = SENSOR_COLLECTION_LIST_SIZE(SENSOR_ACC_DATA_FIELD_PROPERTY_COUNT);
+
+ MemoryHandle = NULL;
+ WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
+ MemoryAttributes.ParentObject = SensorInstance;
+ Status = WdfMemoryCreate(&MemoryAttributes,
+ PagedPool,
+ SENSOR_POOL_TAG_FUSIONSENSOR,
+ Size,
+ &MemoryHandle,
+ (PVOID*)&m_pAccDataFieldProperties);
+ if (!NT_SUCCESS(Status) || m_pAccDataFieldProperties == nullptr)
+ {
+ TraceError("FUS %!FUNC! Fusion sensor WdfMemoryCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ SENSOR_COLLECTION_LIST_INIT(m_pAccDataFieldProperties, Size);
+ m_pAccDataFieldProperties->Count = SENSOR_ACC_DATA_FIELD_PROPERTY_COUNT;
+
+ m_pAccDataFieldProperties->List[SENSOR_ACC_RESOLUTION].Key = PKEY_SensorDataField_Resolution;
+ InitPropVariantFromFloat((float)AccFakeDevice_Axis_Resolution,
+ &(m_pAccDataFieldProperties->List[SENSOR_ACC_RESOLUTION].Value));
+
+ m_pAccDataFieldProperties->List[SENSOR_ACC_MIN_RANGE].Key = PKEY_SensorDataField_RangeMinimum;
+ InitPropVariantFromFloat(AccFakeDevice_Axis_Minimum,
+ &(m_pAccDataFieldProperties->List[SENSOR_ACC_MIN_RANGE].Value));
+
+ m_pAccDataFieldProperties->List[SENSOR_ACC_MAX_RANGE].Key = PKEY_SensorDataField_RangeMaximum;
+ InitPropVariantFromFloat(AccFakeDevice_Axis_Maximum,
+ &(m_pAccDataFieldProperties->List[SENSOR_ACC_MAX_RANGE].Value));
+
+ }
+
+ //
+ // Gyroscope related data field properties
+ //
+ {
+ Size = SENSOR_COLLECTION_LIST_SIZE(SENSOR_GYR_DATA_FIELD_PROPERTY_COUNT);
+
+ MemoryHandle = NULL;
+ WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
+ MemoryAttributes.ParentObject = SensorInstance;
+ Status = WdfMemoryCreate(&MemoryAttributes,
+ PagedPool,
+ SENSOR_POOL_TAG_FUSIONSENSOR,
+ Size,
+ &MemoryHandle,
+ (PVOID*)&m_pGyrDataFieldProperties);
+ if (!NT_SUCCESS(Status) || m_pGyrDataFieldProperties == nullptr)
+ {
+ TraceError("FUS %!FUNC! Fusion sensor WdfMemoryCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ SENSOR_COLLECTION_LIST_INIT(m_pGyrDataFieldProperties, Size);
+ m_pGyrDataFieldProperties->Count = SENSOR_GYR_DATA_FIELD_PROPERTY_COUNT;
+
+ m_pGyrDataFieldProperties->List[SENSOR_GYR_RESOLUTION].Key = PKEY_SensorDataField_Resolution;
+ InitPropVariantFromFloat(GyrFakeDevice_Resolution_DegreesPerSecond,
+ &(m_pGyrDataFieldProperties->List[SENSOR_GYR_RESOLUTION].Value));
+
+ m_pGyrDataFieldProperties->List[SENSOR_GYR_MIN_RANGE].Key = PKEY_SensorDataField_RangeMinimum;
+ InitPropVariantFromFloat(GyrFakeDevice_Minimum_DegreesPerSecond,
+ &(m_pGyrDataFieldProperties->List[SENSOR_GYR_MIN_RANGE].Value));
+
+ m_pGyrDataFieldProperties->List[SENSOR_GYR_MAX_RANGE].Key = PKEY_SensorDataField_RangeMaximum;
+ InitPropVariantFromFloat(GyrFakeDevice_Maximum_DegreesPerSecond,
+ &(m_pGyrDataFieldProperties->List[SENSOR_GYR_MAX_RANGE].Value));
+ }
+
+ //
+ // Set default threshold
+ //
+ {
+ Size = SENSOR_COLLECTION_LIST_SIZE(FUSIONSENSOR_THRESHOLD_COUNT);
+
+ MemoryHandle = NULL;
+ WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
+ MemoryAttributes.ParentObject = SensorInstance;
+ Status = WdfMemoryCreate(&MemoryAttributes,
+ PagedPool,
+ SENSOR_POOL_TAG_FUSIONSENSOR,
+ Size,
+ &MemoryHandle,
+ (PVOID*)&m_pThresholds);
+ if (!NT_SUCCESS(Status) || m_pThresholds == nullptr)
+ {
+ TraceError("FUS %!FUNC! WdfMemoryCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ SENSOR_COLLECTION_LIST_INIT(m_pThresholds, Size);
+ m_pThresholds->Count = FUSIONSENSOR_THRESHOLD_COUNT;
+
+ m_pThresholds->List[FUSIONSENSOR_THRESHOLD_ROTATION_ANGLE].Key = PKEY_SensorData_RotationAngle_Degrees;
+ InitPropVariantFromFloat(0.0, &(m_pThresholds->List[FUSIONSENSOR_THRESHOLD_ROTATION_ANGLE].Value));
+
+ m_pThresholds->List[FUSIONSENSOR_THRESHOLD_LINEAR_ACCELERATION_X].Key = PKEY_SensorData_LinearAccelerationX_Gs;
+ InitPropVariantFromFloat(0.0, &(m_pThresholds->List[FUSIONSENSOR_THRESHOLD_LINEAR_ACCELERATION_X].Value));
+
+ m_pThresholds->List[FUSIONSENSOR_THRESHOLD_LINEAR_ACCELERATION_Y].Key = PKEY_SensorData_LinearAccelerationY_Gs;
+ InitPropVariantFromFloat(0.0, &(m_pThresholds->List[FUSIONSENSOR_THRESHOLD_LINEAR_ACCELERATION_Y].Value));
+
+ m_pThresholds->List[FUSIONSENSOR_THRESHOLD_LINEAR_ACCELERATION_Z].Key = PKEY_SensorData_LinearAccelerationZ_Gs;
+ InitPropVariantFromFloat(0.0, &(m_pThresholds->List[FUSIONSENSOR_THRESHOLD_LINEAR_ACCELERATION_Z].Value));
+
+ m_pThresholds->List[FUSIONSENSOR_THRESHOLD_ROTATION_RATE_X].Key = PKEY_SensorData_CorrectedAngularVelocityX_DegreesPerSecond;
+ InitPropVariantFromFloat(0.0, &(m_pThresholds->List[FUSIONSENSOR_THRESHOLD_ROTATION_RATE_X].Value));
+
+ m_pThresholds->List[FUSIONSENSOR_THRESHOLD_ROTATION_RATE_Y].Key = PKEY_SensorData_CorrectedAngularVelocityY_DegreesPerSecond;
+ InitPropVariantFromFloat(0.0, &(m_pThresholds->List[FUSIONSENSOR_THRESHOLD_ROTATION_RATE_Y].Value));
+
+ m_pThresholds->List[FUSIONSENSOR_THRESHOLD_ROTATION_RATE_Z].Key = PKEY_SensorData_CorrectedAngularVelocityZ_DegreesPerSecond;
+ InitPropVariantFromFloat(0.0, &(m_pThresholds->List[FUSIONSENSOR_THRESHOLD_ROTATION_RATE_Z].Value));
+
+ ZeroMemory(&m_CachedThresholds, sizeof(m_CachedThresholds));
+ }
+
+ ZeroMemory(&m_LastSample, sizeof(m_LastSample));
+
+ // Set default threshold
+ m_FirstSample = TRUE;
+
+Exit:
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+
+// This routine is the AddDevice entry point for the FusionSensor client
+// driver. This routine is called by the framework in response to AddDevice
+// call from the PnP manager. It will create and initialize the device object
+// to represent a new instance of the sensor client.
+NTSTATUS
+FusionSensorDevice::OnDeviceAdd(
+ _In_ WDFDRIVER /*Driver*/, // Supplies a handle to the driver object created in DriverEntry
+ _Inout_ PWDFDEVICE_INIT pDeviceInit // Supplies a pointer to a framework-allocated WDFDEVICE_INIT structure
+ )
+{
+ WDF_PNPPOWER_EVENT_CALLBACKS Callbacks;
+ WDFDEVICE Device = nullptr;
+ WDF_OBJECT_ATTRIBUTES FdoAttributes;
+ ULONG Flag = 0;
+ SENSOR_CONTROLLER_CONFIG SensorConfig;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ WDF_OBJECT_ATTRIBUTES_INIT(&FdoAttributes);
+
+ // Initialize FDO attributes and set up file object with sensor extension
+ Status = SensorsCxDeviceInitConfig(pDeviceInit, &FdoAttributes, Flag);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! SensorsCxDeviceInitConfig failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Register the PnP callbacks with the framework.
+ WDF_PNPPOWER_EVENT_CALLBACKS_INIT(&Callbacks);
+ Callbacks.EvtDevicePrepareHardware = FusionSensorDevice::OnPrepareHardware;
+ Callbacks.EvtDeviceReleaseHardware = FusionSensorDevice::OnReleaseHardware;
+ Callbacks.EvtDeviceD0Entry = FusionSensorDevice::OnD0Entry;
+ Callbacks.EvtDeviceD0Exit = FusionSensorDevice::OnD0Exit;
+
+ WdfDeviceInitSetPnpPowerEventCallbacks(pDeviceInit, &Callbacks);
+
+ // Call the framework to create the device
+ Status = WdfDeviceCreate(&pDeviceInit, &FdoAttributes, &Device);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! WdfDeviceCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Register CLX callback function pointers
+ SENSOR_CONTROLLER_CONFIG_INIT(&SensorConfig);
+ SensorConfig.DriverIsPowerPolicyOwner = WdfUseDefault;
+
+ SensorConfig.EvtSensorStart = FusionSensorDevice::OnStart;
+ SensorConfig.EvtSensorStop = FusionSensorDevice::OnStop;
+ SensorConfig.EvtSensorGetSupportedDataFields = FusionSensorDevice::OnGetSupportedDataFields;
+ SensorConfig.EvtSensorGetDataInterval = FusionSensorDevice::OnGetDataInterval;
+ SensorConfig.EvtSensorSetDataInterval = FusionSensorDevice::OnSetDataInterval;
+ SensorConfig.EvtSensorGetDataFieldProperties = FusionSensorDevice::OnGetDataFieldProperties;
+ SensorConfig.EvtSensorGetDataThresholds = FusionSensorDevice::OnGetDataThresholds;
+ SensorConfig.EvtSensorSetDataThresholds = FusionSensorDevice::OnSetDataThresholds;
+ SensorConfig.EvtSensorGetProperties = FusionSensorDevice::OnGetProperties;
+ SensorConfig.EvtSensorDeviceIoControl = FusionSensorDevice::OnIoControl;
+
+ // Set up power capabilities and IO queues
+ Status = SensorsCxDeviceInitialize(Device, &SensorConfig);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! SensorsCxDeviceInitialize failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+Exit:
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+
+// This routine is called by the framework when the PnP manager sends an
+// IRP_MN_START_DEVICE request to the driver stack. This routine is
+// responsible for performing operations that are necessary to make the
+// driver's device operational (for e.g. mapping the hardware resources
+// into memory).
+NTSTATUS
+FusionSensorDevice::OnPrepareHardware(
+ _In_ WDFDEVICE Device, // Supplies a handle to the framework device object
+ _In_ WDFCMRESLIST /*ResourcesRaw*/, // Supplies a handle to a collection of framework resource
+ // objects. This collection identifies the raw (bus-relative) hardware
+ // resources that have been assigned to the device.
+ _In_ WDFCMRESLIST /*ResourcesTranslated*/) // Supplies a handle to a collection of framework
+ // resource objects. This collection identifies the translated
+ // (system-physical) hardware resources that have been assigned to the
+ // device. The resources appear from the CPU's point of view.
+{
+ PFusionSensorDevice pDevice = nullptr;
+ WDF_OBJECT_ATTRIBUTES SensorAttr = {};
+ SENSOR_CONFIG SensorConfig = {};
+ SENSOROBJECT SensorInstance = nullptr;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ // Construct sensor instance
+
+ // Create WDFOBJECT for the sensor
+ WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&SensorAttr, FusionSensorDevice);
+
+ // Register sensor instance with clx
+
+ Status = SensorsCxSensorCreate(Device, &SensorAttr, &SensorInstance);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! SensorsCxSensorCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ if (nullptr == pDevice)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! GetFusionSensorContextFromSensorInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Device initialization
+
+ Status = pDevice->Initialize(Device, SensorInstance);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! Initialize device object failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ SENSOR_CONFIG_INIT(&SensorConfig);
+ SensorConfig.pEnumerationList = pDevice->m_pEnumerationProperties;
+ Status = SensorsCxSensorInitialize(SensorInstance, &SensorConfig);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! SensorsCxSensorInitialize failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+Exit:
+ SENSOR_FunctionExit(Status);
+
+ return Status;
+}
+
+
+
+// This routine is called by the framework when the PnP manager is revoking
+// ownership of our resources. This may be in response to either
+// IRP_MN_STOP_DEVICE or IRP_MN_REMOVE_DEVICE. This routine is responsible for
+// performing cleanup of resources allocated in PrepareHardware callback.
+// This callback is invoked before passing the request down to the lower driver.
+// This routine will also be invoked by the framework if the prepare hardware
+// callback returns a failure.
+//
+// Argument:
+// Device: IN: Supplies a handle to the framework device object
+// ResourcesTranslated: IN: Supplies a handle to a collection of framework
+// resource objects. This collection identifies the translated
+// (system-physical) hardware resources that have been assigned to the
+// device. The resources appear from the CPU's point of view.
+//
+// Return Value:
+// NTSTATUS code
+//------------------------------------------------------------------------------
+NTSTATUS
+FusionSensorDevice::OnReleaseHardware(
+ _In_ WDFDEVICE Device, // Supplies a handle to the framework device object
+ _In_ WDFCMRESLIST /*ResourcesTranslated*/) // Supplies a handle to a collection of framework
+ // resource objects. This collection identifies the translated
+ // (system-physical) hardware resources that have been assigned to the
+ // device. The resources appear from the CPU's point of view.
+{
+ PHardwareSimulator pSimulator = nullptr;
+ PFusionSensorDevice pDevice = nullptr;
+ SENSOROBJECT SensorInstance = nullptr;
+ ULONG SensorInstanceCount = 1; // only expect 1 sensor instance
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ // Get sensor instance
+ Status = SensorsCxDeviceGetSensorList(Device, &SensorInstance, &SensorInstanceCount);
+ if (!NT_SUCCESS(Status) ||
+ 0 == SensorInstanceCount ||
+ NULL == SensorInstance)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! SensorsCxDeviceGetSensorList failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ if (nullptr == pDevice)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! GetFusionSensorContextFromSensorInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // TODO: Remove the HardwareSimulator code in your final driver. The HardwareSimulator is only used for the purpose of demonstrating how sensor driver samples work.
+ pSimulator = GetHardwareSimulatorContextFromInstance(pDevice->m_SimulatorInstance);
+ if (nullptr == pSimulator)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! GetHardwareSimulatorContextFromInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+
+ // Delete lock
+ if (NULL != pDevice->m_Lock)
+ {
+ WdfObjectDelete(pDevice->m_Lock);
+ pDevice->m_Lock = NULL;
+ }
+
+ // Cleanup the FusionSensor simulator
+ pSimulator->Cleanup();
+
+ // Delete hardware simulator instance
+ if (NULL != pDevice->m_SimulatorInstance)
+ {
+ WdfObjectDelete(pDevice->m_SimulatorInstance);
+ pDevice->m_SimulatorInstance = NULL;
+ }
+
+ // Delete sensor instance
+ if (NULL != pDevice->m_SensorInstance)
+ {
+ WdfObjectDelete(pDevice->m_SensorInstance);
+ }
+
+Exit:
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+
+// This routine is invoked by the framework to program the device to goto
+// D0, which is the working state. The framework invokes callback every
+// time the hardware needs to be (re-)initialized. This includes after
+// IRP_MN_START_DEVICE, IRP_MN_CANCEL_STOP_DEVICE, IRP_MN_CANCEL_REMOVE_DEVICE,
+// and IRP_MN_SET_POWER-D0.
+NTSTATUS
+FusionSensorDevice::OnD0Entry(
+ _In_ WDFDEVICE Device, // Supplies a handle to the framework device object
+ _In_ WDF_POWER_DEVICE_STATE /*PreviousState*/) // WDF_POWER_DEVICE_STATE-typed enumerator that identifies
+ // the device power state that the device was in before this transition to D0
+{
+ PFusionSensorDevice pDevice;
+ SENSOROBJECT SensorInstance = NULL;
+ ULONG SensorInstanceCount = 1;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ // Get sensor instance
+ Status = SensorsCxDeviceGetSensorList(Device, &SensorInstance, &SensorInstanceCount);
+ if (!NT_SUCCESS(Status) ||
+ 0 == SensorInstanceCount ||
+ NULL == SensorInstance)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! SensorsCxDeviceGetSensorList failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ if (nullptr == pDevice)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! GetFusionSensorContextFromSensorInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ //
+ // Power on sensor
+ //
+ pDevice->m_PoweredOn = TRUE;
+ InitPropVariantFromUInt32(SensorState_Idle,
+ &(pDevice->m_pProperties->List[SENSOR_PROPERTY_STATE].Value));
+
+Exit:
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
+
+
+
+// This routine is invoked by the framework to program the device to go into
+// a certain Dx state. The framework invokes callback every the the device is
+// leaving the D0 state, which happens when the device is stopped, when it is
+// removed, and when it is powered off.
+NTSTATUS
+FusionSensorDevice::OnD0Exit(
+ _In_ WDFDEVICE Device, // Supplies a handle to the framework device object
+ _In_ WDF_POWER_DEVICE_STATE /*TargetState*/) // Supplies the device power state which the device will be put
+ // in once the callback is complete
+{
+ PFusionSensorDevice pDevice;
+ SENSOROBJECT SensorInstance = NULL;
+ ULONG SensorInstanceCount = 1;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ // Get sensor instance
+ Status = SensorsCxDeviceGetSensorList(Device, &SensorInstance, &SensorInstanceCount);
+ if (!NT_SUCCESS(Status) ||
+ 0 == SensorInstanceCount ||
+ NULL == SensorInstance)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! SensorsCxDeviceGetSensorList failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ pDevice = GetFusionSensorContextFromSensorInstance(SensorInstance);
+ if (nullptr == pDevice)
+ {
+ Status = STATUS_INVALID_PARAMETER;
+ TraceError("FUS %!FUNC! GetFusionSensorContextFromSensorInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ //
+ // Power on sensor
+ //
+ pDevice->m_PoweredOn = FALSE;
+
+Exit:
+ SENSOR_FunctionExit(Status);
+ return Status;
+}
diff --git a/sensors/Fusion/driver.cpp b/sensors/Fusion/driver.cpp
new file mode 100644
index 00000000..1fd117f3
--- /dev/null
+++ b/sensors/Fusion/driver.cpp
@@ -0,0 +1,76 @@
+//Copyright (C) Microsoft Corporation, All Rights Reserved.
+//
+//Abstract:
+//
+// This module contains the implementation of entry and exit point of FusionSensor sample driver.
+//
+//Environment:
+//
+// Windows User-Mode Driver Framework (UMDF)
+
+#include "Device.h"
+#include "Driver.h"
+
+#include "Driver.tmh"
+
+
+
+// This routine is the driver initialization entry point.
+NTSTATUS
+DriverEntry(
+ _In_ PDRIVER_OBJECT DriverObject, // Pointer to the driver object created by the I/O manager
+ _In_ PUNICODE_STRING RegistryPath // Pointer to the driver specific registry key
+ )
+{
+ WDF_DRIVER_CONFIG DriverConfig;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ // Initialize WPP Tracing
+ WPP_INIT_TRACING(DriverObject, NULL);
+
+ SENSOR_FunctionEnter();
+
+ DriverConfig.DriverPoolTag = SENSOR_POOL_TAG_FUSIONSENSOR;
+
+ // Initialize the driver configuration structure.
+ WDF_DRIVER_CONFIG_INIT(&DriverConfig, FusionSensorDevice::OnDeviceAdd);
+ DriverConfig.EvtDriverUnload = OnDriverUnload;
+
+ // Create a framework driver object to represent our driver.
+ Status = WdfDriverCreate(DriverObject,
+ RegistryPath,
+ WDF_NO_OBJECT_ATTRIBUTES,
+ &DriverConfig,
+ WDF_NO_HANDLE);
+
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! WdfDriverCreate failed: %!STATUS!", Status);
+ goto Exit;
+ }
+
+Exit:
+ SENSOR_FunctionExit(Status);
+
+ return Status;
+}
+
+
+
+// This routine is called when the driver unloads.
+VOID
+OnDriverUnload(
+ _In_ WDFDRIVER Driver // Driver object
+ )
+{
+ SENSOR_FunctionEnter();
+
+ SENSOR_FunctionExit(STATUS_SUCCESS);
+
+ // WPP_CLEANUP doesn't actually use the Driver parameter
+ // So we need to set it as unreferenced.
+ UNREFERENCED_PARAMETER(Driver);
+ WPP_CLEANUP(WdfDriverWdmGetDriverObject(Driver));
+
+ return;
+} \ No newline at end of file
diff --git a/sensors/Fusion/hardwaresimulator.cpp b/sensors/Fusion/hardwaresimulator.cpp
new file mode 100644
index 00000000..b498defb
--- /dev/null
+++ b/sensors/Fusion/hardwaresimulator.cpp
@@ -0,0 +1,277 @@
+//Copyright (C) Microsoft Corporation, All Rights Reserved.
+//
+//Abstract:
+//
+// This module contains the implementation of the FusionSensor sample driver
+// hardware simulator.
+//
+//Environment:
+//
+// Windows User-Mode Driver Framework (UMDF)
+
+#include "HardwareSimulator.h"
+
+#include "HardwareSimulator.tmh"
+
+#include "Device.h"
+
+// Simulated FusionSensor data
+// The simulation data represent the FusionSensor data for a user walking and running at different paces
+// Since the simulator is designed to report a sample every second,
+// each line in the table represents 1 second of data
+const FusionSensorSample SimulatorData[] = {
+// 1: Timestamp
+// 2: Quaternion;
+// 3: Accuracy;
+// 4: DeclinationAngle;
+//
+// 1 | 2 | 3 | 4 |
+ { {},{ 0.6118738f, 0.1390667f, 0.136009f, 0.7658455f }, MagnetometerAccuracy_Unknown, 17.1f },
+ { {},{ 0.6174188f, 0.1399692f, 0.1338535f, 0.7625271f }, MagnetometerAccuracy_Approximate, 17.1f },
+ { {},{ 0.6028171f, 0.1740682f, 0.1788765f, 0.7570137f }, MagnetometerAccuracy_High, 17.1f },
+ { {},{ 0.4333673f, 0.05344541f, 0.06945555f, 0.8965058f }, MagnetometerAccuracy_High, 17.1f },
+};
+
+HardwareSimulator::HardwareSimulator() :
+ m_HasReset(TRUE),
+ m_Index(0),
+ m_Lock(NULL),
+ m_State(SimulatorState_NotInitialized),
+ m_SimulatorInstance(NULL),
+ m_Timer(NULL)
+{
+}
+
+HardwareSimulator::~HardwareSimulator()
+{
+}
+
+// This static routine performs simulator initialization. The routine creates a
+// timer object that periodically updates the m_Index location
+NTSTATUS
+HardwareSimulator::Initialize(
+ _In_ WDFDEVICE Device, // WDF device representing the sensor
+ _Out_ WDFOBJECT *SimulatorInstance) // Instance of the WDF object for the simulator
+{
+ PHardwareSimulator pSimulator = nullptr;
+ NTSTATUS Status = STATUS_SUCCESS;
+ WDF_OBJECT_ATTRIBUTES HardwareSimulatorAttributes = {};
+
+ SENSOR_FunctionEnter();
+
+ // Create WDFOBJECT for the hardware simulator
+ WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&HardwareSimulatorAttributes, HardwareSimulator);
+ HardwareSimulatorAttributes.ParentObject = Device;
+
+ Status = WdfObjectCreate(&HardwareSimulatorAttributes, SimulatorInstance);
+ if (!NT_SUCCESS(Status))
+ {
+ TraceError("FUS %!FUNC! WdfObjectCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ pSimulator = GetHardwareSimulatorContextFromInstance(*SimulatorInstance);
+ if (nullptr == pSimulator)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! GetHardwareSimulatorContextFromInstance failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ pSimulator->InitializeInternal(*SimulatorInstance);
+
+Exit:
+
+ SENSOR_FunctionExit(Status);
+
+ return Status;
+}
+
+
+// Internal routine to perform simulator initialization
+NTSTATUS
+HardwareSimulator::InitializeInternal(
+ _In_ WDFOBJECT SimulatorInstance) // Instance of the WDF object for the simulator
+{
+ NTSTATUS Status = STATUS_SUCCESS;
+ WDF_OBJECT_ATTRIBUTES TimerAttributes = {};
+ WDF_TIMER_CONFIG TimerConfig = {};
+
+ SENSOR_FunctionEnter();
+
+ // Only initialize the simulator if it is in the "not initialized" state
+ if (SimulatorState_NotInitialized == m_State)
+ {
+ // Create sample Lock
+ Status = WdfWaitLockCreate(WDF_NO_OBJECT_ATTRIBUTES, &m_Lock);
+ if (!NT_SUCCESS(Status))
+ {
+ m_Lock = NULL;
+
+ TraceError("FUS %!FUNC! WdfWaitLockCreate for m_Lock failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Create a timer object for simulation updates
+ WDF_TIMER_CONFIG_INIT(&TimerConfig, HardwareSimulator::OnTimerExpire);
+ WDF_OBJECT_ATTRIBUTES_INIT(&TimerAttributes);
+ TimerAttributes.ParentObject = SimulatorInstance;
+ TimerAttributes.ExecutionLevel = WdfExecutionLevelPassive;
+
+ Status = WdfTimerCreate(&TimerConfig, &TimerAttributes, &m_Timer);
+ if (!NT_SUCCESS(Status))
+ {
+ m_Timer = NULL;
+
+ TraceError("FUS %!FUNC! WdfTimerCreate failed %!STATUS!", Status);
+ goto Exit;
+ }
+
+ // Set the simulator state to "initialized"
+ m_State = SimulatorState_Initialized;
+ m_SimulatorInstance = SimulatorInstance;
+ }
+
+Exit:
+ if (!NT_SUCCESS(Status) && NULL != m_Lock)
+ {
+ WdfObjectDelete(m_Lock);
+ m_Lock = NULL;
+ }
+
+ SENSOR_FunctionExit(Status);
+
+ return Status;
+}
+
+
+// This routine perform a simulator cleanup
+NTSTATUS
+HardwareSimulator::Cleanup()
+{
+ NTSTATUS status = STATUS_SUCCESS;
+
+ if (SimulatorState_Started == m_State)
+ {
+ Stop();
+ }
+
+ // Delete lock
+ if (NULL != m_Lock)
+ {
+ WdfObjectDelete(m_Lock);
+ m_Lock = NULL;
+ }
+
+ // Set the simulator state to "not initialized"
+ m_State = SimulatorState_NotInitialized;
+
+ return status;
+}
+
+
+// This routine starts the simulator
+NTSTATUS
+HardwareSimulator::Start()
+{
+ NTSTATUS status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (SimulatorState_Initialized == m_State)
+ {
+ WdfTimerStart(m_Timer, WDF_REL_TIMEOUT_IN_MS(SIMULATOR_HARDWARE_INTERVAL_MS));
+ m_State = SimulatorState_Started;
+ }
+
+ SENSOR_FunctionExit(status);
+
+ return status;
+}
+
+
+// This routine stops the simulator
+NTSTATUS
+HardwareSimulator::Stop()
+{
+ NTSTATUS status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (SimulatorState_Started == m_State)
+ {
+ WdfTimerStop(m_Timer, TRUE);
+ m_State = SimulatorState_Initialized;
+ }
+
+ SENSOR_FunctionExit(status);
+
+ return status;
+}
+
+
+// This callback is called when the simulator wait time has expired and the simulator
+// is ready to switch to the next sample. The callback updates the sample index and
+// schedules the next wake up time.
+VOID
+HardwareSimulator::OnTimerExpire(
+ _In_ WDFTIMER Timer) // WDF timer object
+{
+ HardwareSimulator *pSimulator = nullptr;
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ pSimulator = GetHardwareSimulatorContextFromInstance(WdfTimerGetParentObject(Timer));
+ if (nullptr == pSimulator)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! GetHardwareSimulatorContextFromInstance failed %!STATUS!", Status);
+ }
+
+ if (NT_SUCCESS(Status))
+ {
+ // Increment the sample index, roll over if the index reach the end of the array
+ WdfWaitLockAcquire(pSimulator->m_Lock, NULL);
+ pSimulator->m_Index++;
+ pSimulator->m_Index = pSimulator->m_Index % ARRAYSIZE(SimulatorData);
+
+ WdfWaitLockRelease(pSimulator->m_Lock);
+
+ WdfTimerStart(pSimulator->m_Timer, WDF_REL_TIMEOUT_IN_MS(SIMULATOR_HARDWARE_INTERVAL_MS));
+ }
+
+ SENSOR_FunctionExit(Status);
+}
+
+
+// This routine returns the current sample from the driver at the current m_Index
+// location
+NTSTATUS
+HardwareSimulator::GetSample(
+ _Out_ FusionSensorSample *Sample) // FusionSensor sample
+{
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ SENSOR_FunctionEnter();
+
+ if (nullptr == Sample)
+ {
+ Status = STATUS_INSUFFICIENT_RESOURCES;
+ TraceError("FUS %!FUNC! Sample parameter is null");
+ }
+
+ if (NT_SUCCESS(Status))
+ {
+ WdfWaitLockAcquire(m_Lock, NULL);
+ *Sample = SimulatorData[m_Index];
+
+ WdfWaitLockRelease(m_Lock);
+
+ GetSystemTimePreciseAsFileTime(&Sample->Timestamp);
+ }
+
+ SENSOR_FunctionExit(Status);
+
+ return Status;
+}
diff --git a/sensors/Fusion/readme.md b/sensors/Fusion/readme.md
new file mode 100644
index 00000000..a93f9195
--- /dev/null
+++ b/sensors/Fusion/readme.md
@@ -0,0 +1,12 @@
+<!---
+ name: Fusion Sensor Driver Sample
+ platform: UMDF2
+ language: cpp
+ category: Sensors
+ description: Demonstrates how to write a UMDF v2 driver to control a virtual FusionSensor sensor.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=856914
+--->
+
+# Fusion Sensor Driver Sample
+
+The FusionSensor sample shows how to write a UMDF v2 driver to control a virtual FusionSensor sensor. \ No newline at end of file
diff --git a/sensors/Pedometer/Device.h b/sensors/Pedometer/Device.h
index 008c3ef6..593e0b95 100644
--- a/sensors/Pedometer/Device.h
+++ b/sensors/Pedometer/Device.h
@@ -15,7 +15,7 @@
#include <wdf.h>
#include <math.h>
-#include <SensorsTrace.h>
+#include "SensorsTrace.h"
#include <SensorsCx.h>
#include <SensorsUtils.h>
diff --git a/sensors/Pedometer/Gallery.xml b/sensors/Pedometer/Gallery.xml
deleted file mode 100644
index ba572bcf..00000000
--- a/sensors/Pedometer/Gallery.xml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="../../buildx/script2/preview.xslt"?>
-<gallery_sample xmlns="http://microsoft.com/wdcml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://microsoft.com/wdcml ../../buildx/schema/xsd/wdcml.xsd">
- <metadata id="gallery_samples.107a_gallery" type="gallery_sample" msdnID="7cba6311-f0db-4c3d-8f1f-25de8648b353">
- <title>Pedometer</title>
- <!-- Add a devlang for each programming language in all versions of the sample. -->
- <devlang value="cpp" />
- <!-- Do not change tech value -->
- <tech value="gallery_samples" />
- <index />
- <sample_langs>
- <!-- Describes the languages to which the sample code itself has been localized. -->
- <sample_lang xml:lang="en-us" />
- </sample_langs>
- </metadata>
- <content>
- <desc>
- <p><abstract>The Pedometer sample shows how to write a UMDF v2 driver to control a virtual Pedometer sensor.</abstract></p>
- </desc>
- <outline />
- <license_info>
- <default_license />
- </license_info>
- <programming_models>
- <programming_model value="win32" />
- </programming_models>
- <application_frameworks>
- </application_frameworks>
- <!-- For Driver Samples Only -->
- <driver_models>
- <!-- possible values: kmdf, umdf, wdm, ndis, wddm -->
- <driver_model value="UMDF" />
- </driver_models>
- <driver_techs>
- <driver_tech value="Windows Driver" />
- </driver_techs>
- <related_techs>
- </related_techs>
- <os_requirements>
- <min_os>
- <client name="winblue"/>
- <server name="wbluesrv"/>
- </min_os>
- </os_requirements>
- <required_sdks>
- <min_sdk>
- <tla rid="windows_driver_kit_8" />
- </min_sdk>
- </required_sdks>
- <supported_ides>
- <supported_ide>
- <tla rid="tla_visualstu2012" />
- </supported_ide>
- </supported_ides>
- <build_info>
- <authored_instructions>
- <section>
- <!-- Include any special instructions for compiling your sample -->
- <sectioncontents>
- </sectioncontents>
- </section>
- </authored_instructions>
- </build_info>
- <run_info>
- <authored_instructions>
- <section>
- <sectioncontents>
- <p>To install the sample driver, follow these steps:</p>
- <proch>
- <item>Ensure that the driver builds without errors.</item>
- <item>Copy the DLL and INF files to a separate folder.</item>
- <item>Enter the command "<inline_code devlang="cmd">devcon.exe update Pedometer.inf ACPI\&lt;HWID&gt;</inline_code>" to install the driver on an existing device node. You can find the devcon.exe program in the tools\devcon folder where you installed the WDK.</item>
- </proch>
- </sectioncontents>
- </section>
- <section>
- <title>File manifest</title>
- <sectioncontents>
- <p>The following source files are in the src\Sensors\Pedometer folder and are used to build the Pedometer.dll and Pedometer.inf files.</p>
- <table>
- <tr>
- <th>File</th>
- <th>Description</th>
- </tr>
- <tr>
- <td>
- <p>device.h, device.cpp</p>
- </td>
- <td>
- <p>Implements the driver's WDF PnP event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>client.cpp</p>
- </td>
- <td>
- <p>Implements the driver's callback functions from the class extension to pedometer sensors.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>driver.h, driver.cpp</p>
- </td>
- <td>
- <p>WDF driver entry event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>hardwaresimulator.h, hardwaresimulator.cpp</p>
- </td>
- <td>
- <p>Hardware simulator implementation</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>makefile.inc</p>
- </td>
- <td>
- <p>Defines custom build actions. Includes the conversion of the .INX file into a .INF file.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>SensorsTrace.h</p>
- </td>
- <td>
- <p>Implementation the sensor traces files.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Pedometer.ctl</p>
- </td>
- <td>
- <p>Declaration of driver's tracing GUID</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>Pedometer.inx</p>
- </td>
- <td>
- <p>Describes the installation of the driver. The build process converts this into a .INF.</p>
- </td>
- </tr>
- </table>
- </sectioncontents>
- </section>
- </authored_instructions>
- </run_info>
- </content>
- <!-- List the component compcentral path -->
- <feature_teams>
- <feature_team_info comp_central_path="CORE-OS Core\SiGMa-Silicon, Graphics and Media\SiPlat - Silicon Platform\Sensors" dev_owner="osamasal" writer_owner="ericdoku" />
- </feature_teams>
- <workflow_control_host />
-</gallery_sample>
diff --git a/sensors/Pedometer/HardwareSimulator.h b/sensors/Pedometer/HardwareSimulator.h
index 3d9646b9..c0f72cac 100644
--- a/sensors/Pedometer/HardwareSimulator.h
+++ b/sensors/Pedometer/HardwareSimulator.h
@@ -14,7 +14,7 @@
#include <windows.h>
#include <wdf.h>
-#include <SensorsTrace.h>
+#include "SensorsTrace.h"
#include <SensorsCx.h>
#include "Device.h"
diff --git a/sensors/Pedometer/Pedometer.inx b/sensors/Pedometer/Pedometer.inx
index f9cb099f..bb6cb2a2 100644
--- a/sensors/Pedometer/Pedometer.inx
+++ b/sensors/Pedometer/Pedometer.inx
Binary files differ
diff --git a/sensors/Pedometer/readme.md b/sensors/Pedometer/readme.md
new file mode 100644
index 00000000..fcf6c82f
--- /dev/null
+++ b/sensors/Pedometer/readme.md
@@ -0,0 +1,12 @@
+<!---
+ name: Pedometer Sensor Sample
+ platform: UMDF2
+ language: cpp
+ category: Sensors
+ description: Demonstrates how to write a UMDF v2 driver to control a virtual Pedometer sensor.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617959
+--->
+
+# Pedometer Sensor Sample
+
+The Pedometer sample shows how to write a UMDF v2 driver to control a virtual Pedometer sensor. \ No newline at end of file
diff --git a/sensors/SensorsComboDriver/SensorsComboDriver.inx b/sensors/SensorsComboDriver/SensorsComboDriver.inx
index 50326f48..36389fad 100644
--- a/sensors/SensorsComboDriver/SensorsComboDriver.inx
+++ b/sensors/SensorsComboDriver/SensorsComboDriver.inx
Binary files differ
diff --git a/sensors/SensorsComboDriver/SensorsComboDriver.vcxproj b/sensors/SensorsComboDriver/SensorsComboDriver.vcxproj
index 15e5d0a5..381f5a03 100644
--- a/sensors/SensorsComboDriver/SensorsComboDriver.vcxproj
+++ b/sensors/SensorsComboDriver/SensorsComboDriver.vcxproj
@@ -118,7 +118,6 @@
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\mincore.lib;$(SDK_LIB_PATH)\propsys.lib;$(SDK_LIB_PATH)\sensors\1.1\sensorscxstub.lib;$(SDK_LIB_PATH)\sensorsutils.lib</AdditionalDependencies>
- <ModuleDefinitionFile>SensorsComboDriver.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -139,7 +138,6 @@
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\mincore.lib;$(SDK_LIB_PATH)\propsys.lib;$(SDK_LIB_PATH)\sensors\1.1\sensorscxstub.lib;$(SDK_LIB_PATH)\sensorsutils.lib</AdditionalDependencies>
- <ModuleDefinitionFile>SensorsComboDriver.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -160,7 +158,6 @@
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\mincore.lib;$(SDK_LIB_PATH)\propsys.lib;$(SDK_LIB_PATH)\sensors\1.1\sensorscxstub.lib;$(SDK_LIB_PATH)\sensorsutils.lib</AdditionalDependencies>
- <ModuleDefinitionFile>SensorsComboDriver.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -181,7 +178,6 @@
</ResourceCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(SDK_LIB_PATH)\mincore.lib;$(SDK_LIB_PATH)\propsys.lib;$(SDK_LIB_PATH)\sensors\1.1\sensorscxstub.lib;$(SDK_LIB_PATH)\sensorsutils.lib</AdditionalDependencies>
- <ModuleDefinitionFile>SensorsComboDriver.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
@@ -197,4 +193,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/sensors/SensorsComboDriver/readme.md b/sensors/SensorsComboDriver/readme.md
new file mode 100644
index 00000000..9c8e4c67
--- /dev/null
+++ b/sensors/SensorsComboDriver/readme.md
@@ -0,0 +1,12 @@
+<!---
+ name: Sensors Combo Driver Sample
+ platform: UMDF2
+ language: cpp
+ category: Sensors
+ description: Demonstrates how to write UMDF v2 drivers to control various types of virtual sensors.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=856915
+--->
+
+# Sensors Combo Driver Sample
+
+The sensors combo driver sensor sample shows how to write UMDF v2 drivers to control various types of virtual sensors such as Ambient Light, Barometer, Gyroscope, Magnetometer, Geomagnetic, Gravity Vector, Proximity, Linear Accelerometer and Relative Fusion. \ No newline at end of file
diff --git a/sensors/SimpleDeviceOrientationSensor/Device.h b/sensors/SimpleDeviceOrientationSensor/Device.h
index b75b5ceb..3d1e677c 100644
--- a/sensors/SimpleDeviceOrientationSensor/Device.h
+++ b/sensors/SimpleDeviceOrientationSensor/Device.h
@@ -15,7 +15,7 @@
#include <wdf.h>
#include <math.h>
-#include <SensorsTrace.h>
+#include "SensorsTrace.h"
#include <SensorsCx.h>
#include <SensorsUtils.h>
diff --git a/sensors/SimpleDeviceOrientationSensor/Gallery.xml b/sensors/SimpleDeviceOrientationSensor/Gallery.xml
deleted file mode 100644
index 8fbb8b8c..00000000
--- a/sensors/SimpleDeviceOrientationSensor/Gallery.xml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="../../buildx/script2/preview.xslt"?>
-<gallery_sample xmlns="http://microsoft.com/wdcml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://microsoft.com/wdcml ../../buildx/schema/xsd/wdcml.xsd">
- <metadata id="gallery_samples.107a_gallery" type="gallery_sample" msdnID="7cba6311-f0db-4c3d-8f1f-25de8648b353">
- <title>SimpleDeviceOrientationSensor</title>
- <!-- Add a devlang for each programming language in all versions of the sample. -->
- <devlang value="cpp" />
- <!-- Do not change tech value -->
- <tech value="gallery_samples" />
- <index />
- <sample_langs>
- <!-- Describes the languages to which the sample code itself has been localized. -->
- <sample_lang xml:lang="en-us" />
- </sample_langs>
- </metadata>
- <content>
- <desc>
- <p><abstract>The SimpleDeviceOrientationSensor sample shows how to write a UMDF v2 sensor driver to output Simple Device Orientation values.</abstract></p>
- </desc>
- <outline />
- <license_info>
- <default_license />
- </license_info>
- <programming_models>
- <programming_model value="win32" />
- </programming_models>
- <application_frameworks>
- </application_frameworks>
- <!-- For Driver Samples Only -->
- <driver_models>
- <!-- possible values: kmdf, umdf, wdm, ndis, wddm -->
- <driver_model value="UMDF" />
- </driver_models>
- <driver_techs>
- <driver_tech value="Windows Driver" />
- </driver_techs>
- <related_techs>
- </related_techs>
- <os_requirements>
- <min_os>
- <client name="winblue"/>
- <server name="wbluesrv"/>
- </min_os>
- </os_requirements>
- <required_sdks>
- <min_sdk>
- <tla rid="windows_driver_kit_8" />
- </min_sdk>
- </required_sdks>
- <supported_ides>
- <supported_ide>
- <tla rid="tla_visualstu2012" />
- </supported_ide>
- </supported_ides>
- <build_info>
- <authored_instructions>
- <section>
- <!-- Include any special instructions for compiling your sample -->
- <sectioncontents>
- </sectioncontents>
- </section>
- </authored_instructions>
- </build_info>
- <run_info>
- <authored_instructions>
- <section>
- <sectioncontents>
- <p>To install the sample driver, follow these steps:</p>
- <proch>
- <item>Ensure that the driver builds without errors.</item>
- <item>Copy the DLL and INF files to a separate folder.</item>
- <item>Enter the command "<inline_code devlang="cmd">devcon.exe update SimpleDeviceOrientationSensor.inf ACPI\&lt;HWID&gt;</inline_code>" to install the driver on an existing device node. You can find the devcon.exe program in the tools\devcon folder where you installed the WDK.</item>
- </proch>
- </sectioncontents>
- </section>
- <section>
- <title>File manifest</title>
- <sectioncontents>
- <p>The following source files are in the src\Sensors\SimpleDeviceOrientationSensor folder and are used to build the SimpleDeviceOrientationSensor.dll and SimpleDeviceOrientationSensor.inf files.</p>
- <table>
- <tr>
- <th>File</th>
- <th>Description</th>
- </tr>
- <tr>
- <td>
- <p>device.h, device.cpp</p>
- </td>
- <td>
- <p>Implements the driver's WDF PnP event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>client.cpp</p>
- </td>
- <td>
- <p>Implements the driver's callback functions from the class extension to simple device orientation sensors.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>driver.h, driver.cpp</p>
- </td>
- <td>
- <p>WDF driver entry event callbacks and helper methods</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>hardwaresimulator.h, hardwaresimulator.cpp</p>
- </td>
- <td>
- <p>Hardware simulator implementation</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>makefile.inc</p>
- </td>
- <td>
- <p>Defines custom build actions. Includes the conversion of the .INX file into a .INF file.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>SensorsTrace.h</p>
- </td>
- <td>
- <p>Implementation the sensor traces files.</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>SimpleDeviceOrientationSensor.ctl</p>
- </td>
- <td>
- <p>Declaration of driver's tracing GUID</p>
- </td>
- </tr>
- <tr>
- <td>
- <p>SimpleDeviceOrientationSensor.inx</p>
- </td>
- <td>
- <p>Describes the installation of the driver. The build process converts this into a .INF.</p>
- </td>
- </tr>
- </table>
- </sectioncontents>
- </section>
- </authored_instructions>
- </run_info>
- </content>
- <!-- List the component compcentral path -->
- <feature_teams>
- <feature_team_info comp_central_path="CORE-OS Core\SiGMa-Silicon, Graphics and Media\SiPlat - Silicon Platform\Sensors" dev_owner="osamasal" writer_owner="ericdoku" />
- </feature_teams>
- <workflow_control_host />
-</gallery_sample>
diff --git a/sensors/SimpleDeviceOrientationSensor/HardwareSimulator.h b/sensors/SimpleDeviceOrientationSensor/HardwareSimulator.h
index 8f96b902..7da0be14 100644
--- a/sensors/SimpleDeviceOrientationSensor/HardwareSimulator.h
+++ b/sensors/SimpleDeviceOrientationSensor/HardwareSimulator.h
@@ -14,7 +14,7 @@
#include <windows.h>
#include <wdf.h>
-#include <SensorsTrace.h>
+#include "SensorsTrace.h"
#include <SensorsCx.h>
#include <windows.devices.sensors.h>
diff --git a/sensors/SimpleDeviceOrientationSensor/SimpleDeviceOrientationSensor.inx b/sensors/SimpleDeviceOrientationSensor/SimpleDeviceOrientationSensor.inx
index 6c61d4e6..6dbbf7be 100644
--- a/sensors/SimpleDeviceOrientationSensor/SimpleDeviceOrientationSensor.inx
+++ b/sensors/SimpleDeviceOrientationSensor/SimpleDeviceOrientationSensor.inx
Binary files differ
diff --git a/sensors/SimpleDeviceOrientationSensor/readme.md b/sensors/SimpleDeviceOrientationSensor/readme.md
new file mode 100644
index 00000000..7a1e39f7
--- /dev/null
+++ b/sensors/SimpleDeviceOrientationSensor/readme.md
@@ -0,0 +1,12 @@
+<!---
+ name: Simple Device Orientation Sensor Sample
+ platform: UMDF2
+ language: cpp
+ category: Sensors
+ description: Demonstrates how to write a UMDF v2 sensor driver to output Simple Device Orientation values.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617960
+--->
+
+# Simple Device Orientation Sensor Sample
+
+The SimpleDeviceOrientationSensor sample shows how to write a UMDF v2 sensor driver to output Simple Device Orientation values. \ No newline at end of file
diff --git a/serial/VirtualSerial/README.md b/serial/VirtualSerial/README.md
index 2b1bc513..7b9c9c39 100644
--- a/serial/VirtualSerial/README.md
+++ b/serial/VirtualSerial/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Virtual serial driver sample
+ platform: UMDF1
+ language: cpp
+ category: Serial
+ description: Demonstrates a simple virtual serial driver (ComPort) and a controller-less modem driver (FakeModem).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617963
+--->
+
+
Virtual serial driver sample
============================
diff --git a/serial/VirtualSerial2/README.md b/serial/VirtualSerial2/README.md
index 3c5baf78..81405d15 100644
--- a/serial/VirtualSerial2/README.md
+++ b/serial/VirtualSerial2/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Virtual serial driver sample (UMDF version 2)
+ platform: UMDF2
+ language: cpp
+ category: Serial
+ description: Demonstrates UMDF version 2 serial drivers and includes a simple virtual serial driver (ComPort) and a controller-less modem driver (FakeModem).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617965
+--->
+
+
Virtual serial driver sample
============================
diff --git a/serial/serenum/README.md b/serial/serenum/README.md
index 7b28ae46..c4690bbf 100644
--- a/serial/serenum/README.md
+++ b/serial/serenum/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Serenum sample
+ platform: WDM
+ language: cpp
+ category: Serial
+ description: Enumerates Plug-n-Play RS-232 devices that are compliant with the current revision of Plug and Play External COM Device.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617961
+--->
+
+
Serenum sample
==============
diff --git a/serial/serial/README.md b/serial/serial/README.md
index de76bfb3..583e9cae 100644
--- a/serial/serial/README.md
+++ b/serial/serial/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Serial Port Driver
+ platform: KMDF
+ language: cpp
+ category: Serial
+ description: The Serial (16550-based RS-232) sample driver is a WDF version of the inbox Serial.sys driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617962
+--->
+
+
Serial Port Driver
==================
diff --git a/setup/devcon/README.md b/setup/devcon/README.md
index b559f0f1..60e79702 100644
--- a/setup/devcon/README.md
+++ b/setup/devcon/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Device Console (DevCon) Tool
+ platform: Tool
+ language: cpp
+ category: Setup
+ description: DevCon enables, disables, installs, configures, and removes devices on the local computer and displays detailed information about devices on local and remote computers.
+ samplefwlink: https://go.microsoft.com/fwlink/p/?linkid=856741
+--->
+
+
Device Console (DevCon) Tool
============================
diff --git a/setup/devcon/cmds.cpp b/setup/devcon/cmds.cpp
index 1af49c5c..0002b393 100644
--- a/setup/devcon/cmds.cpp
+++ b/setup/devcon/cmds.cpp
@@ -1551,6 +1551,78 @@ Return Value:
return failcode;
}
+int cmdRemoveAll(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[])
+/*++
+
+Routine Description:
+
+REMOVEALL
+remove devices
+like remove, but also remove not-present devices
+
+Arguments:
+
+BaseName - name of executable
+Machine - machine name, must be NULL
+argc/argv - remaining parameters
+
+Return Value:
+
+EXIT_xxxx
+
+--*/
+{
+ GenericContext context;
+ TCHAR strRemove[80];
+ TCHAR strReboot[80];
+ TCHAR strFail[80];
+ int failcode = EXIT_FAIL;
+
+ UNREFERENCED_PARAMETER(Flags);
+
+ if (!argc) {
+ //
+ // arguments required
+ //
+ return EXIT_USAGE;
+ }
+ if (Machine) {
+ //
+ // must be local machine as we need to involve class/co installers
+ //
+ return EXIT_USAGE;
+ }
+ if (!LoadString(NULL, IDS_REMOVED, strRemove, ARRAYSIZE(strRemove))) {
+ return EXIT_FAIL;
+ }
+ if (!LoadString(NULL, IDS_REMOVED_REBOOT, strReboot, ARRAYSIZE(strReboot))) {
+ return EXIT_FAIL;
+ }
+ if (!LoadString(NULL, IDS_REMOVE_FAILED, strFail, ARRAYSIZE(strFail))) {
+ return EXIT_FAIL;
+ }
+
+ context.reboot = FALSE;
+ context.count = 0;
+ context.strReboot = strReboot;
+ context.strSuccess = strRemove;
+ context.strFail = strFail;
+ failcode = EnumerateDevices(BaseName, Machine, 0, argc, argv, RemoveCallback, &context);
+
+ if (failcode == EXIT_OK) {
+
+ if (!context.count) {
+ FormatToStream(stdout, MSG_REMOVE_TAIL_NONE);
+ } else if (!context.reboot) {
+ FormatToStream(stdout, MSG_REMOVE_TAIL, context.count);
+ } else {
+ FormatToStream(stdout, MSG_REMOVE_TAIL_REBOOT, context.count);
+ failcode = EXIT_REBOOT;
+ }
+ }
+ return failcode;
+}
+
int cmdRescan(_In_ LPCTSTR BaseName, _In_opt_ LPCTSTR Machine, _In_ DWORD Flags, _In_ int argc, _In_reads_(argc) PTSTR argv[])
/*++
@@ -2389,6 +2461,7 @@ DispatchEntry DispatchTable[] = {
{ TEXT("listclass"), cmdListClass, MSG_LISTCLASS_SHORT, MSG_LISTCLASS_LONG },
{ TEXT("reboot"), cmdReboot, MSG_REBOOT_SHORT, MSG_REBOOT_LONG },
{ TEXT("remove"), cmdRemove, MSG_REMOVE_SHORT, MSG_REMOVE_LONG },
+ { TEXT("removeall"), cmdRemoveAll, MSG_REMOVEALL_SHORT, MSG_REMOVEALL_LONG },
{ TEXT("rescan"), cmdRescan, MSG_RESCAN_SHORT, MSG_RESCAN_LONG },
{ TEXT("resources"), cmdResources, MSG_RESOURCES_SHORT, MSG_RESOURCES_LONG },
{ TEXT("restart"), cmdRestart, MSG_RESTART_SHORT, MSG_RESTART_LONG },
diff --git a/setup/devcon/msg.mc b/setup/devcon/msg.mc
index a3c677e9..ca348bde 100644
--- a/setup/devcon/msg.mc
+++ b/setup/devcon/msg.mc
@@ -811,6 +811,27 @@ MessageId=61204 SymbolicName=MSG_REMOVE_TAIL
Language=English
%1!u! device(s) were removed.
.
+MessageId=61205 SymbolicName=MSG_REMOVEALL_LONG
+Language=English
+Devcon Removeall Command
+Removes devices with the specified hardware or instance ID, including devices
+that are not currently attached. Valid only on the local computer.
+(To reboot when necesary, Include -r .)
+%1 [-r] %2 <id> [<id>...]
+%1 [-r] %2 =<class> [<id>...]
+<class> Specifies a device setup class.
+Examples of <id>:
+ * - All devices
+ ISAPNP\PNP0501 - Hardware ID
+ *PNP* - Hardware ID with wildcards (* matches anything)
+ @ISAPNP\*\* - Instance ID with wildcards (@ prefixes instance ID)
+ '*PNP0501 - Hardware ID with apostrophe (' prefixes literal match - matches exactly as typed,
+ including the asterisk.)
+.
+MessageId=61206 SymbolicName=MSG_REMOVEALL_SHORT
+Language=English
+%1!-20s! Remove devices, including those that are not currently attached.
+.
;//
;// RESCAN
diff --git a/simbatt/README.md b/simbatt/README.md
index e52e7d40..24332b56 100644
--- a/simbatt/README.md
+++ b/simbatt/README.md
@@ -1,3 +1,13 @@
-SimBatt: Battery Battery Driver Sample
+<!---
+ name: Simulated Battery Driver Sample
+ platform: KMDF
+ language: cpp
+ category: Battery Power
+ description: Demonstrates a KMDF-based implementation of Windows battery driver interfaces.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620188
+--->
+
+
+SimBatt: Simulated Battery Driver Sample
======================================
SimBatt is simulated battery device driver, this source code is intended to demonstrate implementation of Windows battery driver interfaces. This is a KMDF based sample. You may use this sample as a starting point to implement a battery miniport specific to your needs. \ No newline at end of file
diff --git a/smartcrd/README.md b/smartcrd/README.md
index d9454735..c3b5ca74 100644
--- a/smartcrd/README.md
+++ b/smartcrd/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: PCMCIA Smart Card Driver
+ platform: KMDF
+ language: cpp
+ category: SmartCard
+ description: Demonstrates how to write a KMDF driver for the SCM Microsystems PCMCIA smart card reader.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617968
+--->
+
+
PCMCIA Smart Card Driver
========================
diff --git a/smartcrd/pscr/Pscr.vcxproj b/smartcrd/pscr/Pscr.vcxproj
index 519d508f..2bcdd80d 100644
--- a/smartcrd/pscr/Pscr.vcxproj
+++ b/smartcrd/pscr/Pscr.vcxproj
@@ -99,15 +99,15 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\smclib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
</Midl>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -115,15 +115,15 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\smclib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
</Midl>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -131,15 +131,15 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\smclib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
</Midl>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -147,15 +147,15 @@
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\smclib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
</Midl>
</ItemDefinitionGroup>
<ItemGroup>
@@ -179,4 +179,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/spb/SkeletonI2C/README.md b/spb/SkeletonI2C/README.md
index 4522af7c..2e639a9d 100644
--- a/spb/SkeletonI2C/README.md
+++ b/spb/SkeletonI2C/README.md
@@ -1,5 +1,15 @@
+<!---
+ name: Skeleton I2C Sample Driver
+ platform: KMDF
+ language: cpp
+ category: SimplePeripheralBus
+ description: Demonstrates how to design a KMDF controller driver for Windows that conforms to the simple peripheral bus (SPB) device driver interface (DDI).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617969
+--->
+
+
Skeleton I2C Sample Driver
-=========================
+==========================
The SkeletonI2C sample demonstrates how to design a KMDF controller driver for Windows that conforms to the [simple peripheral bus](http://msdn.microsoft.com/en-us/library/windows/hardware/hh450903) (SPB) device driver interface (DDI). SPB is an abstraction for low-speed serial buses (for example, I<sup>2</sup>C and SPI) that allows peripheral drivers to be developed for cross-platform use without any knowledge of the underlying bus hardware or device connections. While this sample implements an empty I<sup>2</sup>C driver, it could just as easily be the starting point for an SPI driver with only minor modifications.
diff --git a/spb/SpbTestTool/README.md b/spb/SpbTestTool/README.md
index d7c9eb2e..fbee4e70 100644
--- a/spb/SpbTestTool/README.md
+++ b/spb/SpbTestTool/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SpbTestTool sample
+ platform: KMDF
+ language: cpp
+ category: SimplePeripheralBus
+ description: Demonstrates how to open a handle to the SPB controller, use the SPB interface from a KMDF driver, and employ GPIO.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617970
+--->
+
+
SpbTestTool
===========
diff --git a/storage/class/cdrom/README.md b/storage/class/cdrom/README.md
index 187ca63b..92ddf79b 100644
--- a/storage/class/cdrom/README.md
+++ b/storage/class/cdrom/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: CDROM Storage Class Driver
+ platform: KMDF
+ language: cpp
+ category: Storage
+ description: Provide access to CD, DVD and Blu-ray drives, supports Plug and Play, Power Management, and AutoRun (media change notification).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617971
+--->
+
+
CDROM Storage Class Driver
==========================
diff --git a/storage/class/classpnp/README.md b/storage/class/classpnp/README.md
index c3a893ba..ec3c0e9b 100644
--- a/storage/class/classpnp/README.md
+++ b/storage/class/classpnp/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: ClassPnP Class Driver Library
+ platform: WDM
+ language: cpp
+ category: Storage
+ description: A library storage class driver used by disk, CDROM, and the tape class drivers.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617978
+--->
+
+
ClassPnP Storage Class Driver Library
=====================================
diff --git a/storage/class/classpnp/src/srblib.c b/storage/class/classpnp/src/srblib.c
index a888d390..64a7ca88 100644
--- a/storage/class/classpnp/src/srblib.c
+++ b/storage/class/classpnp/src/srblib.c
@@ -22,7 +22,7 @@ Revision History:
--*/
-#include <classp.h>
+#include "classp.h"
PVOID
DefaultStorageRequestBlockAllocateRoutine(
diff --git a/storage/class/disk/README.md b/storage/class/disk/README.md
index 1acd4ed5..c4032547 100644
--- a/storage/class/disk/README.md
+++ b/storage/class/disk/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Disk Class Driver
+ platform: WDM
+ language: cpp
+ category: Storage
+ description: A class driver for disk devices.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617979
+--->
+
+
Disk Class Driver
=================
diff --git a/storage/filters/addfilter/README.md b/storage/filters/addfilter/README.md
index 3981aa20..8d3084c4 100644
--- a/storage/filters/addfilter/README.md
+++ b/storage/filters/addfilter/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: AddFilter Storage Filter Tool
+ platform: Application
+ language: cpp
+ category: Storage
+ description: A command-line application that adds and removes filter drivers for a given drive or volume.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617980
+--->
+
+
AddFilter Storage Filter Tool
=============================
diff --git a/storage/iscsi/README.md b/storage/iscsi/README.md
index 8bfb6982..320e1206 100644
--- a/storage/iscsi/README.md
+++ b/storage/iscsi/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: iSCSI WMI Client
+ platform: WDM
+ language: cpp
+ category: Storage
+ description: A WMI iSCSI miniport that can be tested using the iSCSICLI.exe tool, the iSCSI Initiator Properties page, the WBEMTEST.exe tool, and customized WMI scripts.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617981
+--->
+
+
iSCSI WMI Client
================
diff --git a/storage/miniports/lsi_u3/README.md b/storage/miniports/lsi_u3/README.md
index 2e7950ea..2ca91c64 100644
--- a/storage/miniports/lsi_u3/README.md
+++ b/storage/miniports/lsi_u3/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: LSI_U3 StorPort Miniport Driver
+ platform: WDM
+ language: cpp
+ category: Storage
+ description: An adapter driver for use with Parallel SCSI Host Bus Adapters or on-motherboard solutions that use the LSI 53C1010 SCSI ASIC.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617982
+--->
+
+
LSI\_U3 StorPort Miniport Driver
================================
diff --git a/storage/miniports/lsi_u3/src/lsi_u3.inf b/storage/miniports/lsi_u3/src/lsi_u3.inf
index 1225dad4..8d631d41 100644
--- a/storage/miniports/lsi_u3/src/lsi_u3.inf
+++ b/storage/miniports/lsi_u3/src/lsi_u3.inf
Binary files differ
diff --git a/storage/miniports/storahci/README.md b/storage/miniports/storahci/README.md
index 7705ebd5..ed65a9ff 100644
--- a/storage/miniports/storahci/README.md
+++ b/storage/miniports/storahci/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: StorAHCI StorPort Miniport
+ platform: WDM
+ language: cpp
+ category: Storage
+ description: A sample Storport ACHI miniport driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617983
+--->
+
+
StorAhci StorPort Miniport Driver
=================================
diff --git a/storage/msdsm/README.md b/storage/msdsm/README.md
index d43f1b68..599dc963 100644
--- a/storage/msdsm/README.md
+++ b/storage/msdsm/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Multipath I/O (MPIO) DSM Sample
+ platform: WDM
+ language: cpp
+ category: Storage
+ description: Provides a sample for building vendor-specific device-specific modules (DSM), supports iSCSI and Fibre Channel devices.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620203
+--->
+
+
Multipath I/O (MPIO) DSM Sample
===============================
diff --git a/storage/msdsm/src/intrface.c b/storage/msdsm/src/intrface.c
index e7c1eb29..925252be 100644
--- a/storage/msdsm/src/intrface.c
+++ b/storage/msdsm/src/intrface.c
@@ -2159,13 +2159,13 @@ Return Value:
group->LBPolicySelection = DSM_DEFAULT_LB_POLICY_LUN_EXPLICIT;
}
-
+
if (!explicitlySet && !vidpidPolicySet && !overallPolicySet) {
group->LBPolicySelection = DSM_DEFAULT_LB_POLICY_ALUA_CAPABILITY;
- }
-
+ }
+
//
// If ALUA is enabled and the load balance policy is set to Round Robin,
// we need to set it to Round Robin with Subset instead.
@@ -2466,7 +2466,7 @@ Return Value:
KIRQL irql;
BOOLEAN retVal;
ULONG SpecialHandlingFlag = 0;
-
+
//
// 1. If PR and reserved by this node, register the PR keys.
// 2. Find the FOG for the passed in PathId
@@ -2714,7 +2714,7 @@ Return Value:
PDSM_FOG_DEVICELIST_ENTRY fogDeviceListEntry = NULL;
PDSM_GROUP_ENTRY group = deviceInfo->Group;
ULONG SpecialHandlingFlag = 0;
-
+
TracePrint((TRACE_LEVEL_VERBOSE,
TRACE_FLAG_PNP,
"DsmPathVerify (DevInfo %p): Entering function.\n",
@@ -2722,22 +2722,6 @@ Return Value:
if (DsmpIsDeviceInitialized(deviceInfo)) {
- if (deviceInfo->Unresponsive) {
- //
- // Since the device is marked unresponsive, there
- // is no point in sending RTPG or TUR down
- // as that will fail by port driver.
- // but that doesn't necessarily mean that the path doesn't exist.
- // Return SUCCESS here so that MPIO doesn't remove
- // disk in case of failover etc.
- // If really this path is gone, this should get deleted
- // as part of pnp removal and then if no other paths are left
- // disk will be removed
- //
- status = STATUS_SUCCESS;
- return status;
- }
-
irql = ExAcquireSpinLockExclusive(&(dsmCtxt->DsmContextLock));
//
@@ -2974,11 +2958,11 @@ Return Value:
// Initialize all the entries to indicate that they haven't been processed.
//
for (entry = failGroup->ZombieGroupList.Flink; entry != &(failGroup->ZombieGroupList); entry = entry->Flink) {
-
+
group = CONTAINING_RECORD(entry, DSM_ZOMBIEGROUP_ENTRY, ListEntry);
group->Processed = FALSE;
}
-
+
//
// Since we need to drop the spin lock while processing an entry, it is possible
// that a removal in parallel frees up this entry during that time, thus making it
@@ -2988,7 +2972,7 @@ Return Value:
// of the list, skipping over the already processed ones.
//
entry = failGroup->ZombieGroupList.Flink;
-
+
while (entry != &(failGroup->ZombieGroupList)) {
group = CONTAINING_RECORD(entry, DSM_ZOMBIEGROUP_ENTRY, ListEntry);
@@ -3165,7 +3149,7 @@ Return Value:
BOOLEAN adminRequest = FALSE;
PDSM_GROUP_ENTRY group = NULL;
ULONG SpecialHandlingFlag = 0;
-
+
TracePrint((TRACE_LEVEL_VERBOSE,
TRACE_FLAG_WMI,
"DsmMoveDevice (DsmIds %p): Entering function - DsmContext %p MPIOPath (%p) SuggestedPath %p.\n",
@@ -3613,7 +3597,7 @@ Return Value:
cdb = SrbGetCdb(Srb);
if (cdb) {
opCode = cdb->AsByte[0];
-
+
}
}
@@ -3739,7 +3723,7 @@ Return Value:
// 2. If the old path was supposed to be removed, check if there are
// no more requests are outstanding, and if yes, remove the path
//
-
+
irpStack = IoGetCurrentIrpStackLocation(irp);
oldPath = irpStack->Parameters.Others.Argument3;
@@ -3788,7 +3772,7 @@ Return Value:
}
} else {
-
+
*Status = STATUS_NO_SUCH_DEVICE;
@@ -3796,7 +3780,7 @@ Return Value:
TRACE_FLAG_RW,
"DsmLBGetPath (DsmIds %p): Failed to get FO group in LBGetPath.\n",
DsmList));
-
+
}
@@ -4101,16 +4085,16 @@ Return Value:
__Exit_DsmSrbDeviceControl:
if (status != STATUS_PENDING) {
-
+
//
// Set-up the Irp status for mpio's completion of the request.
// If it was IRP_MJ_SCSI, one of the helper routines set Srb->SrbStatus
// already.
//
if ((irpStack->MajorFunction == IRP_MJ_SCSI) &&
- (Srb != NULL) &&
+ (Srb != NULL) &&
(Srb->SrbStatus == SRB_STATUS_PENDING)) {
-
+
Srb->SrbStatus = SRB_STATUS_ERROR;
}
@@ -4694,7 +4678,7 @@ Return Value:
handled = TRUE;
break;
- }
+ }
}
}
}
@@ -4884,7 +4868,7 @@ Return Value:
break;
}
-
+
default: {
if ((scsiStatus == SCSISTAT_CHECK_CONDITION) &&
@@ -4998,7 +4982,7 @@ Return Value:
if (failover) {
ULONG SpecialHandlingFlag = 0;
-
+
//
// If ALUA is supported, then it is possible that we may need to send
// down an STPG so build an IRP and fill in the SRB for STPG and send it down.
@@ -5072,7 +5056,7 @@ Return Value:
deviceInfo->Group->PathToBeUsed));
}
}
- }
+ }
*Retry = retry;
diff --git a/storage/ramdisk/README.md b/storage/ramdisk/README.md
index 66e97691..83e0bae1 100644
--- a/storage/ramdisk/README.md
+++ b/storage/ramdisk/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: RAMDisk Storage Driver Sample
+ platform: KMDF
+ language: cpp
+ category: Storage
+ description: Demonstrates how to write a RAM disk software-only function driver using KMDF.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617988
+--->
+
+
RAMDisk Storage Driver Sample
=============================
diff --git a/storage/sfloppy/README.md b/storage/sfloppy/README.md
index be7bd211..a48c6230 100644
--- a/storage/sfloppy/README.md
+++ b/storage/sfloppy/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Super Floppy (sfloppy) Storage Class Driver
+ platform: WDM
+ language: cpp
+ category: Storage
+ description: A smaple class driver for Super Floppy disk drives.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617989
+--->
+
+
Super Floppy (sfloppy) Storage Class Driver
===========================================
diff --git a/storage/tools/spti/README.md b/storage/tools/spti/README.md
index 0d9ad39a..10037d01 100644
--- a/storage/tools/spti/README.md
+++ b/storage/tools/spti/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SCSI Pass-Through Interface Tool
+ platform: Application
+ language: cpp
+ category: Storage
+ description: Demonstrates how to communicate with a SCSI device using pass-through IOCTLs in an application using DeviceIoControl API.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617990
+--->
+
+
SCSI Pass-Through Interface Tool
================================
diff --git a/thermal/simsensor/README.md b/thermal/simsensor/README.md
index 668c5b56..a2537ce5 100644
--- a/thermal/simsensor/README.md
+++ b/thermal/simsensor/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SimSensor - Simulated Temperature Sensor Sample Driver
+ platform: KMDF
+ language: cpp
+ category: Thermal Power
+ description: Demonstrates a simulated temperature sensor device.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617991
+--->
+
+
SimSensor: Simulated Temperature Sensor Sample Driver
=====================================================
diff --git a/thermal/thermalclient/README.md b/thermal/thermalclient/README.md
index 47f8a2f6..e5812871 100644
--- a/thermal/thermalclient/README.md
+++ b/thermal/thermalclient/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SimThermalClient - Simulated Thermal Client Sample Driver
+ platform: KMDF
+ language: cpp
+ category: Thermal Power
+ description: Simulates a device that is a Windows thermal management client.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617992
+--->
+
+
SimThermalClient: Simulated Thermal Client Sample Driver
========================================================
diff --git a/tools/sdv/samples/DV-FailDriver-WDM/README.md b/tools/sdv/samples/DV-FailDriver-WDM/README.md
index aade7dd9..9851ff31 100644
--- a/tools/sdv/samples/DV-FailDriver-WDM/README.md
+++ b/tools/sdv/samples/DV-FailDriver-WDM/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: DV-FailDriver-WDM
+ platform: WDM
+ language: cpp
+ category: DriverVerifier Tools
+ description: Demonstrates how Driver Verifier (DV) can find errors in a WDM driver.
+ samplefwlink: https://go.microsoft.com/fwlink/p/?linkid=856743
+--->
+
+
DV-FailDriver-WDM
=================
diff --git a/tools/sdv/samples/SDV-FailDriver-KMDF/README.md b/tools/sdv/samples/SDV-FailDriver-KMDF/README.md
index ce2b381c..6d4d71cd 100644
--- a/tools/sdv/samples/SDV-FailDriver-KMDF/README.md
+++ b/tools/sdv/samples/SDV-FailDriver-KMDF/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SDV-FailDriver-KMDF
+ platform: KMDF
+ language: cpp
+ category: StaticDriverVerifier Tools
+ description: Demonstrates how Static Driver Verifier (SDV) can find errors in a KMDF driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617993
+--->
+
+
SDV-FailDriver-KMDF
===================
diff --git a/tools/sdv/samples/SDV-FailDriver-NDIS/README.md b/tools/sdv/samples/SDV-FailDriver-NDIS/README.md
index 5903ad29..eaf5dc56 100644
--- a/tools/sdv/samples/SDV-FailDriver-NDIS/README.md
+++ b/tools/sdv/samples/SDV-FailDriver-NDIS/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SDV-FailDriver-NDIS
+ platform: WDM
+ language: cpp
+ category: StaticDriverVerifier Network
+ description: Demonstrates how Static Driver Verifier (SDV) can find errors in a NDIS driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617995
+--->
+
+
SDV-FailDriver-NDIS
===================
diff --git a/tools/sdv/samples/SDV-FailDriver-STORPORT/README.md b/tools/sdv/samples/SDV-FailDriver-STORPORT/README.md
index 8611e51d..600b0023 100644
--- a/tools/sdv/samples/SDV-FailDriver-STORPORT/README.md
+++ b/tools/sdv/samples/SDV-FailDriver-STORPORT/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SDV-FailDriver-STORPORT
+ platform: KMDF
+ language: cpp
+ category: StaticDriverVerifier
+ description: Demonstrates how Static Driver Verifier (SDV) can find errors in a Storport driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617997
+--->
+
+
SDV-FailDriver-STORPORT
=======================
diff --git a/tools/sdv/samples/SDV-FailDriver-WDM/README.md b/tools/sdv/samples/SDV-FailDriver-WDM/README.md
index 49a69753..a32fbcf5 100644
--- a/tools/sdv/samples/SDV-FailDriver-WDM/README.md
+++ b/tools/sdv/samples/SDV-FailDriver-WDM/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: SDV-FailDriver-WDM
+ platform: WDM
+ language: cpp
+ category: StaticDriverVerifier
+ description: Demonstrates how Static Driver Verifier (SDV) can find errors in a WDM driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617999
+--->
+
+
SDV-FailDriver-WDM
==================
diff --git a/usb/UcmCxUcsi/README.md b/usb/UcmCxUcsi/README.md
index dc6b865d..3ebd5d5d 100644
--- a/usb/UcmCxUcsi/README.md
+++ b/usb/UcmCxUcsi/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: UcmTcpciCx Port Controller Client Driver
+ platform: KMDF
+ language: cpp
+ category: USB
+ description: Demonstrates how to create a Windows USB Type-C port controller driver using the USB Connector Manager class extension driver (UcmCx).
+ samplefwlink: https://go.microsoft.com/fwlink/p/?linkid=856744
+--->
+
+
# UcmTcpciCx Port Controller Client Driver
This is a sample driver that shows how to create a Windows USB Type-C port controller driver using the USB Connector Manager class extension driver (UcmCx). The sample is a driver for an embedded controller which is complient with the [USB Type-C Connector System Software Interface (UCSI)](http://www.intel.com/content/www/us/en/io/universal-serial-bus/usb-type-c-ucsi-spec.html).
diff --git a/usb/UcmCxUcsi/UcmCxUcsi.vcxproj b/usb/UcmCxUcsi/UcmCxUcsi.vcxproj
index 6a028bd4..6b1efbb1 100644
--- a/usb/UcmCxUcsi/UcmCxUcsi.vcxproj
+++ b/usb/UcmCxUcsi/UcmCxUcsi.vcxproj
@@ -90,6 +90,7 @@
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);.</AdditionalIncludeDirectories>
<WppEnabled>true</WppEnabled>
<WppRecorderEnabled>true</WppRecorderEnabled>
<WppScanConfigurationData>trace.h</WppScanConfigurationData>
@@ -128,4 +129,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/usb/UcmTcpciCxClientSample/README.md b/usb/UcmTcpciCxClientSample/README.md
index d3fd73ec..02d043bf 100644
--- a/usb/UcmTcpciCxClientSample/README.md
+++ b/usb/UcmTcpciCxClientSample/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: UcmTcpciCx Port Controller Client Driver
+ platform: KMDF
+ language: cpp
+ category: USB
+ description: Demonstrates how to create a Windows USB Type-C port controller driver using the USB Connector Manager Type-C Port Controller Interface class extension driver (UcmTcpciCx).
+ samplefwlink: https://go.microsoft.com/fwlink/p/?linkid=856745
+--->
+
+
# UcmTcpciCx Port Controller Client Driver
This is a skeleton sample driver that shows how to create a Windows USB Type-C port controller driver using the USB Connector Manager Type-C Port Controller Interface class extension driver (UcmTcpciCx). UcmTcpciCx is currently only availble using the Windows Insider program - documentation for UcmTcpciCx will be available at the next release of Windows.
diff --git a/usb/kmdf_enumswitches/README.md b/usb/kmdf_enumswitches/README.md
index d6a7ee9f..dda67616 100644
--- a/usb/kmdf_enumswitches/README.md
+++ b/usb/kmdf_enumswitches/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Sample KMDF Bus Driver for OSR USB-FX2
+ platform: KMDF
+ language: cpp
+ category: USB
+ description: Demonstrates how to use KMDF as a bus driver using the OSR USB-FX2 device.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618000
+--->
+
+
Sample KMDF Bus Driver for OSR USB-FX2
======================================
diff --git a/usb/kmdf_enumswitches/sys/kmdf_enumswitches.vcxproj b/usb/kmdf_enumswitches/sys/kmdf_enumswitches.vcxproj
index e771d816..39422319 100644
--- a/usb/kmdf_enumswitches/sys/kmdf_enumswitches.vcxproj
+++ b/usb/kmdf_enumswitches/sys/kmdf_enumswitches.vcxproj
@@ -99,18 +99,18 @@
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntstrsafe.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
</ItemDefinitionGroup>
@@ -118,18 +118,18 @@
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntstrsafe.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
</ItemDefinitionGroup>
@@ -137,18 +137,18 @@
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntstrsafe.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
</ItemDefinitionGroup>
@@ -156,18 +156,18 @@
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\ntstrsafe.lib;$(DDK_LIB_PATH)\wdmsec.lib</AdditionalDependencies>
</Link>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
</ItemDefinitionGroup>
@@ -220,4 +220,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/usb/kmdf_fx2/README.md b/usb/kmdf_fx2/README.md
index 0bf65d1d..68666660 100644
--- a/usb/kmdf_fx2/README.md
+++ b/usb/kmdf_fx2/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Sample KMDF Function Driver for OSR USB-FX2
+ platform: KMDF
+ language: cpp
+ category: USB
+ description: Demonstrates how to use KMDF to perform bulk and interrupt data transfers to a USB device.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620313
+--->
+
+
Sample KMDF Function Driver for OSR USB-FX2
===========================================
diff --git a/usb/kmdf_fx2/driver/osrusbfx2.vcxproj b/usb/kmdf_fx2/driver/osrusbfx2.vcxproj
index 08cde31a..2bcf6616 100644
--- a/usb/kmdf_fx2/driver/osrusbfx2.vcxproj
+++ b/usb/kmdf_fx2/driver/osrusbfx2.vcxproj
@@ -115,17 +115,17 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
<Link>
@@ -134,17 +134,17 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
<Link>
@@ -153,17 +153,17 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
<Link>
@@ -172,17 +172,17 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
<Link>
@@ -241,4 +241,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/usb/ufxclientsample/README.md b/usb/ufxclientsample/README.md
index ec39fd35..54a2f69f 100644
--- a/usb/ufxclientsample/README.md
+++ b/usb/ufxclientsample/README.md
@@ -1,4 +1,14 @@
-USB Function Client Driver
+<!---
+ name: USB Function Client Driver
+ platform: KMDF
+ language: cpp
+ category: USB
+ description: Demonstrates how to create a Windows USB function controller driver using the USB function class extension driver (UFX).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620315
+--->
+
+
+USB Function Client Driver
==========================
This is a skeleton sample driver that shows how to create a Windows USB function controller driver using the USB function class extension driver (UFX).
diff --git a/usb/umdf2_fx2/README.md b/usb/umdf2_fx2/README.md
index 0d98a5ce..bc2cfba5 100644
--- a/usb/umdf2_fx2/README.md
+++ b/usb/umdf2_fx2/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: Sample Function Driver for OSR USB-FX2 (UMDF Version 2)
+ platform: UMDF2
+ language: cpp
+ category: USB
+ description: Demomstreates a UMDF version 2 driver for the OSR USB-FX2 device.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618003
+--->
+
Sample Function Driver for OSR USB-FX2 (UMDF Version 2)
=======================================================
@@ -55,7 +64,7 @@ Build the sample using MSBuild
As an alternative to building the driver sample in Visual Studio, you can build it in a Visual Studio Command Prompt window. In Visual Studio, on the **Tools** menu, choose **Visual Studio Command Prompt**. In the Visual Studio Command Prompt window, navigate to the folder that has the solution file, umdf2echo.sln. Use the MSBuild command to build the solution. Here is an example:
-**msbuild /p:configuration=�Win8 Release� /p:platform=�Win32� umdf2\_fx2.sln**
+**msbuild /p:configuration=�Win8 Release� /p:platform=�Win32� umdf2\_fx2.sln**
For more information about using MSBuild to build a driver package, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644).
diff --git a/usb/umdf2_fx2/driver/osrusbfx2um.vcxproj b/usb/umdf2_fx2/driver/osrusbfx2um.vcxproj
index 72e39bc1..a4209763 100644
--- a/usb/umdf2_fx2/driver/osrusbfx2um.vcxproj
+++ b/usb/umdf2_fx2/driver/osrusbfx2um.vcxproj
@@ -114,17 +114,17 @@
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
</ResourceCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
</Midl>
<Link>
@@ -135,17 +135,17 @@
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
</ResourceCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
</Midl>
<Link>
@@ -156,17 +156,17 @@
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
</ResourceCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
</Midl>
<Link>
@@ -177,17 +177,17 @@
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
</ClCompile>
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
</ResourceCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING;UNICODE;_UNICODE</PreprocessorDefinitions>
</Midl>
<Link>
@@ -207,4 +207,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/usb/umdf_filter_kmdf/README.md b/usb/umdf_filter_kmdf/README.md
index ecc62acd..5eaf3347 100644
--- a/usb/umdf_filter_kmdf/README.md
+++ b/usb/umdf_filter_kmdf/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Sample UMDF Filter above KMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
+ platform: KMDF
+ language: cpp
+ category: USB
+ description: Demonstrates how to load a UMDF filter driver as an upper filter driver above the kmdf_fx2 sample driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620316
+--->
+
+
Sample UMDF Filter above KMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
==============================================================================
diff --git a/usb/umdf_filter_kmdf/kmdf_driver/osrusbfx2.vcxproj b/usb/umdf_filter_kmdf/kmdf_driver/osrusbfx2.vcxproj
index 2db1f7c1..3974f664 100644
--- a/usb/umdf_filter_kmdf/kmdf_driver/osrusbfx2.vcxproj
+++ b/usb/umdf_filter_kmdf/kmdf_driver/osrusbfx2.vcxproj
@@ -115,17 +115,17 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
<Link>
@@ -134,17 +134,17 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
<Link>
@@ -153,17 +153,17 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
<Link>
@@ -172,17 +172,17 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ResourceCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<TreatWarningAsError>true</TreatWarningAsError>
<WarningLevel>Level4</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</ClCompile>
<Midl>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);EVENT_TRACING</PreprocessorDefinitions>
</Midl>
<Link>
@@ -241,4 +241,4 @@
<ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/usb/umdf_filter_umdf/README.md b/usb/umdf_filter_umdf/README.md
index b0c7970f..f4d3dc26 100644
--- a/usb/umdf_filter_umdf/README.md
+++ b/usb/umdf_filter_umdf/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Sample UMDF Filter above UMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
+ platform: UMDF1
+ language: cpp
+ category: USB
+ description: Demonstrates how to load a UMDF filter driver as an upper filter driver above the umdf_fx2 sample driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618001
+--->
+
+
Sample UMDF Filter above UMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
==============================================================================
diff --git a/usb/umdf_fx2/README.md b/usb/umdf_fx2/README.md
index 2f7f1ded..4b707cbe 100644
--- a/usb/umdf_fx2/README.md
+++ b/usb/umdf_fx2/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Sample UMDF Function Driver for OSR USB-FX2 (UMDF version 1)
+ platform: UMDF1
+ language: cpp
+ category: USB
+ description: A UMDF driver for the OSR USB-FX2 device that includes a test application, sample device metadata, and supports impersonation and idle power down.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618002
+--->
+
+
Sample UMDF Function Driver for OSR USB-FX2 (UMDF Version 1)
============================================================
diff --git a/usb/usbsamp/README.md b/usb/usbsamp/README.md
index 8d9d4d9d..30f46c17 100644
--- a/usb/usbsamp/README.md
+++ b/usb/usbsamp/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: Usbsamp Generic USB Driver
+ platform: KMDF
+ language: cpp
+ category: USB
+ description: Demonstrates how to perform full speed, high speed, and SuperSpeed transfers to and from bulk and isochronous endpoints of a generic USB device.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618938
+--->
+
+
Usbsamp Generic USB Driver
==========================
diff --git a/usb/usbview/README.md b/usb/usbview/README.md
index cd117f82..fe1bbbb1 100644
--- a/usb/usbview/README.md
+++ b/usb/usbview/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: USBView sample application
+ platform: WDM
+ language: cpp
+ category: USB
+ description: Provides an application that allows you to browse all USB controllers and connected USB devices on your system.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618004
+--->
+
+
USBView sample application
==========================
diff --git a/usb/wdf_osrfx2_lab/README.md b/usb/wdf_osrfx2_lab/README.md
index 6940418f..14cb90e8 100644
--- a/usb/wdf_osrfx2_lab/README.md
+++ b/usb/wdf_osrfx2_lab/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WDF Sample Driver Learning Lab for OSR USB-FX2
+ platform: UMDF1 KMDF
+ language: cpp
+ category: USB
+ description: Contains a console test application and a series of iterative drivers for both KMDF and UMDF version 1.
+ samplefwlink: https://go.microsoft.com/fwlink/?linkid=856746
+--->
+
+
WDF Sample Driver Learning Lab for OSR USB-FX2
==============================================
diff --git a/video/KMDOD/README.md b/video/KMDOD/README.md
index 5e005256..6c724af7 100644
--- a/video/KMDOD/README.md
+++ b/video/KMDOD/README.md
@@ -1,3 +1,12 @@
+<!---
+ name: Kernel mode display-only miniport driver (KMDOD) sample
+ platform: WDM
+ language: cpp
+ category: Video
+ description: Implements most DDIs that a display-only miniport driver should provide to the Windows Display Driver Model (WDDM).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620317
+--->
+
Kernel mode display-only miniport driver (KMDOD) sample
=======================================================
diff --git a/video/pixlib/README.md b/video/pixlib/README.md
index b7667909..81258ab7 100644
--- a/video/pixlib/README.md
+++ b/video/pixlib/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: PixLib sample
+ platform: LIB
+ language: cpp
+ category: Video
+ description: Demonstrates how to implement the CPixel class for use by a display driver.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618005
+--->
+
+
PixLib sample
=============
diff --git a/wia/README.md b/wia/README.md
index 9d74b0d5..75df38c3 100644
--- a/wia/README.md
+++ b/wia/README.md
@@ -1,4 +1,14 @@
-Windows Image Acquisition (WIA) Driver Samples
+<!---
+ name: Windows Image Acquisition (WIA) Driver Samples
+ platform: WDM
+ language: cpp
+ category: Image Scan
+ description: Contains samples and test tools for Windows Image Acquisition (WIA), a driver architecture and user interface for acquiring images from still image devices such as scanners.
+ samplefwlink: https://go.microsoft.com/fwlink/p/?linkid=856747
+--->
+
+
+Windows Image Acquisition (WIA) Driver Samples
==============================================
The Windows Image Acquisition driver sample set contains samples and test tools for Windows Image Acquisition (WIA), a driver architecture and user interface for acquiring images from still image devices such as scanners.
diff --git a/wmi/wmiacpi/README.md b/wmi/wmiacpi/README.md
index b2057e16..75b3ef9e 100644
--- a/wmi/wmiacpi/README.md
+++ b/wmi/wmiacpi/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WMIACPI Sample
+ platform: WDM
+ language: cpp
+ category: WMI ACPI
+ description: Contains ACPI BIOS and WMI sample code that enables instrumentation of the ACPI BIOS from within ACPI Source Language (ASL) code.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618006
+--->
+
+
WMI ACPI Sample
===============
diff --git a/wmi/wmisamp/README.md b/wmi/wmisamp/README.md
index b32c2b04..63f41048 100644
--- a/wmi/wmisamp/README.md
+++ b/wmi/wmisamp/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WmiSamp WMI Provider
+ platform: KMDF
+ language: cpp
+ category: WMI
+ description: Demonstrates how to register WMI providers in KMDF, create provider instances, and handle WMI queries sent to a device.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618007
+--->
+
+
Sample KMDF Driver Implementing a WMI Data Provider
===================================================
diff --git a/wpd/WpdBasicHardwareDriver/README.md b/wpd/WpdBasicHardwareDriver/README.md
index 523d6022..cf1b6dc7 100644
--- a/wpd/WpdBasicHardwareDriver/README.md
+++ b/wpd/WpdBasicHardwareDriver/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WPD Basic Hardware Sample Driver
+ platform: UMDF1
+ language: cpp
+ category: WDP
+ description: Supports nine sensor devices that integrate with the Parallax BS2 programmable microcontroller.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620318
+--->
+
+
WPD Basic Hardware Sample Driver (UMDF Version 1)
=================================================
diff --git a/wpd/WpdHelloWorldDriver/README.md b/wpd/WpdHelloWorldDriver/README.md
index 0bf883bd..e63159e3 100644
--- a/wpd/WpdHelloWorldDriver/README.md
+++ b/wpd/WpdHelloWorldDriver/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WPD Hello World Sample
+ platform: UMDF1
+ language: cpp
+ category: WPD
+ description: Supports four objects: a device object, a storage object, a folder object, and a file object.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618008
+--->
+
+
WPDHelloWorld sample driver for portable devices
================================================
diff --git a/wpd/WpdHelloWorldDriver/WpdHelloWorldDriver.inx b/wpd/WpdHelloWorldDriver/WpdHelloWorldDriver.inx
index 40d31f8c..f79d7810 100644
--- a/wpd/WpdHelloWorldDriver/WpdHelloWorldDriver.inx
+++ b/wpd/WpdHelloWorldDriver/WpdHelloWorldDriver.inx
@@ -68,6 +68,7 @@ ServiceBinary=%12%\WUDFRd.sys
[DestinationDirs]
System32Copy=12,UMDF ; copy to system32\drivers\umdf
+CoInstallers_CopyFiles= 11
[System32Copy]
WpdHelloWorldDriver.dll
diff --git a/wpd/WpdMultiTransportDriver/README.md b/wpd/WpdMultiTransportDriver/README.md
index 4e277f0a..81e6bf30 100644
--- a/wpd/WpdMultiTransportDriver/README.md
+++ b/wpd/WpdMultiTransportDriver/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WPD multi-transport sample driver
+ platform: UMDF1
+ language: cpp
+ category: WPD
+ description: Demonstrates how to extend the WpdHelloWorldDriver for a device that supports multiple transports.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618009
+--->
+
+
WPD multi-transport sample driver
=================================
diff --git a/wpd/WpdMultiTransportDriver/WpdMultiTransportDriver.inx b/wpd/WpdMultiTransportDriver/WpdMultiTransportDriver.inx
index d293c9f7..5e20c4c3 100644
--- a/wpd/WpdMultiTransportDriver/WpdMultiTransportDriver.inx
+++ b/wpd/WpdMultiTransportDriver/WpdMultiTransportDriver.inx
@@ -69,6 +69,7 @@ ServiceBinary=%12%\WUDFRd.sys
[DestinationDirs]
System32Copy=12,UMDF ; copy to system32\drivers\umdf
+CoInstallers_CopyFiles= 11
[System32Copy]
WpdMultiTransportDriver.dll
diff --git a/wpd/WpdServiceSampleDriver/README.md b/wpd/WpdServiceSampleDriver/README.md
index 4e277f0a..d946d59d 100644
--- a/wpd/WpdServiceSampleDriver/README.md
+++ b/wpd/WpdServiceSampleDriver/README.md
@@ -1,11 +1,17 @@
-WPD multi-transport sample driver
-=================================
+<!---
+ name: WPD service sample driver
+ platform: UMDF1
+ language: cpp
+ category: WPD
+ description: Demonstrates how to extend the WpdHelloWorldDriver sample so that it supports a simulated device with a Contacts device service.
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618010
+--->
-The WpdMultiTransportDriver sample demonstrates how you could extend the WpdHelloWorldDriver for a device that supports multiple transports. A transport is a protocol over which a portable device communicates with a computer. Example transports include Internet Protocol (IP), Bluetooth, and USB.
-A number of portable devices now support multiple transports. For example, a number of cell phones support both Bluetooth and USB. Windows supports a multitransport driver model that ensures that only one node appears for each device.
+WPD service sample driver
+=================================
-For a complete description of this sample and its underlying code and functionality, refer to the [WPD MultiTransport Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff597709) description in the Windows Driver Kit documentation.
+Demonstrates how to extend the WpdHelloWorldDriver sample so that it supports a simulated device with a Contacts device service.
Related topics
--------------
diff --git a/wpd/WpdServiceSampleDriver/WpdServiceSampleDriver.inx b/wpd/WpdServiceSampleDriver/WpdServiceSampleDriver.inx
index 935a61cd..0f4365cc 100644
--- a/wpd/WpdServiceSampleDriver/WpdServiceSampleDriver.inx
+++ b/wpd/WpdServiceSampleDriver/WpdServiceSampleDriver.inx
@@ -65,6 +65,7 @@ ServiceBinary=%12%\WUDFRd.sys
[DestinationDirs]
System32Copy=12,UMDF ; copy to system32\drivers\umdf
+CoInstallers_CopyFiles= 11
[System32Copy]
WpdServiceSampleDriver.dll
diff --git a/wpd/WpdWudfSampleDriver/README.md b/wpd/WpdWudfSampleDriver/README.md
index 3d2f449b..f325d5da 100644
--- a/wpd/WpdWudfSampleDriver/README.md
+++ b/wpd/WpdWudfSampleDriver/README.md
@@ -1,3 +1,13 @@
+<!---
+ name: WPD WUDF sample driver
+ platform: UMDF1
+ language: cpp
+ category: WPD
+ description: Demonstrates virtually all aspects of the WPD device driver interface (DDI).
+ samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=618011
+--->
+
+
WPD WUDF sample driver
======================
diff --git a/wpd/WpdWudfSampleDriver/WpdWudfSampleDriver.inx b/wpd/WpdWudfSampleDriver/WpdWudfSampleDriver.inx
index c66eb485..a2e11b1b 100644
--- a/wpd/WpdWudfSampleDriver/WpdWudfSampleDriver.inx
+++ b/wpd/WpdWudfSampleDriver/WpdWudfSampleDriver.inx
Binary files differ