device-driver

Programmatically enabling/disabling hardware device

Possible Duplicates: [.NET] How do I disable a system device? Win32 API function to programatically enable/disable device Is there a way, in C#, to programmatically disable and re-enable a device? I'm looking for essentially the same functionality that occurs when you go into device manager and right click on a device and di...

Programming USB in embedded system for sending some data to host for printing

I have been tasked with writing a USB driver for our embedded software to send raw data to Host. This will be used to send some logging data to host. We are using iMX31 litekit for development. From the documents that I have read on USB, my understanding is that the embedded device will be in device mode only. Also it will only be commu...

A device which is not opened by WinObj

RtlInitUnicodeString(&sddl, _T("D:P(A;;GA;;;SY)(A;;GA;;;BA)(A;;GA;;;BU)")); status = IoCreateDeviceSecure( pDriverObject, sizeof(DEVICE_EXTENSION), pDeviceName, FILE_DEVICE_DISK, 0, FALSE, &sddl, NULL, &pDeviceObject ); // Succeed IoCreateSymbolicLink(...) // Succeed And I tried to open in user...

Some APIs that support the NT namespace absolute path of the format "\Device\Xxx"

In this document, http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#paths To make these device objects accessible by Windows applications, the device drivers create a symbolic link (symlink) in the Win32 namespace, "Global??", to their respective device objects. For example, COM0 and COM1 under the "Global??" subdirectory ...

How to share source code when we develop Windows device drivers

TARGETNAME=OneOfMyDrivers TARGETTYPE=DRIVER INCLUDES=..\inc;..\..\Common\Crypto TARGETLIBS=$(SDK_LIB_PATH)\wdmsec.lib SOURCES=OneOfMyDrivers.c \ OneOfMyDrivers.rc\ ..\..\Common\Crypto\aes_modes.c \ ..\..\Common\Crypto\aescrypt.c \ ..\..\Common\Crypto\aeskey.c \ ...

How to identify a device programatically if a sound device or not if no driver exists for it

Is there a way to identify a device as sound device or not while there is no drivers for it! DirectX only enumerates device with drivers! The programming language might be c# or scripts! Thanks ...

Problems getting a device driver to load at startup - WM6.1

Hi, Our embedded systems programmer has developed the shell of a virtual serial port driver for our mobile hardware, and I have been filling in the methods to get it to work. The driver does work as expected, it simulates a COM port for a USB device that is spewing out NMEA strings (GPS data). I type WM6 for short, but the OS is WM6.1 ...

Is there a way to directly query the file system device driver for listing out the files in a directory ?

Hi, I'm currently using FindFirstFile, FindNextFile API to recursively iterate through directories for searching files based on a given criteria. I noticed that "dir /s" command gives better performance than my program. I'm tried checking out the events in process monitor and it looks like cmd.exe/dir command is directly querying the di...

Error of screen resolution using PrimaryMonitorSIze or Caps

Hi, I have serious problems to detect screen resolution under vista64. I have 2 methods using C# to find the resolution backside of a webpage. Client side resolution using javascripting is fine but backside nothing is correct. 1/ int deskWidth = SystemInformation.PrimaryMonitorSize.Width; return 1024. 2/IntPtr hdcSrc = User32.GetDesk...

Code-Signing on WM6.1 Drivers

I've already asked similar question on this issue on stack overflow already, but I believe this part of the issue can be separated into a new question. I've not done mobile development before so the use of signing and certificates is a new concept to me, and for all the reading of topics I have done, its not really improved my knowledge...

how to give page-auto-cutter for Dotmatrix(EPSON-LX300) printer..?

hi, am designing invoice for a sale Shop. so am using 'printLine' function to design my Invoice and printing it by BATCH execution. Now my Invoice works(Prints) fine but, IN my EPSON LX300 printer after printing the INVOICE it is going to the next sheet (B4 type sheet).(STOP THE PAPER AFTER THE Last-Line of MY INVOICE PRINTS) its a...

Are there any open source C Library (not c++) for Windows Driver Development ?

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. ...

Preprocessing on the sources file of device driver

C_DEFINES=$(C_DEFINES) -D_PRODUCT_A //C_DEFINES=$(C_DEFINES) -D_PRODUCT_B #ifdef PRODUCT_A // <- I want to do doing like this in a sources file. MOST_SOURCES= a.c b.c productA.c #elif PRODUCT_B MOST_SOURCES= a.c b.c productB.c #endif Is there a proper syntax? ...

We're using winusb driver for our device, but it doesn't work on Windows 7 x64

What do we do wrong? Inf file: ; Adapted from the example INF in the Microsoft document "How to Use WinUSB to Communicate with a USB Device" [Version] Signature = "$Windows NT$" Class = NTMR ClassGUID={6E76E110-A9AC-46fb-AD33-1F0444672821} Provider = %ProviderName% DriverVer=05/20/2009,1.0.0 CatalogFile=ti_0451_9001_ia64.cat ; ======...

SpinLock read_lock_irqsave flags attribute

Hi, This is regarding the void spin_lock_irqsave(spinlock_t *lock, unsigned long flags); function call. It is mentioned that previous interrupt state is stored in flags and we can restore them by passing this to spin_unlock_irqrestore function. But I did not get how flags which is passed by values captures the previous interrupt state...

How to get the major number from device file

Is there any C system call for getting the major number and minor number from a device file in solaris? ...

Error compiling the Device-Driver Source Code in Linux

I am writing a simple device driver in C in Ubuntu 8.04 and when I compile my C code: #define MODULE #include <linux/module.h> int init_module(void) { printk("<1>Hello, world\n"); return 0; } void cleanup_module(void) { printk("<1>Goodbye cruel world\n"); } it gives the error: "Module.h not found", to handle which I searched for mod...

Concurrent I/Os with same handle

Thread1 SetFileInformationByHandle(fileHandle, ...); Thread2 SetFileInformationByHandle(sameFileHandleWithThread1, ...); Thread1's function has been called first. and Thread2's function has been called in another thread. if the function's duration is 10 seconds -the device driver sleeps in the dispatch routine, will the se...

win 7 hangs on restart because of tascam audio interface

In xp, my Tascam US 122 usb audio interface works fine. On my windows 7 computer the device works, however when i restart/shutdown it hangs at the "shutting down" screen forever. If the usb cable is removed prior to initiating restart/shutdown then everything goes fine, the computer restarts as normal. This is a known problem, runnin...

Abstraction layers in device drivers

Hi, in my project I need to work with device drivers, but have a hard time to understand the naming, scope and function of the abstraction layers. As I see the main layer is HAL - "hardware abstraction layer". What are the clients of HAL, whom is HAL interfacing? ...