driver

How do I get the version of a driver on Windows from C++

心已入冬 提交于 2019-12-21 05:33:19
问题 I'm looking for a programmatic way to get the version number of a driver. I want the same number that device manager shows in the driver properties for a device. Background: I have an application that talks to some custom hardware. The device driver for the custom hardware has known bugs before a certain version number. I want the application to check the driver version and warn the user if they need to update it. The application runs on Windows XP and 7 and is written in C++. A previous hack

Is USB power always enabled ? And if not, how to write a driver

痞子三分冷 提交于 2019-12-21 04:58:13
问题 I have a device that came with an AC power adapter where the connector is a mini USB plug. The device however doesn't seem to power itself from a computer's USB port (using a standard USB-mini USB cable) unless a specific driver is installed. The driver is only available for Windows. I would like to charge the device from USB plugs on different platforms. My question is: why isn't power getting to the device without the driver? Is a driver always required for a USB port to start giving power?

Unload kext which still has instances

我们两清 提交于 2019-12-21 02:51:15
问题 I'm updating the driver of one of my devices and would like to kextunload the old driver and kextload the new one so a restart isn't required anymore. After the installation I try: sudo kextunload /System/Library/Extensions/Driver.kext The error which happens looks like this: (kernel) Can't unload kext com.driver.Driver; classes have instances: (kernel) Kext com.driver.Driver class com_driver_Driver_USBAudioDevice has 1 instance. Failed to unload com.driver.Driver - (libkern/kext) kext is in

Unload kext which still has instances

对着背影说爱祢 提交于 2019-12-21 02:51:07
问题 I'm updating the driver of one of my devices and would like to kextunload the old driver and kextload the new one so a restart isn't required anymore. After the installation I try: sudo kextunload /System/Library/Extensions/Driver.kext The error which happens looks like this: (kernel) Can't unload kext com.driver.Driver; classes have instances: (kernel) Kext com.driver.Driver class com_driver_Driver_USBAudioDevice has 1 instance. Failed to unload com.driver.Driver - (libkern/kext) kext is in

How to find the list of processes using a particular kernel module?

二次信任 提交于 2019-12-20 17:47:24
问题 When I try to rmmod a module I get the error message "Error: Module in use" , lsmod | grep <module name> shows the count. Is there a way that would tell me which processes are using this particular kernel module/driver? 回答1: This was asked before, but there was no great answer, probably because there is no good way to accomplish to find what is using what. The best suggestion is to dmesg and look for any indication of what loaded the module. You might also try using the --force parameter to

Windows7 boot option to allow unsigned drivers ignored

假如想象 提交于 2019-12-20 12:05:31
问题 I'm learning Windows kernel mode driver development. I've written a small test driver that I can successfully register, unregister, load and unload under Windows 7 32bit Ultima edition running under a VM in VirtualBox. My host is Windows 7 64bit Home Premium edition. The driver, compiled for 64 bit, will not load under Windows 7 Home edition. I keep getting a rejection noticed that this version of windows does not allow unsigned drivers. I've tried two things: I've used the F8 boot option to

How to trap file access attempts with a filter driver (kernel) and offer dialog to allow/deny (user)?

不羁岁月 提交于 2019-12-20 10:55:43
问题 I've been looking at Windows's File System Filter Drivers. I started with this "FsFilter" example: http://www.codeproject.com/Articles/43586/File-System-Filter-Driver-Tutorial With effort, I managed to get it built and signed in versions that work on everything from 64-bit Win8 to 32-bit WinXP. (Well, as long as I run Bcdedit.exe -set TESTSIGNING ON to allow it to accept my test certificate, since I didn't pay Microsoft $250 to sign my .SYS file. :-/) Now I want to modify FsFilter. I'd like

Pointers to creating virtual monitor drivers for OS X

烈酒焚心 提交于 2019-12-20 09:06:18
问题 I'd like to create a virtual monitor driver for OS X. What I mean by virtual is a monitor driver that does not drive an attached monitor, yet fools OS X into thinking there is such a monitor attached. The purpose? It can tunnel display data to some other device over some other protocol, say VNC. I believe this has been done before in one form or another (perhaps those apps that turn your iPad into a secondary display). Any coding/kernel hackery pointers on this would be appreciated! 回答1:

How to capture the screen using /dev/graphics/fb0 (Android)

℡╲_俬逩灬. 提交于 2019-12-20 08:50:47
问题 How to capture the Android device screen content using /dev/graphics/fb0 and how to make it an image file using the collected data from frame buffer. I know for this it requires the device to be rooted and I am ok with that. Thanks in advance, 回答1: This should work: adb pull /dev/graphics/fb0 fb0 ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s 320x480 -i fb0 -f image2 -vcodec png image.png 回答2: If you have the root privilege. copy data from fb0 to another file, e.g. cat fb0 >

Mac driver development

半世苍凉 提交于 2019-12-20 08:50:19
问题 I am thinking about migrating a Windows driver into OS X. Now I am just starting to look around to see what is available and there is a lot about objective C and cocoa. Seems that the language and the cocoa framework are high level APIs, am I right to assume that? I have strong C++ skills and I use them for kernel development, can I use the same skills for Mac driver development (I imagine the answer is yes). Has Macintosh any type of application/dev environment for building drivers? 回答1: The