driver

Writing a Windows Printer Driver

这一生的挚爱 提交于 2019-12-28 10:11:10
问题 I want to write a application in C++ or C# that will behave as a printer driver when installed. It will be available in the drop down list in Print dialog but instead of printing it will call into my code. I think there may be some interfaces that Windows provide to write printer drivers. 回答1: Windows provides loads of interfaces. Do you know what sort of a printer driver you want to write? At present, Windows supports three flavors of printer drivers -- PostScript, Unidrv and XPSDrv (the

How to call DeviceIoControl to retrieve the amount of memory it needs?

陌路散爱 提交于 2019-12-25 14:00:31
问题 I'm trying to call DeviceIoControl(IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS) API, as shown here, but I need it to first "tell me" how much memory it needs (unlike the code I linked to.) So I call it as such: //First determine how much data do we need? BYTE dummyBuff[1]; DWORD bytesReturned = 0; if(!::DeviceIoControl(hDevice, dwIoControlCode, lpInBuffer, nInBufferSize, dummyBuff, sizeof(dummyBuff), &bytesReturned, NULL)) { //Check last error int nError = ::GetLastError(); if(nOSError == ERROR

Calling spi_write periodically in a linux driver

自作多情 提交于 2019-12-25 07:48:58
问题 I am writing a driver for an LCD display. According to the application note, I need to write a dummy SPI write to the command periodically to maximize its contrast. To accomplish this, I set up a timer and attempt to write the contrast-maximizing 2-byte dummy command from the timer handler. However, something goes wrong because the spi_write function causes a complete kernel crash with the following error: BUG: scheduling while atomic: swapper/1/0/0x00000102 Based on the following post: How

Minispy driver - user mode call

我怕爱的太早我们不能终老 提交于 2019-12-25 07:48:10
问题 After hours of spending on installing drivers, I began looking at minispy driver: Windows-driver-samples/filesys/miniFilter/minispy/ I am trying to catch all the calls of user to open files. I was trying to do it with all the parameters it prints (like Opr, Major Operation...) but I can't filter it in exact way. How can I filter only the user calls (open file)?? How can I determinate within the code if the user called the transaction? Thank you very much for your help. 回答1: look for FLT

Cassandra driver(datastax) load balancing with TokenAwarePolicy

北慕城南 提交于 2019-12-25 07:27:11
问题 My question is a follow up of this topic : Cassandra load balancing with TokenAwarePolicy and shuffleReplicas I'm encountering some issues regarding the TokenAwarePolicy that I don't understand. Cluster configuration : 3 nodes Replication factor = 3 Load balancing policy : new TokenAwarePolicy(new RoundRobinPolicy(), false) Consitancy level (Reads/Writes) : ONE Shuffling replicas is set to false on purpose. But the thing is that I'm encountering consistency problems when reading datas in my

Mini-Filter intercept drag & drop file(s) to disk?

依然范特西╮ 提交于 2019-12-25 06:58:02
问题 I am developing a mini-filter to intercept files and get the name of files which are dragged & dropped to a specific disk and get the file names. If I drag & drop a file, I can get this file name and intercept it successfully (That's mean this file is not created on disk). If I drag & drop multiple files, I can only get the first file name and other is not. But when I open the disk, I don't see any file here (That's mean Mini-Filter intercept them successfully). So I can not get the file

WinCE: Debug version works, Release version crashes while reading from stream device driver

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 04:54:33
问题 i am creating a Windows CE 6.0 in Visual Studio 2005 with Platform builder. I integrated a stream device driver (via USB HID). I also have a small application that opens a connection to the device and reads data from it. When i build a Debug-Version of this Windows CE 6.0 and debug it on the device i can start the application and the communication to the device works fine. Now i build a Release-Version (no changes of Sources!) of the Windows CE 6.0, run it on the device and start the

How to apply an effect on screen image in Windows on the fly?

痴心易碎 提交于 2019-12-25 01:29:42
问题 I'm developing a Windows application that needs to apply an effect on screen image. More specifically, I need to do the following: grab a screen image, apply a gaussian blur on it, and display it on the screen. Something similar to f.lux, only in my case the effect applied is different. Since I'm new in Windows development, I'd like to know what is the recommended way to do it? What libraries/frameworks should I use? Can you point to some code samples of similar applications? Thanks! 来源:

Why the bson java implementation uses 4 bytes inc field?

余生长醉 提交于 2019-12-24 16:42:55
问题 In BSON Java implementation, an ObjectId is composed by 3 pieces (source code: http://grepcode.com/file/repo1.maven.org/maven2/org.mongodb/mongo-java-driver/2.9.0/org/bson/types/ObjectId.java#ObjectId.%3Cinit%3E%28int%2Cint%2Cint%29 ): XXXX XXXX XXXX ------------------------- time machine&pid inc (each X represents a byte) this is a bit different from what's described in document (doc: http://docs.mongodb.org/manual/core/object-id/ ) XXXX XXX XX XXX -------------------------- time machine pid

Usb Driver on 64bit Windows

混江龙づ霸主 提交于 2019-12-24 16:24:25
问题 I have a pretty generic 64bit driver based on bulkusb.sys in WDK. It's been working for years with an embedded program, but now it is needed to work on Vista 64. From all the documentation I've tried to look through there doesn't seem to be anything affecting it, except compiling it for the 64bit environment, and yet when I compile it with the AMD64 build environment, I get "driver not intended for this platform" error message when it's trying to open the sys. What could be the solution for