device-driver

How to detect when USB device is being connected/disconnected?

大憨熊 提交于 2019-12-20 15:01:28
问题 I don't feel comfortable harnessing USB device with Delphi and have a next to nothing knowledge of the details of writing device driver (though I've come accross some when learning assembly with GoASM). The device could be either an usb modem or an usb printer. What I need is a direction to go and sample code adressing the topic. 回答1: This was taken from detect if usb device is connected unit U_Usb; interface uses Windows, Messages, SysUtils, Classes, Forms; type PDevBroadcastHdr = ^DEV

How to detect when USB device is being connected/disconnected?

我是研究僧i 提交于 2019-12-20 15:01:11
问题 I don't feel comfortable harnessing USB device with Delphi and have a next to nothing knowledge of the details of writing device driver (though I've come accross some when learning assembly with GoASM). The device could be either an usb modem or an usb printer. What I need is a direction to go and sample code adressing the topic. 回答1: This was taken from detect if usb device is connected unit U_Usb; interface uses Windows, Messages, SysUtils, Classes, Forms; type PDevBroadcastHdr = ^DEV

Writing a windows driver for an emulated input device

青春壹個敷衍的年華 提交于 2019-12-20 10:55:39
问题 My application needs to behave as a virtual joystick (imagine dragging a square with the mouse and translating that to the output of an analog joystick) and send some keystrokes over the network to another computer where the driver would receive that input. I only need to support XP, Vista and Win7. Maybe it can be done without writing a driver. I tried sending keystrokes with SendKey() which seemed to work but don't know how to emulate an analog joystick. I've downloaded the VDK and been

Linux Kernel: copy_from_user - struct with pointers

喜欢而已 提交于 2019-12-19 16:06:16
问题 I've implemented some kind of character device and I need help with copy_ from_user function. I've a structure: struct my_struct{ int a; int *b; }; I initialize it in user space and pass pointer to my_struct to my char device using 'write' function. In Kernel's Space character device 'write' function I cast it from a *char to this kind of structure. I alloc some memory for a struct using kmalloc and do copy_from_user into it. It's fine for simple 'int a', but it copies only pointer (address)

Linux Kernel: copy_from_user - struct with pointers

六眼飞鱼酱① 提交于 2019-12-19 16:05:47
问题 I've implemented some kind of character device and I need help with copy_ from_user function. I've a structure: struct my_struct{ int a; int *b; }; I initialize it in user space and pass pointer to my_struct to my char device using 'write' function. In Kernel's Space character device 'write' function I cast it from a *char to this kind of structure. I alloc some memory for a struct using kmalloc and do copy_from_user into it. It's fine for simple 'int a', but it copies only pointer (address)

Linux Kernel: copy_from_user - struct with pointers

て烟熏妆下的殇ゞ 提交于 2019-12-19 16:05:24
问题 I've implemented some kind of character device and I need help with copy_ from_user function. I've a structure: struct my_struct{ int a; int *b; }; I initialize it in user space and pass pointer to my_struct to my char device using 'write' function. In Kernel's Space character device 'write' function I cast it from a *char to this kind of structure. I alloc some memory for a struct using kmalloc and do copy_from_user into it. It's fine for simple 'int a', but it copies only pointer (address)

Why can't I find cfgmgr32.lib in the Windows SDK?

允我心安 提交于 2019-12-19 03:44:20
问题 I'm trying to use the Configuration Manager API, e.g., CM_Get_Device_ID. The documentation says to link to cfgmgr32.lib . However, when I do this, I get an error message from the linker: Error 1 error LNK1104: cannot open file 'cfgmgr32.lib' I can't find cfgmgr32.lib anywhere in the Windows SDK. If I leave out cfgmgr32.lib I get unresolved external symbol errors. How can I use the Configuration Manager API? 回答1: If the version of the Windows SDK you are using does not contain cfgmgr32.lib ,

Epson OPOS ADK for .NET drivers for Windows 7

耗尽温柔 提交于 2019-12-18 18:03:07
问题 Has anyone used Epson OPOS ADK for .NET for Windows 7. I tried to install Windows Vista drivers on Windows 7 since there are none available for Windows 7, but it did not work. Please share any suggestions or ideas that might have worked for you. I am using a TM-88IV receipt printer. 回答1: It might be easier to use a generic text printer driver. Some of those specific OPOS drivers hog up CPU resource (either they are buggy or badly written). By using a generic text printer driver, you can send

How to read from USB without any driver?

前提是你 提交于 2019-12-14 03:54:58
问题 We are creating small system which has GPS receiver and PC. We want to test my GPS receiver, We do not want to go for a driver on the first go. First I would like to test my circuit works or nor. GPS IC has been set to output NMEA sentence. We want a program which just reads data from USB port and print it on the screen. Can we write something like this easily ? Do we have any open source tool which will achieve this purpose ? Platform : Windows 7 回答1: All devices need a driver, so I'm going

samsung mobile mtp device failed to install

被刻印的时光 ゝ 提交于 2019-12-14 02:43:34
问题 I am trying to test my android application on a samsung s2 phone with android version 4.0.3, I downloaded the usb driver from the official website, but the program does not detect the phone, returning a message telling me that samsung mobile mtp device failed any help please? 回答1: Hi I have followed the Exact steps from Link : http://androidforums.com/samsung-galaxy-s2-international/559858-samsung-mobile-mtp-device-cannot-installed.html Here are steps : (for Windows specific instructions):