driver

Force windows video driver reload. Is it possible at all?

泪湿孤枕 提交于 2020-01-03 15:55:29
问题 Some drivers use parameters written in the registry to configure themselves when they get loaded at boot time. I can modify those values and then reboot, but I would like to know if it is possible to force the driver reload, making the changes effective without rebooting. Specifically, I am talking about the video driver (nvidia). I read somewhere, that calling through pINvoke() [User32.ll]::ChangeDisplaySettings() with a 640x480x8bits resolution,(which is so low that it should not be

Is DMA synchronous in network card drivers?

浪尽此生 提交于 2020-01-03 05:58:09
问题 My understanding is that when a NIC adapter receives new packets, the top half handler uses DMA to copy data from the RX buffer to the main memory. I think this handler should not exit or release the INT pin before the transmission is completed, otherwise new packets would corrupt the old ones. However, DMA is generally considered asynchronous and itself requires the interrupt mechanism to notify the CPU that data transmission is done. Thus my question, is DMA actually synchronous here, or

Rescan device tree for hardware changes during Driver installation

♀尐吖头ヾ 提交于 2020-01-02 17:35:07
问题 I'm using InstallShield to install my application, a driver and a service. I need to install the plug-N-play driver only if it's hardware ID was found in the device manager. The driver installation is done using DPInst.exe. My problem, is that a user can sometimes manually uninstall the driver (After it was installed or even uninstall the "Unknown driver" under "Other devices" ) and then I can't find the hardware ID in the device tree, although the device is plugged. If I rescan the device

run a certain code while it detects something python

前提是你 提交于 2020-01-02 14:56:53
问题 This code is used to play an alarm if it detects the driver is drowsy if args["alarm"] != "": t = Thread(target=sound_alarm, args=(args["alarm"],)) t.daemon = False t.start() The whole code looks like this: if ear < EYE_AR_THRESH: COUNTER += 1 # if the eyes were closed for a sufficient number of # then sound the alarm if COUNTER >= EYE_AR_CONSEC_FRAMES: # if the alarm is not on, turn it on if not ALARM_ON: ALARM_ON = True # check to see if an alarm file was supplied, # and if so, start a

programmatically installing NDIS filter driver

ⅰ亾dé卋堺 提交于 2020-01-02 09:55:12
问题 I am trying to write C++ code programmatically installing NDIS 6.0 lightweight filter driver. After reviewing WinDDK, online examples and MSDN documentation I ended up with the code sample below. (Error handling is skipped for clarity) The problem is that INetCfgClassSetup::Install always returns error 0x8004a024. (I could not find the error code in header files.) Manual installation of the driver using the same .inf file works just fine. The Bindview sample from WinDDK installs the driver

programmatically installing NDIS filter driver

流过昼夜 提交于 2020-01-02 09:55:09
问题 I am trying to write C++ code programmatically installing NDIS 6.0 lightweight filter driver. After reviewing WinDDK, online examples and MSDN documentation I ended up with the code sample below. (Error handling is skipped for clarity) The problem is that INetCfgClassSetup::Install always returns error 0x8004a024. (I could not find the error code in header files.) Manual installation of the driver using the same .inf file works just fine. The Bindview sample from WinDDK installs the driver

Retrieve IP Address of the Default Printer Driver in UWP

笑着哭i 提交于 2020-01-01 19:59:32
问题 We have a requirement to get the printer IP Address configured in the default printer driver in Control Panel in our UWP app. I was able to retrieve the " System.DeviceInterface.PrinterPortName " by fetching interface class GUID and passing this above property for retrieval. But I couldn't get "System.Devices.IpAddress" similarly. Code pasted below for PortName. I badly need the IP address as the port name is user's choice and could be modified to any name removing the IP address. Kindly help

Why NdisFRegisterFilterDriver failed with NDIS_STATUS_FAILURE under Windows 8?

牧云@^-^@ 提交于 2020-01-01 19:51:16
问题 everyone. I am developing a NDIS 6 filter driver (LWF). the NdisFRegisterFilterDriver call in the DriverEntry routine failed with NDIS_STATUS_FAILURE. This only happens to Win8 x86, the driver can normally run under Win7 x86. It is so strange. I have seen this thread but no use: Why does NdisFRegisterFilterDriver return NDIS_STATUS_FAILURE? Here's my DriverEntry routine and the inf file. _Use_decl_annotations_ NTSTATUS DriverEntry( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING

minifilter vs. API Hooking for file system operations monitoring \ filtering

别等时光非礼了梦想. 提交于 2020-01-01 19:41:09
问题 I need to develop an application that monitors, and potentially filters (rejects the calls), file operations. It appears that developing a minifilter is the "standard" solution. another potential method is using API hooks. are these relevant solutions? (I read in some places the an API hook may not be suitable - but no explanation was given) are there other options? 回答1: API hooking (at least in kernel space) is essentially not supported by microsoft. On x64 (starting from Vista and up)

Call a userspace function from within a Linux kernel module

佐手、 提交于 2020-01-01 11:44:06
问题 I'm programming a simple Linux character device driver to output data to a piece of hardware via I/O ports. I have a function which performs floating point operations to calculate the correct output for the hardware; unfortunately this means I need to keep this function in userspace since the Linux kernel doesn't handle floating point operations very nicely. Here's a pseudo representation of the setup (note that this code doesn't do anything specific, it just shows the relative layout of my