wdk

How to fix preinstalled driver on Windows 8.1

北慕城南 提交于 2019-12-11 10:34:29
问题 Same situation as described in Preinstalling Driver on Windows 8.1 Fails. But is there a fix how to reinstall the same driver package (no guid change) without reinstalling 8.1? Situation: On a fresh Windows 8.1 installation (no upgrade from 8.0), our USB devices can't be installed. Behavior can be reproduce with a VM: create registry entries with class guid from inf file to show correct USB icon and create own group in device manager: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class

2 Mice, capturing exclusively one mouse on windows (DirectInput, DDK, Linux, anything)

醉酒当歌 提交于 2019-12-11 09:08:43
问题 I have connected 2 mice to PC and I wish one mouse to work as regular mouse and capture second mouse exclusively. First I was trying DirectInput. It showed 2 devices with word mouse in InstanceName. But only one device had DeviceType.Mouse and it was only really working device. When I was acquiring it was blocking both mice. Second I decided to create driver. I downloaded WinDDK. There is Mouse Filter driver sample. I was able to compile it. But I am not driver programmer. It is complex for

Inf2Cat error when compile sample code from “Windows Driver Kit (WDK) 8.0 Samples”

梦想与她 提交于 2019-12-11 06:29:38
问题 When I used Visual Studio 2012 and WinDDK 8.0 to compile sample code "Kernel mode display-only miniport driver (KMDOD) sample" from package "Windows Driver Kit (WDK) 8.0 Samples" downloaded from msdn wdk 8.0 sample, I got the following errors: Error 1 error -1: "Inf2Cat, unknown failure." Double click to see the tool output. The output file is "inf2catOutput.log", and the content is: Inf2Cat Tool Output: ..................... Signability test complete. Errors: None Warnings: None Unable to

Serial number enumeration failed when we cast Descriptor+Descriptor->SerialNumberOffset

若如初见. 提交于 2019-12-11 04:48:12
问题 I have a kernel driver which is used to find the serial number of storage devices, but there is an issue with the driver. Descriptor->SerialNumberOffset is 103 but (LPCSTR)(UINT_PTR)Descriptor+(DWORD32)Descriptor->SerialNumberOffset is NULL here is my code NTSTATUS GetDeviceTypeAndUniqueID(IN PDEVICE_OBJECT StorageStackDeviceObject, cwDevices *lDeviceTypeArg, char *pszUidArg) { DWORRD lDeviceType=0; STORAGE_PROPERTY_QUERY Query; STORAGE_DEVICE_DESCRIPTOR Buffer[4]; NTSTATUS Status = STATUS

Cannot declare variable at all with Windows Driver Kit build environment

狂风中的少年 提交于 2019-12-11 03:56:48
问题 I have a trivial driver, like so: #include <ntddk.h> NTSTATUS DriverEntry(__in DRIVER_OBJECT* a, __in UNICODE_STRING* b) { UNREFERENCED_PARAMETER(a); UNREFERENCED_PARAMETER(b); int c; // this fails the build return 0; } A trivial makefile TARGETNAME=main TARGETTYPE=DRIVER MSC_WARNING_LEVEL=/W4 /WX SOURCES=main.c With a non trival build output C:\Test>pushd %cd% C:\Test>C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1 fre x64 wnet WARNING: x64 Native compiling isn't supported.

Why am I getting Error Code 6 on StartService?

…衆ロ難τιáo~ 提交于 2019-12-10 14:54:05
问题 For my purposes, I need to write a kernel mode driver for Windows. Currently I am attempting to make it work under Windows 7 x64. I created a simple project in Visual Studio 2012 with default code for a KMDF driver. I compiled the code with test-signing on. The driver was compiled and signed. I also have Test-Signing ON enabled as clearly displayed on the bottom left corner of my Desktop. Upon trying to start the driver as a service, I always get an Error Code 6: Invalid Handle error.(I have

What is winapifamily.h?

て烟熏妆下的殇ゞ 提交于 2019-12-10 03:41:59
问题 Can't find it in Windows SDK and DDK, but some of our existing code includes it. The only meaningful link I found by Google is: http://msdn.microsoft.com/en-us/library/windows/hardware/hh450839%28v=vs.85%29.aspx What's it? 回答1: This is a new header file, currently only present in the SDK/DDK of Windows 8 Consumer Preview / Visual Studio 11 Beta. I think this header is for splitting the Win32 API into Desktop/MetroApp 'partitions'. 回答2: For reference, the winapifamily.h is located at C:

Windows biometric framework sample umdf driver: This device cannot start. (Code 10)

天涯浪子 提交于 2019-12-08 05:02:49
问题 I am trying to run a windows biometric driver sample and I am naive to driver development I have changed the hardware id in the inx file and rebuilt the driver project and installed the resulting driver on my Windows 10 Pro version 1803. I am using a Fingerprint Morpho Device 1300 E3 Driver got installed successfully but there is one error showing up: This device cannot start. (Code 10) The specified request is not a valid operation for the target device. I reviewed the file C:\Windows\INF

Create a Windows driver to access network storage

徘徊边缘 提交于 2019-12-08 04:09:08
问题 I am working on an application which need to manage (access, create, write, read) files on a distant server and which will mount the storage as a virtual drive/volume on a specified location on the computer (eg. H:), like a local USB device for example. On Linux, it is possible to do such a thing using FUSE. However, on Windows, there is no equivalent and the only way is to use a driver. So I started to create a driver using the WDF but I get stuck at the very beginning with the inf file and

Overloading operator new with WDK

橙三吉。 提交于 2019-12-08 03:51:22
问题 i'm building a simple code in wdk in "native subsystem" i have a library that overload new and delete operator here is the code: #include<ntddk.h&gt #define HEAP_ZERO_MEMORY 0x00000008 #define HEAP_GROWABLE 0x00000002 typedef NTSTATUS (NTAPI * PRTL_HEAP_COMMIT_ROUTINE)( IN PVOID Base, IN OUT PVOID *CommitAddress, IN OUT PSIZE_T CommitSize ); typedef struct _RTL_HEAP_PARAMETERS { ULONG Length; SIZE_T SegmentReserve; SIZE_T SegmentCommit; SIZE_T DeCommitFreeBlockThreshold; SIZE_T