Re: A design problem related to drivers and/or application (single instance)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Depending on what you are doing, you can either create a user-mode DLL (with
a shared memory area if needed to have a single data set), or a kernel mode
driver. The driver will either need to use calls such as ZwCreateFile and
ZwDeviceIoControl, or else send IRP's to the desired device directly.

Use the user-mode DLL if possible. First it will keep code out of the
kernel, where a single mistake will can wipe out the system. Second, if you
are going to have a kernel mode driver, you are going to have to do a lot of
things not directly related to your problem, to make the driver solid and
keep the system performing well. Third, from your questions you have not
worked in the kernel, this will not be a step to take lightly, assume 6
months to a year to learn things well enough to get this right.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply





"Arsalan Ahmad" <arsal__@xxxxxxxxxxx> wrote in message
news:ulE0jzS5FHA.476@xxxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> I am building a driver (lets name it A) which is to be used by different
> applications. The design constraints are such that there will be only one
> instance of A which will be accessed by all the applications using it and
> this is the only reason because of which I am making it a kernel level
> driver. From this A, I have to open another kernel level driver (lets name
> it B) using CreateFile() and I have to send some IO controls to B using
> DeviceIoControl(). Is it possible for me to open B from A if A it is a
> kernel-mode driver? And if yes then can I use normal functions like
> CreateFile() and DeviceIoControl() or do I have to rely on some other
> functions?
>
> If its not possible for a kernel level driver to open another kernel level
> driver then is it possible that I could make A a user-mode driver instead
> of kernel-mode driver? and if yes how can I do this?
>
> If its not possible for me to develop A as a user-mode driver then what
> other approaches I can use so that there will be only one instance of A
> that will be used by all the client applications.
>
> I am using WinXP.
>
> Thanks,
>
> Arsalan
>
>
>


.



Relevant Pages

  • Re: 2.6.30-rc4 kernel
    ... I think there may be a problem with the 2.6.30 kernel that is ... # Generic Driver Options ... # PCI IDE chipsets support ... # Other IDE chipsets support ...
    (Linux-Kernel)
  • 2.6.30-rc4 kernel
    ... kernel panic - not syncing: ... # Generic Driver Options ... # PCI IDE chipsets support ... # Other IDE chipsets support ...
    (Linux-Kernel)
  • [PATCH 18-rc2] Fix typos in /Documentation : N-P
    ... Again, if you're not gonna do synchronization with disk drives (dang, ... -the kernel. ... There are two options specific to PSX driver portion. ... The driver uses the settings from the EEPROM set in the SCSI BIOS ...
    (Linux-Kernel)
  • Re: PROBLEM: kernel BUG at drivers/media/video/em28xx/em28xx-video.c:891
    ... I am using a Pinnacle Dazzle DVC100 Rev 1.1 USB frame grabber card, and each time I stop capturing video the driver crashes. ... This happens both in an unpatched 2.6.37 kernel and in the debian 2.6.32-5 kernel. ... em28xx driver crashes and usb subsystem hangs when video capturing stops. ...
    (Linux-Kernel)
  • Re: pc300too on a modern kernel?
    ... the PCI slot. ... I modified the driver as follows: ... Booting paravirtualized kernel on bare hardware ... Handle 0x0000, DMI type 0, 24 bytes ...
    (Linux-Kernel)