GithubHelp home page GithubHelp logo

microsoft / windows-driver-samples Goto Github PK

View Code? Open in Web Editor NEW
6.6K 570.0 4.9K 161.05 MB

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.

License: Microsoft Public License

C++ 34.10% C 64.06% Makefile 0.02% PowerShell 0.06% C# 0.29% JavaScript 0.37% Batchfile 0.04% HTML 0.83% Roff 0.10% PostScript 0.01% Rich Text Format 0.01% NASL 0.01% ASL 0.11% Visual Basic 6.0 0.01%

windows-driver-samples's Introduction

Driver samples for Windows 11

These are the official Microsoft Windows Driver Kit (WDK) driver code samples for Windows 11. 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 2022 and Windows Driver Kit (WDK) 11.

Windows Driver Kit documentation

Windows 11 driver development

Use Visual Studio 2022 and Windows Driver Kit (WDK) 11 to build, test, and deploy your drivers. With Windows 11, the driver development environment is integrated into Visual Studio. To get started, download the driver development kits and tools for Windows 11.

Download the WDK, WinDbg, and associated tools

Windows Driver Kit (WDK)

Take a look at the compilation of the new and changed driver-related content for Windows 11. Areas of improvement include camera, print, display, Near Field Communication (NFC), WLAN, Bluetooth, and more.

Find out what's new in the WDK

Universal Windows drivers

Write one driver that runs on Windows 11 for desktop editions, as well as other Windows editions that share a common set of interfaces.

Getting Started with Universal Windows drivers

Windows Driver Frameworks

The Windows Driver Frameworks (WDF) are a set of libraries that make it simple to write high-quality device drivers.

WDF driver development guide

Samples

Use the samples in this repo to guide your Windows driver development. Whether you're just getting started or porting an older driver to the newest version of Windows, code samples are valuable guides on how to write drivers.

For information about important changes that need to be made to the WDK sample drivers before releasing device drivers based on the sample code, see the following topic:

From Sample Code to Production Driver - What to Change in the Samples

Build your first driver

If you're writing your first driver, use these exercises to get started. Each exercise is independent of the others, so you can do them in any order.

Write a UMDF driver based on a template

Write a KMDF Hello World driver

Write a KMDF driver based on a template

Use GitHub Actions to build a simple driver project

Microsoft Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

windows-driver-samples's People

Contributors

adamoboe avatar barrygolden avatar benpyeh avatar darugeri avatar dharper89936 avatar dipannita-shaw avatar girishpattabiraman avatar irinvoso avatar jakobl-msft avatar jgeurten avatar joelcorley avatar kfroe avatar lauragonzalezzz avatar lukangel avatar mamont-microsoft avatar michellebergeron avatar nabilfates avatar nated-msft avatar neoadonis avatar pfroese avatar radutta99 avatar saredd avatar supernova-eng avatar thpthp1 avatar tobafo19 avatar wm1 avatar xiaoyinl avatar yinghany avatar zeusk avatar zlockard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windows-driver-samples's Issues

sysvad.cat and sysvad.inf can not be found after I sucessfully built sysavd project

I follow the build steps in Readme.md, but can't find sysvad.inf file after build successfully,Only the following files can be found in Debug folder:

2015/10/05 08:49 615,936 KeywordDetectorContosoAdapter.dll
2015/10/05 09:09 240,008 PhoneAudioSample.sys
2015/10/05 08:51 239,616 PropPageExt.dll
2015/10/05 08:51 167,424 SwapAPO.dll
2015/10/05 09:09 214,264 TabletAudioSample.sys

I don't know how to install this audio driver sample in my target computer. Do I miss some settings in my building process, or the Readme document has not been updated? Please help.

regfltr test sys some function not take effect

I want to reappear the 0x135 bluescreen,so i call the test function “BugCheckSample” (version.c) in DeviceControl function,but it didn't take effect , ZwOpenKey return 0xc000003B but not bluescreen.
My platform is win7 x64 and filter callback version is 1.1

Minifilter driver is NOT a universal driver

1>ApiValidation : warning : API FilterVolumeFindNext in fltlib.dll is not a supported universal API. minispy.exe calls this API.
1>ApiValidation : warning : API FilterVolumeInstanceFindClose in fltlib.dll is not a supported universal API. minispy.exe calls this API.
1>ApiValidation : warning : API FilterVolumeInstanceFindFirst in fltlib.dll is not a supported universal API. minispy.exe calls this API.
1>ApiValidation : warning : API FilterVolumeInstanceFindNext in fltlib.dll is not a supported universal API. minispy.exe calls this API.
1>  ApiValidation: Driver located at C:\Users\dcg\Desktop\minispy\filter\Output is NOT a Universal Driver
``

There are lots of these, even for `CloseHandle` and other basic functions. The end conclusion is that this is not a universal driver, and build fails.

How to program to update driver software from hidscanner.dll to hidclass.sys for HID Barcode Scanner(usage page is 0x008C) on Windows 10

Hi there,

the hidscanner.dll is loaded automatically for HID Barcode Scanner(usage page is 0x008C) on Windows 10, but our application needs to use hid.lib so hidclass.sys should be used as default.

Since it is uncomfortable for customer to update the driver software manually, so is it possible to force Windows 10 to load hidclass.sys by any configuration of the system, or is it possible and how to program to update driver software?

building sysvad for dragon board

Has anyone built sysvad for a windows IOT yet? Following the instruction in https://msdn.microsoft.com/en-us/windows/hardware/drivers/develop/getting-started-with-universal-drivers

I am seeing a bunch of missing functions from from API validation.

1>ApiValidation : warning : API CreatePropertySheetPageW in comctl32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API DestroyPropertySheetPage in comctl32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API CheckDlgButton in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API CreateDialogParamW in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API CreateWindowExW in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API DestroyWindow in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API EnableWindow in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API GetClientRect in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API GetDlgCtrlID in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API GetDlgItem in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API GetParent in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API GetWindowLongW in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API IsDlgButtonChecked in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API SendMessageW in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API SetWindowLongW in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API SetWindowPos in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> 1>
1>ApiValidation : warning : API SetWindowTextW in user32.dll is not a supported universal API. PropPageExt.dll calls this API.
1> ApiValidation: API RegCreateKeyTransactedW in advapi32.dll is not a supported universal API. PropPageExt.dll has a dynamic dependency on this API. If PropPageExt.dll calls the API directly it will not be a universal driver.
1> ApiValidation: API RegDeleteKeyExW in advapi32.dll is not a supported universal API. PropPageExt.dll has a dynamic dependency on this API. If PropPageExt.dll calls the API directly it will not be a universal driver.
1> ApiValidation: API RegDeleteKeyTransactedW in advapi32.dll is not a supported universal API. PropPageExt.dll has a dynamic dependency on this API. If PropPageExt.dll calls the API directly it will not be a universal driver.
1> ApiValidation: API RegOpenKeyTransactedW in advapi32.dll is not a supported universal API. PropPageExt.dll has a dynamic dependency on this API. If PropPageExt.dll calls the API directly it will not be a universal driver.
1> ApiValidation: API RegQueryValueExW in advapi32.dll is not a supported universal API. PropPageExt.dll has a dynamic dependency on this API. If PropPageExt.dll calls the API directly it will not be a universal driver.
1> ApiValidation: Driver located at C:\Users\bart.holmberg\Desktop\AT\practice\DriverSamples\audio\sysvad\SwapAPO\PropPageExtensions\ARM\Debug is NOT a Universal Driver
1> 1>
1>C:\Program Files (x86)\Windows Kits\10\build\WindowsDriver.common.targets(1747,5): error MSB3721: The command ""C:\Program Files (x86)\Windows Kits\10\bin\x64\ApiValidator.exe" -DriverPackagePath:C:\Users\bart.holmberg\Desktop\AT\practice\DriverSamples\audio\sysvad\SwapAPO\PropPageExtensions\ARM\Debug\ -SupportedApiXmlFiles:"C:\Program Files (x86)\Windows Kits\10\build\universalDDIs\arm\UniversalDDIs.xml" -ModuleWhiteListXmlFiles:"C:\Program Files (x86)\Windows Kits\10\build\universalDDIs\arm\ModuleWhiteList.xml" -ApiExtractorExePath:"C:\Program Files (x86)\Windows Kits\10\bin\x64"" exited with code -1.

Request: source code for inf2cat and signtool

Since inf2cat and signtool are important tools used to make drivers, I think the Windows driver community would benefit from seeing how they work and being able to modify them. I request that you add the source code of those two utilities to this repository. (Or if the source code is available somewhere else, please let me know. I could not find it.) Thanks!

USBView doesn't build because of usbschema.hpp

I can't get USBView to build because there are missing definitions within usbschema.hpp. For instance, deviceIsOperatingAtSuperSpeedPlusOrHigher variable is not defined and UsbBillboardCapabilityDescriptorType class is not defined. When I try to run "xsd.exe /language:CPP /c /order /namespace:Microsoft.Kits.Samples.Usb" the xsd application just spits out options list. What do I need to do to get this to compile?

Please provide oplock usage exmaple in next releases

There is no any kernel mode oplock code exmaple not in windows drivers sample, not on MSDN, not even sigle line of code in all github or internet.
Please provide oplock usage sample. Better for minifilter.

GPS Sensor Sample

Hi!

Where could I find samples/template for Windows 10 GPS Sensor project?

Thanks!

DUMB QUESTION -- HD AUDIO DEVICE

I accidentally removed my HD Audio Device from my Windows 10 system (via Control Panel).
I tried reinstalling my Audio Drivers -- but the error said it could not find an Audio Device.
H E L P
I am out of business with recording!!!
If you can possibly give me some things to try...
I will very much appreciate it.

Weird IOCTL define

The define for the OSRUSBFX2 IOCTL found in the usb samples:
#define FILE_DEVICE_OSRUSBFX2 0x65500
doesn't make sense. Only the lower 16bit will be taken into account, which will effectively land in the Microsoft reserved IOCTL space.
It's quite obvious that the intent was this one:
#define FILE_DEVICE_OSRUSBFX2 65500
or
#define FILE_DEVICE_OSRUSBFX2 0xffdc

tabletaudiosample audio capture

Hi,
I have a question about the tabletaudiosample driver. I could build the driver and install it successfully after going through some of the forums. Thanks. I am also able to run the driver and confirm that it saves the speaker output into the file. Next, I am trying to do the loop capture (using wasapi) on this sysvad device but I notice that loop capture, captures the tones instead of the audio that is saved in the file. My expectation was that using WASAPI, I will get the same capture that is stored in the file by the tabletaudiosample.

Can someone let me know that how to disable the tones so that loopback capture can capture the same audio that is saved in the file? I am new to the world of windows drivers and windows OS itself so not much familiar with the architecture. I tried to look at the code but could not figure it out.

-Thanks

INF issues raised by WHQL signing

Hi,
we have built a WDDM display driver based off the sample code, and are running it through WHQL signing. One of the errors raised has to do with the model section in the INF file.
Summary of ChkInf results for ._sampledisplay.pdf

The WHQL test is running the CHKINF utility that's packaged with the Windows Driver Kit 8.1. the chkinf.bat is a wrapper around the perl script. The code that reports the problem looks something like this:

     `if ( $hwid =~ /.*CC_03.*/i
       or $hwid =~ /.*CLS_0003.*/i)
     {
        AddDisplayError(6036,$Current_INF_File->getIndex($Section,$count));
        next;
     }

     $Devices->{$hwid} = {'DDINSTALL' => $installSectionName, 
                          'DESCRIPTION' => $DevDesc };            
  }`

That is, the mere existence of CC_03* in the model line will cause the chkinf test to fail. Basically, there is a rule somewhere that the device driver should never claim support for the base VGA or XGA device.

The check obviously wouldn't allow the VGA/XGA devices to even be listed as compatible.

Does anyone know if this chkinf check reasonable, or should it allow for PCI/CC_0300 etc to at least be in the compatible id list? And if the check is reasonable, how would one get a working INF file without having a physical device (assuming a physical device would provide us with a unique hardware id and satisfy the chkinf check).

The README for avstream / samplemft0 is incomplete

The "Driver MFT" sample originally on MSDN contained a comprehensive README file detailing the complex steps necessary to install the MFT0 module. This README contains none of that information, and now that the original sample on MSDN has been pulled, this important information is unavailable.

Please update the README for this version of the MFT0 sample to include the original MSDN documentation and also fix the dead links.

Is there any guideline to transfer audio samples from virtual sound card to real one?

I‘m considering to develop a virtual sound card driver, which could capture all audio data. But at the same time, the audio data need to play in a real sound card driver. The question is how could I transfer audio samples from my virtual sound card to real sound card? Is it possible to finish it in Windows 10 and what documents should I read?

tabletaudiosample.inf registers APOs incorrectly

There are a handful of lines like this in tabletaudiosample.inf:
HKCR,CLSID%FX_STREAM_CLSID%\InProcServer32,,0x0002000,%%SystemRoot%%\System32\swapapo.dll

The "0x0002000" is an error - it should be 0x00020000 (four zeros after the 2.) This error causes the swapapo.dll binaries not to be registered with COM.

To fix this, do a Find/Replace to change all the 0x0002000 to 0x00020000 in tabletaudiosample.inf.

Cannot build solution in VS2015

Hi,

I got the following "Cannot specify [ClassInstall32] section for Microsoft-defined class. WudfBioUsbSample C:\Users\aniv\Desktop\Windows-driver-samples-master\biometrics\driver\WudfBioUsbSample.inx 22" error during build this solution in VS2015 and WDK 10.

Best Regards,
Andriy.

sysvad installation fails

I have followed the readme.md to build sysvad. First thing I have noticed, that it didn't create a cat file. Anyway, I have copied the tabletaudiosample.inf to the package directory and copied that to a freshly installed Win10 (build 10240) virtual machine.

I have executed the "bcdedit /set TESTSIGNING ON" command and rebooted.

Then I run the "devcon.exe install package\tabletaudiosample.inf Root\sysvad_TabletAudioSample" command and received the following:
Device node created. Install is complete when drivers are installed...
Updating drivers for Root\sysvad_TabletAudioSample from C:\Users\m\Desktop\package\tabletaudiosample.inf.
devcon.exe failed.

The contents of the setupapi.dev.log:

[Device Install (UpdateDriverForPlugAndPlayDevices) - Root\sysvad_TabletAudioSample]
Section start 2016/02/03 10:41:27.927
cmd: devcon.exe install package\tabletaudiosample.inf Root\sysvad_TabletAudioSample
dvi: {Update Device Driver - ROOT\MEDIA\0000}
dvi: {Build Driver List} 10:41:27.943
dvi: Searching for hardware ID(s):
dvi: root\sysvad_tabletaudiosample
dvi: {Build Driver List - exit(0x00000000)} 10:41:27.959
dvi: {DIF_SELECTBESTCOMPATDRV} 10:41:27.959
dvi: Using exported function 'MediaClassInstaller' in module 'C:\Windows\system32\mmci.dll'.
dvi: Class installer == mmci.dll,MediaClassInstaller
dvi: Class installer: Enter 10:41:27.959
dvi: Class installer: Exit
dvi: Default installer: Enter 10:41:27.975
dvi: {Select Best Driver}
! dvi: Selecting driver failed(0xe0000228)
dvi: {Select Best Driver - exit(0xe0000228)}
! dvi: Default installer: failed!
! dvi: Error 0xe0000228: There are no compatible drivers for this device.
dvi: {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 10:41:27.990
ndv: No drivers found for device.
ndv: {Update Device Driver - exit(00000103)}
! ndv: No drivers were found that are better matching drivers for device instance ROOT\MEDIA\0000 (Error 0x00000103)
! ndv: No devices were updated.
dvi: {DIF_DESTROYPRIVATEDATA} 10:41:28.006
dvi: Class installer: Enter 10:41:28.006
dvi: Class installer: Exit
dvi: Default installer: Enter 10:41:28.006
dvi: Default installer: Exit
dvi: {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 10:41:28.022
<<< Section end 2016/02/03 10:41:28.022
<<< [Exit status: FAILURE(0x00000103)]

Any idea what went wrong? What do I have to do to get this working?

RAMDisk Storage Driver Sample

Have installed the ramdrive on Windows 10 x64. I used the manual installation approach. The device was mounted and I have been able to see the drive R in explorer. When running the cmd console as administrator and trying to switch to the drive R: "incorrect function" message is displayed.

WDK?

Will the WDK be released as well? What about the IFS kit? (I see the CDFS sample and that includes ntifs.h)

A

Sysvad fails to install in target PC

Steps:
1-Compile Sysvad using VS2015
2-Provision the driver to the target device using VS2015
3-Run a command window in Administrator mode.
4 cd to the folder where the driver files are located.
5-Run the command: c:\tools\devcon install tabletaudiosample.inf Root\sysvad_TabletAudioSample

Outcome:

Microsoft Windows Version 10.0.10240 2015 Microsoft Corporation. All rights reserved.

C:\Windows\system32>cd c:\Sysvad

c:\Sysvad>c:\tools\devcon install tabletaudiosample.inf Root\sysvad_TabletAudioSample
Device node created. Install is complete when drivers are installed...
Updating drivers for Root\sysvad_TabletAudioSample from c:\Sysvad\tabletaudiosample.inf.
devcon failed.

c:\Sysvad>

The setupapi.dev.log:
[Device Install Log]
OS Version = 10.0.10240
Service Pack = 0.0
Suite = 0x0100
ProductType = 1
Architecture = x86

[BeginLog]

[Boot Session: 2016/04/04 06:52:04.497]

[Device Install (UpdateDriverForPlugAndPlayDevices) - Root\sysvad_TabletAudioSample]
Section start 2016/04/04 07:05:17.523
cmd: c:\tools\devcon install tabletaudiosample.inf Root\sysvad_TabletAudioSample
dvi: {Update Device Driver - ROOT\MEDIA\0000}
dvi: Set selected driver complete.
dvi: {Build Driver List} 07:05:17.536
dvi: Searching for hardware ID(s):
dvi: root\sysvad_tabletaudiosample
dvi: Processing a single INF: 'c:\sysvad\tabletaudiosample.inf'
inf: Opened INF: 'c:\sysvad\tabletaudiosample.inf' ([strings])
dvi: Created Driver Node:
dvi: HardwareID - Root\sysvad_TabletAudioSample
dvi: InfName - c:\sysvad\tabletaudiosample.inf
dvi: DevDesc - Virtual Audio Device (WDM) - Tablet Sample
dvi: DrvDesc - Virtual Audio Device (WDM) - Tablet Sample
dvi: Provider - TODO-Set-Provider
dvi: Mfg - TODO-Set-Manufacturer
dvi: ModelsSec - SYSVAD.NTx86
dvi: InstallSec - SYSVAD_SA
dvi: Section - SYSVAD_SA.NT
dvi: Rank - 0x00ff0000
dvi: Signer - WDKTestCert Alfredo,130888044647647603
dvi: Signer Score - Authenticode
dvi: DrvDate - 10/15/2015
dvi: Version - 22.46.3.551
dvi: {Build Driver List - exit(0x00000000)} 07:05:17.630
dvi: {DIF_SELECTBESTCOMPATDRV} 07:05:17.632
dvi: Using exported function 'MediaClassInstaller' in module 'C:\Windows\system32\mmci.dll'.
dvi: Class installer == mmci.dll,MediaClassInstaller
dvi: Using exported function 'ClassCoInstaller_Entry' in module 'C:\Windows\system32\ffusb2audio_coinst.dll'.
dvi: CoInstaller 1 == ffusb2audio_coinst.dll,ClassCoInstaller_Entry
dvi: CoInstaller 1: Enter 07:05:17.644
dvi: CoInstaller 1: Exit
dvi: Class installer: Enter 07:05:17.647
inf: Opened INF: 'c:\sysvad\tabletaudiosample.inf' ([strings])
dvi: Class installer: Exit
dvi: Default installer: Enter 07:05:17.656
dvi: {Select Best Driver}
dvi: Selected driver installs from section [SYSVAD_SA] in 'c:\sysvad\tabletaudiosample.inf'.
dvi: Class GUID of device remains: {4d36e96c-e325-11ce-bfc1-08002be10318}.
dvi: Set selected driver complete.
dvi: Selected:
dvi: Description - [Virtual Audio Device (WDM) - Tablet Sample]
dvi: InfFile - [c:\sysvad\tabletaudiosample.inf]
dvi: Section - [SYSVAD_SA]
dvi: Signer - [WDKTestCert Alfredo,130888044647647603]
dvi: Rank - [0x00ff0000]
dvi: {Select Best Driver - exit(0x00000000)}
dvi: Default installer: Exit
dvi: {DIF_SELECTBESTCOMPATDRV - exit(0x00000000)} 07:05:17.688
ndv: Forcing driver install:
ndv: Inf Name - tabletaudiosample.inf
ndv: Driver Date - 10/15/2015
ndv: Driver Version - 22.46.3.551
ndv: Driver package 'c:\sysvad\tabletaudiosample.inf' exists under 'C:\Windows\System32\DriverStore\FileRepository\tabletaudiosample.inf_x86_fe8ba9a060f09a3c\tabletaudiosample.inf' (oem20.inf).
dvi: Searching for hardware ID(s):
dvi: root\sysvad_tabletaudiosample
inf: Opened PNF: 'C:\Windows\System32\DriverStore\FileRepository\tabletaudiosample.inf_x86_fe8ba9a060f09a3c\tabletaudiosample.inf' ([])
!!! inf: Could not load INF 'C:\Windows\System32\DriverStore\FileRepository\tabletaudiosample.inf_x86_fe8ba9a060f09a3c\tabletaudiosample.inf'.
!!! inf: Error 0xe0000100: The style of the INF is different than what was requested.
dvi: Enumerating INFs from path list 'C:\Windows\INF'
inf: Searched 8 potential matches in published INF directory
ndv: {Update Device Driver - exit(e0000203)}
!!! ndv: Failed to install device instance ROOT\MEDIA\0000 (Error 0xe0000203)
dvi: {DIF_DESTROYPRIVATEDATA} 07:05:17.726
dvi: CoInstaller 1: Enter 07:05:17.728
dvi: CoInstaller 1: Exit
dvi: Class installer: Enter 07:05:17.732
dvi: Class installer: Exit
dvi: Default installer: Enter 07:05:17.736
dvi: Default installer: Exit
dvi: {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 07:05:17.741
<<< Section end 2016/04/04 07:05:17.743
<<< [Exit status: FAILURE(0xe0000203)]

inx file in samples

Some of inx file in samples doesn't have CR/LF line end. Stampinf doesn't treat this correctly. It will make build-error for the sample projects.
Please fix these inx files.

usbview Nullpointer Exception in XML Export

Hi,

usbview crashes during XML export, when a certain hardware (e.g. my no-name USB3 ExpressCard) is connected.

The bug is in xmlhelper.cpp, function XmlAddHostController, line 343:
USB_CONTROLLER_FLAVOR flavor = hcInfo->ControllerInfo->ControllerFlavor;
Problem: It is possible that hcInfo->ControllerInfo is NULL.

Therefore that line simply needs to move down into the subsequent if block:
if(NULL != hcInfo->ControllerInfo) { ... }

I have tested that suggestion, works fine. I just don't have time to create a branch and a Pull request.

HID report descriptor error in Windows-driver-samples/input/hiddigi/SynapticsTouch/hid.c

The global items PHYSICAL_MAXIMUM, LOGICAL_MAXIMUM, UNIT_EXPONENT and UNIT should be reset to sensible values by inserting:

    0x45, 0x00,                         //     PHYSICAL_MAXIMUM (0) 
    0x26, 0xff, 0x00,                   //     LOGICAL_MAXIMUM (255)
    0x55, 0x00,                         //     UNIT_EXPONENT (1)
    0x65, 0x00,                         //     UNIT (none)

...prior to:

    0x05, 0x0d,                         //   USAGE_PAGE (Digitizers)    
    0x09, 0x54,                         //   USAGE (Actual count)
    0x95, 0x01,                         //   REPORT_COUNT (1)
    0x75, 0x08,                         //   REPORT_SIZE (8)    
    0x81, 0x02,                         //     INPUT (Data,Var,Abs)

...otherwise the globals will be applied to all subsequent items inappropriately. For example, the Actual count, which should be unitless, will have 0.01 inch units applied, and the 8-bit REPORT_SIZE will not be wide enough to accommodate the LOGICAL_MAXIMUM of 1280.

Unable to save file to RAM disk drive. Drive with the name 'R' does not exist.

This issue is related to the RAMDisk Storage Driver Sample. After building, and installing, the RAM disk driver I was not able to save a file on the RAM disk, because drive 'R' was not found. I followed the instructions provided in the README.md, and was able to build and install the RAM disk without an issue. Moreover, I could see the WDF Sample RAM disk Driver in the Device Manager, and the Ramdisk entries in the Registry. Is there something else I must do?

Confusing `MaximumTransferSize` and `maxTransferSize` in USBSAMP.SYS

In the project USBSAMP, MaximumTransferSize and maxTransferSize have different meaning. Therefore it is better to rename one of them......

    if (totalLength > deviceContext->MaximumTransferSize) {
        UsbSamp_DbgPrint(1, ("Transfer length > circular buffer\n"));
        status = STATUS_INVALID_PARAMETER;
        goto Exit;
    }

maxTransferSize = GetMaxTransferSize(pipe, deviceContext);

C28118 in EvtCleanupCallback of WDF_DRIVER_CONFIG

The EvtCleanupCallback implementations of at least the PLX9x5x and the PciDrv samples use the PAGED_CODE() macro, which will issue the C28118 code analysis warning.

The EvtCleanupCallback function documentation says the following:

Typically, the framework calls the EvtCleanupCallback callback function at IRQL <= DISPATCH_LEVEL. However, the framework calls the callback function at IRQL = PASSIVE_LEVEL in the following situations:
The object's handle type is WDFDEVICE, WDFDRIVER, WDFDPC, WDFINTERRUPT, WDFIOTARGET, WDFQUEUE, WDFSTRING, WDFTIMER, or WDFWORKITEM.
...

This indicates C28118 is a false positive here, or the documentation deviates from the declaration of the EVT_WDF_DEVICE_CONTEXT_CLEANUP typedef.

Based on the answer, the samples could be updated accordingly.

The same goes for EvtDeviceContextCleanup.

Enable WPP Recorder does not work

I tried to enable "Enable WPP Recorder" in Sensors Code. The code throws errors.

Navigate to Properties->Wpp Tracing->Function and Macro Options and choose Enable WPP Recorder.

hidclient does not read for some sennheiser headset

I am testing hidclient (project) with some sennheiser headsets. For few headset, I can see data is read when input buttons of headsets are clicked, however for some no data is read. I am using, "One click asynchronous thread" functionality.
I am not sure what is going on, that for some headset it works fine while for some it does not. Is there any limitation somewhere (in the headset or in the code or drivers) due to which data is not read.
I am a new bie and really not clear what is going wrong.

Maximum transfer length (HwMaxXferLen) calculation is off by 1 page size

I believe the calculation for the HwMaxXferLen in the InitializeTransferPackets() function is off by 1 page size. Please see Windows-driver-samples/storage/class/classpnp/src/xferpkt.c line 70-73:

hwMaxPages = adapterDesc->MaximumPhysicalPages ? adapterDesc->MaximumPhysicalPages-1 : 0;
fdoData->HwMaxXferLen = MIN(adapterDesc->MaximumTransferLength, hwMaxPages << PAGE_SHIFT);
fdoData->HwMaxXferLen = MAX(fdoData->HwMaxXferLen, PAGE_SIZE);

XPSDrvSample

Hi,
I get the following error message when I try and build the "XPSDrv Driver and Filter Sample" project. Followed the instructions in the Readme guide, but I also get exact same error message when Building the built-in "Print Driver v4" template. Not sure if it's something I have to configure within each project or on my machine.
Using Visual Studio 2015 Express.
Inf2Cat Tool Output:
.............................
Signability test failed.

Errors:
22.9.1: xdwscrgb.icc in [colorprofiles] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdcmykprinter.icc in [colorprofiles] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdsmpl.ini in [configplugin] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdsmpl.gpd in [xpsdrvsample] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdnames.gpd in [xpsdrvsample] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdwmark.gpd in [xpsdrvsample] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdbook.gpd in [xpsdrvsample] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdcolman.gpd in [xpsdrvsample] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdnup.gpd in [xpsdrvsample] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdpgscl.gpd in [xpsdrvsample] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.
22.9.1: xdsmpl-pipelineconfig.xml in [xpsdrvsample] of \xdsmpl.inf is missing or cannot be decompressed from source media. Please verify all path values specified in SourceDisksNames, SouceDisksFiles, and CopyFiles sections resolve to the actual location of the file, and are expressed in terms relative to the location of the inf.

Warnings:
22.9.3: Missing hardware ID (cannot have just compatible ID) in line xpsdrv sample driver=install_xdsmpl_filters_pre_vista in section [standard.ntx86] of \xdsmpl.inf
22.9.3: Missing hardware ID (cannot have just compatible ID) in line xpsdrv sample driver=install_xdsmpl_filters_pre_vista in section [standard.ntia64] of \xdsmpl.inf
22.9.3: Missing hardware ID (cannot have just compatible ID) in line xpsdrv sample driver=install_xdsmpl_filters_pre_vista in section [standard.ntamd64] of \xdsmpl.inf
22.9.3: Missing hardware ID (cannot have just compatible ID) in line xpsdrv sample driver=install_xdsmpl_filters_vista in section [standard.ntx86.6.0] of \xdsmpl.inf
22.9.3: Missing hardware ID (cannot have just compatible ID) in line xpsdrv sample driver=install_xdsmpl_filters_vista in section [standard.ntia64.6.0] of \xdsmpl.inf
22.9.3: Missing hardware ID (cannot have just compatible ID) in line xpsdrv sample driver=install_xdsmpl_filters_vista in section [standard.ntamd64.6.0] of \xdsmpl.inf

filesys/nullFilter crashes

Repro steps-

  1. Git clone this repo
  2. Go to filesys/miniFilter/nullFilter, open solution file in visual studio
  3. Launch a 10586 windows 10 vhd in hyper-v
  4. According to this page, run the following commands and reboot
    a) bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
    b) bcdedit -set TESTSIGNING ON
  5. Copy the nullFilter.sys to guest VM
  6. Run ' sc create nullfilter type=filesys binpath=c:\temp\nullFilter.sys' to install the driver
  7. Run sc start null filter
  8. Guest VM bluescreen with error message something like "THREAD_EXCEPTION_UNHANDLED"

Not sure if it's because I'm not deploying the driver correctly.

Sample/Instructions to install NetService (NDIS Filter Driver) on Windows IoT Core

I know that there is a simple driver example to install a device driver on IoT Core. I cannot find any information about how to install a NetService type NDIS filter driver on IoT Core. I have trouble installing a NDIS Filter Driver on IoT Core, which is quite different from a general device driver.

My NDIS filter driver is basically from VS2015 NDIS filter driver sample. I already successfully put it on a target Win 10 Enterprise PC and can see its trace messages via VS2015 Kernel debugger window from Development computer.

I was also trying to put it on Windows IoT Core, and my hardware is Minnowboard Max. My steps are:

  1. Follow https://ms-iot.github.io/content/en-US/win10/samples/DriverLab4.htm to just set up the provisioning on the target IoT Core from VS2015 on dev computer.
  2. Follow https://channel9.msdn.com/Blogs/WinHEC/Creating-Universal-Drivers-with-WDK-10 to prepare for the mobile package (.cab file). Need to enter the required info in Package.pkg.xml file.
    Build the x86 debug version.
  3. Follow https://channel9.msdn.com/Blogs/WinHEC/Creating-Universal-Drivers-with-WDK-10 to deploy the .cab (online .cab package installation/update) on IoT Core from VS2015.

However, after connected via Kernel Debugger and set Kd_DEFAULT_MASK = 0xF,
cannot see any filter driver’s trace messages.
“devcon listclass NetService” returns empty.

Can anyone give me any instructions or hint? (This issue
is only for IoT Core. I successfully made it work on Windows 10 Enterprise already.)

license for contributions

Can you please clarify or confirm whether contributions made to this project are taken in under the same/outbound license, that is: Microsoft Public License (MS-PL)?

As a side note, it looks like all your source files have "all rights reserved" with no indication of the license that applies, you might want to add a notice in the source files MS-PL applies (best practice, a la ASF and FSF projects). :)

Thanks!

Manual install of sysvad_tabletaudiosample fails

Target: Windows 10 x86

These are the logs from setupapi.dev.log

[Device Install Log]
OS Version = 10.0.10240
Service Pack = 0.0
Suite = 0x0100
ProductType = 1
Architecture = x86

[BeginLog]

[Boot Session: 2015/10/15 13:49:43.345]

[Device Install (DiInstallDevice) - ROOT\MEDIA\0000]
Section start 2015/10/15 14:06:53.006
cmd: "C:\Windows\system32\mmc.exe" C:\Windows\system32\devmgmt.msc
dvi: Selected driver installs from section [SYSVAD_SA] in 'c:\users\wdkremoteuser\desktop\debug\package\tabletaudiosample.inf'.
dvi: Class GUID of device remains: {4d36e96c-e325-11ce-bfc1-08002be10318}.
dvi: Set selected driver complete.
ndv: Driver package 'c:\users\wdkremoteuser\desktop\debug\package\tabletaudiosample.inf' exists under
'C:\Windows\System32\DriverStore\FileRepository\tabletaudiosample.inf_x86_fe8ba9a060f09a3c\tabletaudiosample.inf' (oem20.inf).
inf: Opened PNF: 'C:\Windows\System32\DriverStore\FileRepository\tabletaudiosample.inf_x86_fe8ba9a060f09a3c\tabletaudiosample.inf' ([???])
<<< Section end 2015/10/15 14:06:53.027
<<< [Exit status: FAILURE(0xe0000203)]

[Device Install (DiInstallDevice) - ROOT\MEDIA\0000]
Section start 2015/10/15 14:06:53.030
cmd: "C:\Windows\system32\mmc.exe" C:\Windows\system32\devmgmt.msc
dvi: {Plug and Play Service: Device Install for ROOT\MEDIA\0000}
ump: Creating Install Process: DrvInst.exe 14:06:53.061
! ndv: Installing NULL driver!
dvi: Set selected driver complete.
dvi: {DIF_ALLOW_INSTALL} 14:06:53.068
dvi: Using exported function 'MediaClassInstaller' in module 'C:\Windows\system32\mmci.dll'.
dvi: Class installer == mmci.dll,MediaClassInstaller
dvi: No CoInstallers found
dvi: Class installer: Enter 14:06:53.074
dvi: Class installer: Exit
dvi: Default installer: Enter 14:06:53.076
dvi: Default installer: Exit
dvi: {DIF_ALLOW_INSTALL - exit(0xe000020e)} 14:06:53.077
dvi: {DIF_REGISTER_COINSTALLERS} 14:06:53.078
dvi: Class installer: Enter 14:06:53.079
dvi: Class installer: Exit
dvi: Default installer: Enter 14:06:53.080
dvi: Co-installers registered.
dvi: Default installer: Exit
dvi: {DIF_REGISTER_COINSTALLERS - exit(0x00000000)} 14:06:53.082
dvi: {DIF_INSTALLDEVICE} 14:06:53.083
dvi: No CoInstallers found
dvi: Class installer: Enter 14:06:53.085
dvi: Class installer: Exit
dvi: Default installer: Enter 14:06:53.086
! dvi: Installing NULL driver!
dvi: Install Null Driver: Removing device sub-tree. 14:06:53.088
dvi: Install Null Driver: Removing device sub-tree completed. 14:06:53.092
dvi: Install Null Driver: Restarting device. 14:06:53.096
dvi: Install Null Driver: Restarting device completed. 14:06:53.097
dvi: Writing common driver property settings.
dvi: Install Device: Configuring device class. 14:06:53.100
dvi: Install Device: Configuring device class completed. 14:06:53.101
dvi: Install Device: Starting device. 14:06:53.102
dvi: Install Device: Starting device completed. 14:06:53.105
dvi: Default installer: Exit
dvi: {DIF_INSTALLDEVICE - exit(0x00000000)} 14:06:53.111
dvi: {DIF_DESTROYPRIVATEDATA} 14:06:53.114
dvi: Class installer: Enter 14:06:53.194
dvi: Class installer: Exit
dvi: Default installer: Enter 14:06:53.200
dvi: Default installer: Exit
dvi: {DIF_DESTROYPRIVATEDATA - exit(0xe000020e)} 14:06:53.202
ump: Server install process exited with code 0x00000000 14:06:53.205
ump: {Plug and Play Service: Device Install exit(00000000)}
<<< Section end 2015/10/15 14:06:53.210
<<< [Exit status: SUCCESS]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.