wdk

WDK (Windows Driver Kit) and VC++ headers problem

馋奶兔 提交于 2019-11-29 10:19:16
问题 I'm trying to read from an USB HID device, I know how to do it in C# using DLLImport hid.dll, but I want to do it from C++, this way I don't have to declare all the structures, etc, and just include the headers files. So I downloaded the WDK and then when including the headers files and linking the libraries I'm getting a lot of errors: #include <windows.h> extern "C" { #include <hidsdi.h> } int main(){ } Errors (6 out of 163): Error 1 error C2065: 'PASSIVE_LEVEL' : undeclared identifier c:

warning C4996: 'GetVersionExW': was declared deprecated

陌路散爱 提交于 2019-11-28 08:03:54
I am working on VS 2013 in Win 8.1. How to solve this warning? The basic question is "why are you calling GetVersionExW in the first place?" The answer to that question determines what you should do instead. The deprecation warning is there to give developers a heads-up about the appcompat behavior change that started in Windows 8.1. See Windows and Windows Server compatibility cookbook: Windows 8, Windows 8.1, and Windows Server 2012 . In short, that function doesn't return what you think it returns by default. Historically, badly written OS version checks are the primary source of appcompat

Programmatically differentiating between USB Floppy Drive and USB Flash Drive in Windows

十年热恋 提交于 2019-11-28 03:44:41
问题 On Windows (XP-7), is there a reliable way of programatically differentiating between USB floppy drives and USB flash drives in C++? At the moment, I'm using WMI to get updates when new Win32_LogicalDisk instances are detected, and then using the DriveType attribute of the LogicalDisk object to figure out a basic type. This works quite well, except that floppy drives and USB flash drives are both of DriveType DRIVE_REMOVABLE , so to differentiate between those (floppy vs. flash), I'm using

Virtual Webcam Driver

走远了吗. 提交于 2019-11-27 18:24:19
I want to develop a virtual webcam driver which from User mode I'll pass image to it and it will display as webcam output. I don't want to use DirectX filter and CSourceStream etc. Because they don't work on some programs which doesn't use DirectX for capturing webcam image. I have to write a kernel mode device driver so. Any ideas? I tried testcap from DDK samples, but it doesn't process image from user mode and doesn't get any input, just it displays 7 colors in webcam... Any help would be greatly appreciated. Thanks Thank you all! I tried code from here: http://tmhare.mvps.org/downloads.htm

VS2008配置编译WDK

∥☆過路亽.° 提交于 2019-11-27 06:17:08
开发所用到的工具 1. VS2008 用于MFC以及C, window driver的开发; 2. UltraEdit 用于辅助; 3. Zend Studio 用于PHP的开发; 4. Evernote 用来记录开发日志; UltraEdit可以用来编辑wdk的程序, 但是没有带代码自动完成的功能(也许安装某个插件后可以?), 所以开发driver我选择用VS2008来开发, 电脑配置还不错, 所以不用担心; 配置VS2008可以编译WDK步骤如下: 1. 生成一个项目, 可以是控制台程序; 2. 在项目属性里: a. 常规-配置类型, 选择"生成文件", 选择完之后记得按应用按钮; b. 在NMake下配置如下图: 生成命令行 my_build.bat chk WXP其中my_build.bat是驱动的编译命令行; my_build.bat Set DDKDIR=C:\WinDDK\7600.16385.1 set TARGETDIR=%~dp0 set TARGETDISK=E: @echo on @echo %1 is chk or fre %2 is WXP or W2K or WNET. if "%3"=="/a" call my_clean %1 %2 @echo off call %DDKDIR%\bin\setenv.bat %DDKDIR% %1 %2 cd

warning C4996: 'GetVersionExW': was declared deprecated

泄露秘密 提交于 2019-11-27 02:03:24
问题 I am working on VS 2013 in Win 8.1. How to solve this warning? 回答1: The basic question is "why are you calling GetVersionExW in the first place?" The answer to that question determines what you should do instead. The deprecation warning is there to give developers a heads-up about the appcompat behavior change that started in Windows 8.1. See Windows and Windows Server compatibility cookbook: Windows 8, Windows 8.1, and Windows Server 2012. In short, that function doesn't return what you

Virtual Webcam Driver

不羁岁月 提交于 2019-11-26 19:25:15
问题 I want to develop a virtual webcam driver which from User mode I'll pass image to it and it will display as webcam output. I don't want to use DirectX filter and CSourceStream etc. Because they don't work on some programs which doesn't use DirectX for capturing webcam image. I have to write a kernel mode device driver so. Any ideas? I tried testcap from DDK samples, but it doesn't process image from user mode and doesn't get any input, just it displays 7 colors in webcam... Any help would be