wdk

NDIS and miniport driver

六月ゝ 毕业季﹏ 提交于 2019-12-06 07:15:38
I am trying to modify a ethernet driver using WDK tools provided in Visual Studio 2012. The samples provided in the WDK are 'miniport adapter' and 'NDIS Light Weight Filter' among others. I am still at the very beginning of driver writing and hence finding it tough to navigate through the code. I was able to install the miniport adapter after building it in Visual Studio 2012 [Shows up as 'Microsoft Virtual Miniport Adapter' in my network adapters list.] I am able to assign it a IP address and Subnet mask also.[I found out that this does not connect to any physical device on my PC]. I also

How to use ZwQueryInformationProcess to get ProcessImageFileName in a kernel driver?

╄→гoц情女王★ 提交于 2019-12-05 19:27:13
问题 I'm writing a simple kernel driver for my application (think of a very simple anti-malware application.) I've hooked ZwOpenFile() and used PsGetCurrentProcess() to get a handle to the caller process. It returns a PEPROCESS structure: PEPROCESS proc = PsGetCurrentProcess(); I'm using ZwQueryInformationProcess() to get the PID and ImageFileName : DbgPrint("ZwOpenFile Called...\n"); DbgPrint("PID: %d\n", PsGetProcessId(proc)); DbgPrint("ImageFileName: %.16s\n", PsGetProcessImageFileName(proc));

Driver load/unload fails if WinDbg attached with breakpoint

匆匆过客 提交于 2019-12-05 18:31:38
I just started with driver development. For some experiments with loading, unloading and debugging I have written the following simple driver: #include <ntddk.h> void DriverUnload(PDRIVER_OBJECT pDriverObject) { UNREFERENCED_PARAMETER(pDriverObject); DbgPrint("Driver unloading\n"); } NTSTATUS DriverEntry( PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) { UNREFERENCED_PARAMETER(DriverObject); UNREFERENCED_PARAMETER(RegistryPath); DriverObject->DriverUnload = DriverUnload; DbgPrint("Hello, World\n"); return STATUS_SUCCESS; } I compiled the driver for my target system, Windows 7 64bit,

Windows virtual mouse driver

旧街凉风 提交于 2019-12-05 17:19:58
I am developing a KMDF virtual mouse driver. The general idea is a KMDF root enumerated non-filter driver which will be able to send output reports to the mouse and keyboard driver stacks. My driver is already working and sending requests to other driver stacks, but with no result. Report types and packet formats are pretty undocumented on Microsoft resources. There are no information about which data and to which device I need to send in order to move the mouse pointer, simulate clicks (with either mouse or keyboard). There is only general information about HID clients, drivers etc. Their

Retrieving PCI coordinates by Windows' API (user mode)

≯℡__Kan透↙ 提交于 2019-12-05 10:41:45
Is there a way to obtain PCI coordinates (bus/slot/function numbers) of devices by using Windows c/c++ API (e.g PnP Configuration Manager API)? I already know how to do it in kernel mode, I need an user-mode solution. My target system is Windows XP-32 bit. I've eventually found a simple solution (it was just a matter of digging into MSDN). This minimal code finds the device's PCI coordinates in terms of bus/slot/function: DWORD bus, addr, slot, func; HDEVINFO h; // Obtained by SetupDiGetClassDevs SP_DEVINFO_DATA d; // Filled by SetupDiGetDeviceInterfaceDetail SetupDiGetDeviceRegistryProperty(h

What is winapifamily.h?

ⅰ亾dé卋堺 提交于 2019-12-05 04:21:40
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? 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'. For reference, the winapifamily.h is located at C:\Program Files (x86)\Windows Kits\8.0\Include\shared 来源: https://stackoverflow.com/questions/9509166/what-is

Windows: Is it *possible* to create a (virtual) video card driver?

﹥>﹥吖頭↗ 提交于 2019-12-04 15:59:06
问题 i want to create a virtual monitor. The way this would work is that the virtual monitor would appear in a window on my desktop. As far as Windows knows it is just another monitor. It occurs to me that it would, as a practical matter, have to be done as video card driver (i.e. rather than the video going out a wire to an LCD panel, it would go into another window on the desktop). Does what i'm describing sound, technically, possible ? (from a DDK point of view) Note: i can't use a virtual pc,

How to get Audio Formats supported by physical device (WinAPI, Windows)

社会主义新天地 提交于 2019-12-04 15:29:10
I have an audio device (a USB microphone) and I want to find out what audio formats it supports natively (bit depth & sample rate), on OS X there is a nice kAudioStreamPropertyAvailablePhysicalFormats Core Audio property, but I fail to find something similar on Windows. I know there is this question Windows Core Audio Api get all supported formats on capture device but The answer is bad... and I'm not limited with windows Core Audio APIs, I need any way. Windows itself somehow knows it, so most likely there should be a way, via IOCTL for example, DirectShow or WMI or something else. Probably

Is it possible to integrate the Windows 10 WDK with Visual Studio 2013?

♀尐吖头ヾ 提交于 2019-12-04 14:14:24
问题 I need to work on a Windows 10 specific driver type. Getting and installing the WDK 10.0.10075 is no problem. I had Visual Studio 2013 Pro installed prior to installing the WDK. How can I now integrate the WDK into Visual Studio? I know the Visual Studio 2015 RC is available, but I'd prefer to use the Visual Studio 2013 IDE for now and the Windows driver samples contain Visual Studio 2013 solutions . However, when I open the solution and attempt to build it, I get: 1>C:\Program Files (x86)

Windows Driver Development: Deploy option missing in Visual Studio 2012

随声附和 提交于 2019-12-04 04:45:57
I was trying to compile and deploy the WFP sample obtained from MSDN called msnmntr but the same problem applies to all samples. This and all samples fail to deploy because there's one step in the documentation that are missing in Visual Studio 2012 Ultimate. It says: 1) Open the property pages for your driver package. Right-click the driver package project in Solution Explorer and select Properties. 2) In the property pages for the driver package, click Configuration Properties, click Driver Install, and then click Deployment. However there's no such option in the Visual Studio 2012 as you