problem about device-driver-Collection of common programming errors


  • whatisinaname
    visual-c++ driver device-driver winddk nt-native-api
    I am building a driver and i want to read some files. Is there any way to use “ZwReadFile()” or a similar function to read the contents of the files line by line so that i can process them in a loop.The documentation in MSDN states that :- ZwReadFile begins reading from the given ByteOffset or the current file position into the given Buffer. It terminates the read operation under one of the following conditions:The buffer is full because the number of bytes specified by the Length parameter has

  • Roman R.
    c++ webcam directshow device-driver winddk
    I want to develop a virtual webcam driver which from User mode I’ll pass image to it and it will display as webcam output. I don’t want to use DirectX filter and CSourceStream etc. Because they don’t work on some programs which doesn’t use DirectX for capturing webcam image. I have to write a kernel mode device driver so.Any ideas? I tried testcap from DDK samples, but it doesn’t process image from user mode and doesn’t get any input, just it displays 7 colors in webcam…Any help would be great

  • Inductiveload
    osx memory-management device-driver kext
    I have written a device driver kext for a hot-plug SCSI device, based somewhat on Wagerlabs code (using a driver-user client-application model) and everything works. The only remaining concern is that the driver appears not to be consistently freed, especially if the application crashes. For example, when I try to unload the kext, even with the device disconnected and the application closed, there are still outstanding instances of the driver and user client (with the driver generally outnumberi

  • Warren P
    windows-7 device-driver crash-dumps nt-native-api
    I am experiencing a crash in an application, that is crashing windows 7, but not in the traditional “blue screen of death” crash, that happens when device drivers or other kernel-space processes crash the whole system, but rather, I am seeing a lock-up of all user-space processes. Here is the state of the machine:(1) Windows mouse movement is still responding, and Aero composition layer is still working (certain mouse over effects in explorer still work), but no win32 process is working, and th

  • ThinkingStiff
    language-agnostic device-driver wdk winddk
    I just installed the Windows Driver Kit for XP – Windows 7 and this may come as a silly question, but what is the difference between a “free build” and a “checked build”?PS: I’m not a driver developer, I installed it merely to check some header files for P/Invoke.

  • WIN_SOM_LIV
    windows device-driver drivers
    I made a device driver. But my system crashed at the moment when it was deleting the device object. I think the symbolic link was deleted and it crashed after it was trying to delete the device as I can’t see the symbolic link in the Global. How do I delete this device now. It also gives me a error popup(system cannot find the file specified Device\Mydriver) when I try to open the listed Mydriver under devices from Winobj.I tried starting the driver’s service again. I do get a handle back when

  • ray pixar
    c open-source device-driver kernel-programming
    Are there any open source C Library (not c++) for Windows Driver Development ?I am developing a network device driver that need some functionality such as RegEx, string manipulation, Object Oriented by C and XML and so on…thanks.

  • johnflan
    operating-system kernel device-driver
    I see that kernel mode drivers are risky as they run in privileged mode, but are there any monolithic kernel’s that do any form of driver/loadable module sandboxing or is this really the domain of microkernels?

  • sana
    windows crash device-driver
    I am writing a PCIe device driver. With PCIe I have a storage device connected. I have allocated a buffer in memory using malloc() which I use to transmit data to and receive from my hardware. The buffer area is locked and the physical addresses of the locked pages are passed to the DMA, I have in my hardware. DMA uses physical addresses for data transmission to/from device. The transmission of data to storage device is working fine, that is whatever data I have in memory buffer is transmitted c

  • larsmans
    c linux-kernel device-driver memcpy
    I’m trying to write a Linux device driver. I’ve got it to work really well, until I tried to use “memcpy”. I don’t even get a compiler error, when I “make” it just warns me: WARNING: “memcpy” [/root/homedir/sv/main.ko] undefined!OK and when I try to load via insmod, I get on the console:insmod: error inserting ‘./main.ko’: -1 Unknown symbol in moduleand on dmesg:main: Unknown symbol memcpy (err 0)I include the following:#include <linux/module.h> #include <linux/moduleparam.h> #includ

  • Thomas Owens
    java operating-system device-driver
    IntroductionI heard something about writing device drivers in Java (heard as in “with my ears”, not from the internet) and was wondering… I always thought device drivers operated on an operating system level and thus must be written in the same language as the OS (thus mostly C I suppose)QuestionsAm I generally wrong with this assumption? (it seems so) How can a driver in an “alien” language be used in the OS? What are the requirements (from a programming language point of view) for a device d

  • Ed.C
    windows delphi winapi delphi-2010 device-driver
    Hoping to find somebody that has experience with services in windows.I am trying to use the NdisProt driver for ethernet adapters in Delphimy_Handle := CreateFile(PChar(‘\\.\NdisProt’),GENERIC_WRITE or GENERIC_READ, 0, nil,OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);(have tried with \\.\\NdisProt too)After execution my_Handle always has the value ‘4008’ decimal and GetLastError always returns 0If I try to read or write to the file I get acces violation, anybody knows why I’m getting this unwanted b

  • Chris Jester-Young
    linux module device-driver
    I have three Linux kernel modules (*.ko files). They have circular dependencies like this:mod1.ko uses functions exported by mod3.ko mod2.ko uses functions exported by mod1.ko mod3.ko uses functions exported by mod1.ko and mod2.koI cannot load the first mod1.ko file because of “Unknown symbol” error. I also tried two other methods but I got the same error:load all modules at a timeinsmod mod1.ko mod2.ko mod3.koPut these files in /lib/modules/kernel_version/my_modules, and rundepmod kernel_versio