driver

'magic' value Device Driver

和自甴很熟 提交于 2019-12-11 19:32:51
问题 what is the 'magic' value in tty_driver struct struct tty_driver { int magic; /* magic number for this structure */ struct kref kref; /* Reference management */ struct cdev cdev; struct module *owner; const char *driver_name; .... .... I don't understand why is it called 'magic' 回答1: Magic numbers often refer to specific constants that identify a structure, file type or software. In this case, the tty_driver's magic number is apparently always defined like this: #define TTY_DRIVER_MAGIC

android no compatible devices found

那年仲夏 提交于 2019-12-11 19:18:00
问题 I've just installed the android sdk with eclipse and imported a project. but when i try to run it on my phone it doesn't run "no compatible devices" error is displayed. a generic "android" device is displayed under "other devices" in manage devices and there's the error icon saying that there's no driver installed, if i try to install google usb driver it says that no compatible driver where found. it's strange because i've other 2 pcs and the phone works well. obviously usb debugging is

UNICODE_STRING to std String Conversion

ぐ巨炮叔叔 提交于 2019-12-11 18:39:14
问题 I am using pFileObject->FileName to get the name of file opened in a kernel mode filter driver.This file name returned by this is in the form of UNICODE_STRING . I want to convert it into std String . What is the method ??? Please do provide example if possible... Below is the code NTSTATUS FsFilterDispatchCreate( __in PDEVICE_OBJECT DeviceObject, __in PIRP Irp ) { PFILE_OBJECT pFileObject = IoGetCurrentIrpStackLocation(Irp)->FileObject; DbgPrint("%wZ\n", &pFileObject->FileName); return

Touch screen driver for windows 7 , multiple monitor

天涯浪子 提交于 2019-12-11 17:59:20
问题 I am developing a touch screen driver for windows 7 , it works fine when a single display is attached but when i attach a secondary display the touch inputs get mapped only to the primary display . Is there any way in which i can map the touch inputs to the secondary monitor ? Any inputs or pointers will be greatly appreciated ?. 回答1: As far as I know this is not possible in Windows 7, but according to MSDN should be possible in Windows 8: HID Descriptor for Digitizers Starting with Windows 8

Windows IoT error on driver install: Could not start update, (0x8024A10F)

烂漫一生 提交于 2019-12-11 17:49:29
问题 I created .cab package using a manual: https://docs.microsoft.com/en-us/windows/iot-core/learn-about-hardware/peripheraldrivers I copied the file, staged the update, but get error on commit: [192.168.1.17]: PS C:\Data\USERS\DefaultAccount\Documents> applyupdate -stage .\Contoso.Drivers.oem6.cab Microsoft (C) C:\windows\system32\ApplyUpdate.exe INFO: Start staging .\Contoso.Drivers.oem6.cab INFO: UpdateStateIdle INFO: Check status... INFO: No past issues to report INFO: ProgressStateNone: 0

Develop a Windows Location Sensor in C#

浪尽此生 提交于 2019-12-11 17:45:34
问题 Hello fellow developpers, I need to develop an application that would get geographical coordinates from different sources and then update the Windows system location with these. (These sources could be NMEA streams, web service, or even manual inputs). If I understood correctly, based on what I read on the Microsoft website (here and here) and over the Internet, I would need to develop my own Windows sensor driver to update this location of the system. The goal is then to use the very simple

How can I make UMDF driver write to file?

夙愿已清 提交于 2019-12-11 17:43:48
问题 I want to log a string to an external file in my UMDF driver. For example // create/open file CString filePath = _T("C:\\Metric.csv"); CHandle hFile(CreateFile(filePath, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL)); This returns 5 (Access Denied). Is this because UMDF driver cannot access files or resources that require user credentials? If so, which dir can i possibly create/modify a csv file. 来源: https://stackoverflow.com/questions/54919618/how-can-i-make-umdf-driver

How can I install this driver?

允我心安 提交于 2019-12-11 17:26:26
问题 I downloaded the IOCTL sample driver from MSDN. I am trying to run an executable in this example to load the driver from its SYS file, but I get this error when it calls StartService: StartService failure! Error = 577 Unable to install driver. ControlService failed! Error = 1062 577, according to error code documentation, means: ERROR_INVALID_IMAGE_HASH 577 (0x241) Windows cannot verify the digital signature for this file. A recent hardware or software change might have installed a file that

IOCTL Driver SystemBuffer always NULL

≯℡__Kan透↙ 提交于 2019-12-11 15:59:30
问题 I have a simple struct which I would like to pass to my driver. Here is the struct: typedef struct readStruct { ... } ReadStruct, *pRreadStruct; Here is my usermode application: DWORD dwReturn; readStruct reader{ ... }; WriteFile(hDriver, (LPCVOID)&reader, sizeof(ReadStruct), &dwReturn, NULL); Here is my driver code, it always returns NULL to the readStruct. What am I doing wrong? PIO_STACK_LOCATION pIoStackIrp = NULL; pRreadStruct readStruct; pIoStackIrp = IoGetCurrentIrpStackLocation(Irp);

Receiving error (Code 52) from a signed driver

女生的网名这么多〃 提交于 2019-12-11 14:42:51
问题 Sorry about the length but I wanted to get as much detail as I could in. TL;DR: A driver file I signed using signtool & Verisign is still giving a Code 52 error when I install it. I've created an INF file for a device which uses usbser.sys driver file, however even though I've signed it, I'm having trouble installing it on the target machine, in particular, I'm getting the following error... Windows cannot verify the digital signature for the drivers required for this device. A recent