Modem Device Class under Enum\Root:Unable to Communicate to COM Port
Hi All,
I have written a lower filter Modem Class Driver that attaches to all
the Modem Devices on a system.It behaves just like serial.sys.
It works fine with all modems,except a certain LG Phone that connects
via the Serial Port.In this case,I am unable to communicate with the
COM Port (COM1) below and get the same message : "Port Disconnected"
(C000037) in my NT Status codes whenever I try to send a Set Wait Mask
or Get Modem Status via my driver using IOCTLs.
On inspecting the device tree I noted that this phone installs as
mdmgen288 ,under the Root/Modem Class.
It also has its LowerFilters set to ROOTMODEM.
Anyone has any ideas on why this is not working?
I am stumped.I went through other google groups/the web/ddk for more
information and I am really at my wits end.
Thanks in advance
Jack Tag: Using inf file to limit installation to XP only Tag: 57534
UNIDRV IOemUni::ImageProcessing Question
I am confused about how to use the bBlankBand variable in the
ImageProcessing function. When the print driver is banding, bBlankBand
will be 1 for the first band and then 0 for the remaining bands. The
documentation says that if it is 0 then the data is invalid. But I
never receive any further calls to ImagePricessing with bBlankBand set
to 1. As a result I only get the top portion of the image. Do I have to
do something else to get the remaining bands rendered? I am using the
oemdll example in the DDK. When the driver is not banding then I get
the whole image in one shot but higher DPI's force me to deal with
banding in ImageProcessing which I can't seem to get to function
correctly.
Thanks,
Bob Herzberg Tag: Using inf file to limit installation to XP only Tag: 57508
IoConnectInterrupt
Hello All,
My driver testing has progressed to a multi-processor system, and now
IoConnectInterrupt fails with status 0xc000000d (invalid parameter). I am
using XP w/SP2. This all worked on a single processor system.
The parameters I get in the start device IRP are:
vector: 0xa4
irql: 9
affinity: 0xa4
mode: 3
shared: FALSE
I think the bad parameter is the affinity. I double checked that I was
getting vector from u.Interrupt.Vector, and affinity from
u.Interrupt.Affinity.
Is there some magic I need to do to connect an interrupt on a
multi-processor machine?
Thanks! Tag: Using inf file to limit installation to XP only Tag: 57507
DDK function to disable interrupt?
Hi
Are there any ways from DDK (API) to disable a particular interrupt?
thanks
--
Robert Tag: Using inf file to limit installation to XP only Tag: 57501
Windows Update causing problems with Cypress FX2 development board
Hi all,
I would like to warn the Windows Cypress FX2 USB development community about
and bring to Microsoft's attention a very annoying problem that I had this
morning.
I plugged in my Cypress FX2 development board (CY3681) and Windows went
searching for drivers for it, because between today and the last time I used
the board I had uninstalled the USB 2.0 host controller in order to force
renumeration of previously-installed USB devices on my system the next time I
plug them in. (This is something I do from time to time during development
to make sure that my development devices enumerate properly.)
Anyway, Windows found the proper .INF file and installed the correct
driver... then promptly went ahead and installed a DIFFERENT driver, one for
a 'Sperling USB HDTV' device! I assure you I have never installed any USB
HDTV drivers on my system. Ever.
I went looking through the .INF files and found an entry in one of the
oem##.inf files (in my case oem18.inf) there was an entry with the SAME VID
and PID as the development board! It looks like some hardware developer was
building a prototype with the FX2 sans EEPROM and let the development board's
VID and PID slip into the .INF file.
I removed the offending entry from the .INF file, did the aforementioned
uninstall trick on the USB Host Controller, plugged in my development board,
and got the SAME RESULTS. This time, however, the offending entry had been
written to a brand-new .INF file. I tried removing the .INF file altogether
the second time and the same thing happened. Many different combinations
caused the same thing to happen. Whatever I tried to do to force that entry
to be gone was undone.
I had a colleague look at it and he suggested that it might be picking up
the information from Windows Update. So I unplugged my network cable,
uninstalled the USB Host Controller again, and plugged in my FX2 board, and
it worked.
I am not really familiar with what happens with Windows Update behind the
scenes. I would first of all like to know what was happening, if in fact the
.INF file entry was getting picked up from Windows Update, and, if so, if
there's a way to prevent this in the future. (I have auto-updates turned
off, but I know my company pushes periodic updates to my machine.) Secondly,
it seems very bad to me thata vendor is shipping an .INF file with the same
VID and PID as another device from another vendor.
For reference, the entry appeared on my machine in oem18.inf. The first few
lines of the file mention USBHDTV.INF and 'This file contins installation
information for OnAir USB HDTV, An MPEG2 WDM capture driver that requires
hardware'.
Aaron Tag: Using inf file to limit installation to XP only Tag: 57493
HID Joysticks and Win98
I wrote a WDM HID minidriver to create a virtual joystick. Problem is that
the joystick does not show up in the game controller control panel app of
Windows 98. The device manager, however, shows the HID-compliant game
controller device create by my driver.
Since it works fine in Windows Me/2000/XP, I suspect that my HID report
descriptor cannot be parsed by Windows 98 (I noticed that the WinMe
implementation is somewhat picky in that regards, whereas 2000/XP takes
about anything), but I am not positive on that.
I wonder if somebody has a working report descriptor (joystick or other type
of game controller that shows up in the control panel app) that is known to
work with Windows 98 and is willing to share. I tried already many different
variations, but no fun yet. Also, any hints on that topic would be greatly
appreciated.
Karl Tag: Using inf file to limit installation to XP only Tag: 57486
Blocking PCMCIA, SCSI and IDE storage devices
Dear All,
I need to block all mass storage devices that can be connected to
PCMCIA, SCSI and IDE slots.
My current plan is to write 3 class filter drivers to PCMCIA, SCSI and
IDE and block their PnP irps.
Does there any other method so that we can block these devices (
PCMCIA, SCSI and IDE) from a single driver.
Your comments and suggestions are welcome.
regards
John Tag: Using inf file to limit installation to XP only Tag: 57484
No audio after install Win SBS 2003
Hi,
No audio when I installed Win SBS 2003 on a Gigabyte GA-8I915P Motherboard
with on-board CMedia 9880. Updated to Microsoft UAA v1.0(KB835221) before
installing CMedia. Installation completed but still no audio. Went "Test
Hardware" under Sounds in Control Panel, says "Sound hardware cannot play
sounds, Contact your vendor.". Please help.
Microsft UAA Bus Driver v5.10.0.5010 5/3/2004
CMedia HD Audio Device Driver v5.12.1.7 27/7/2004 Tag: Using inf file to limit installation to XP only Tag: 57483
Sharing Code Between Drivers and Applications
If I wanted to share a function between a driver and an application how could
I go about doing this? Is there a special type of DLL that can be shared
between the two?
Many Thanks,
Simon Tag: Using inf file to limit installation to XP only Tag: 57482
Notifications in Printer Driver
Hello All,
I developed universal mini printer driver which prints a image rather
than output to a
printer. I used a rendering plug-in and some GPD files.
I need to compress the image created. I have some existing library to
do this. I need to do some
loading and unloading of objects and other stuff at various print
states.
My question is which component should i implement to get the
notification of the following print
states: starting a job, ending job, cancelling job, start doct, ending
doc, start page, end page.
The rendering plug-in implements OEMStartDoc, OEMEndDoc, OEMStartPage,
OEMSendPage. Is this the correct component to handle my requirement?
I did not find any job related routines in rendering plug-in.
Which component should i implement for print job related status like
start,end and cancelling a
job?
Do i need to implement a print processor or print monitor?
Is it possible to implement everything in a single component?
Any suggestions would help me.
Thanks in Advance.
Regards,
Madhu. Tag: Using inf file to limit installation to XP only Tag: 57479
graphics function in windows 98SE
Hi,
Can anyone tell me about the sequence of various graphics functions being
called in windows 98 SE to draw the screen over monitor.
regards,
Andy Tag: Using inf file to limit installation to XP only Tag: 57476
Need Help
Hi,
I want to be able to get status data from my printer.
My printer is a thermal printer. Printing job is made through a mini-driver.
I think I should make my own language monitor. I 've begin to write the dll
which shows DllEntryPoint and InitializePrintMonitor2.
The code in InitializePrintMonitor2 follows :
g_Trace.Init(_T("My Language Monitor"));
g_Trace.m_bTraceEnabled = true;
g_MON.pfnAddPort = NULL;
g_MON.pfnAddPortEx = NULL;
g_MON.pfnClosePort = AX_ClosePort;
g_MON.pfnConfigurePort = NULL;
g_MON.pfnDeletePort = NULL;
g_MON.pfnEndDocPort = AX_EndDocPort;
g_MON.pfnEnumPorts = AX_EnumPorts;
g_MON.pfnGetPrinterDataFromPort = AX_GetPrinterDataFromPort;
g_MON.pfnOpenPort = AX_OpenPort;
g_MON.pfnOpenPortEx = AX_OpenPortEx;
g_MON.pfnReadPort = AX_ReadPort;
g_MON.pfnSendRecvBidiDataFromPort = NULL;
g_MON.pfnSetPortTimeOuts = AX_SetPortTimeOuts;
g_MON.pfnShutdown = NULL;
g_MON.pfnStartDocPort = AX_StartDocPort;
g_MON.pfnWritePort = AX_WritePort;
g_MON.pfnXcvClosePort = AX_XcvClosePort;
g_MON.pfnXcvDataPort = AX_XcvDataPort;
g_MON.pfnXcvOpenPort = AX_XcvOpenPort;
int nOSVersion = g_Trace.GetOSVersion();
if ( (nOSVersion == OS_WIN32_WINDOWS_95) || (nOSVersion ==
OS_WIN32_WINDOWS_98)|| (nOSVersion == OS_WIN32_WINDOWS_Me))
{
g_Trace.Log(_T("InitializePrinterMonitor2 failed : Wrong OS version"));
SetLastError(ERROR_OLD_WIN_VERSION);
return NULL;
}
if ( nOSVersion == OS_WIN32_WINDOWS_2000)
g_MON.cbSize = MONITOR2_SIZE_WIN2K;
else
g_MON.cbSize = sizeof(MONITOR2);
*phMonitor = (PHANDLE)pMonitorInit;
g_Trace.Log(_T("InitializePrinterMonitor2 succeeded"));
return &g_MON;
I can see that my Dll is loaded by the spooler because
I can read the message "My language monitor" and "InitializePrintMonitor2
succeeded" when I try to install it, but at the end of "add printer wizzard",
I receive the followed message : "The specified print monitor is unknown" and
my printer is not installed.
What is wrong ?
At this moment, all the AX_ functions are empty and return TRUE, I just want
to test
the installation of my language monitor.
Do I in the good way or not ?
Please help me.
Thanks in advance. Tag: Using inf file to limit installation to XP only Tag: 57472
Kernel mode DLL Startup
Dear List,
I read a nice article(http://www.wd-3.com/archive/KernelDlls.htm) which
gives solution to many of my problems. As described in this article I
will be exporting some functions and calling them from my other driver.
But I have some installation related queries.
* During installation, I want to start an application which will load
the kernel-dll before the actual driver. (will RunOnce key in .inf
guarantee this) or is there any other way i can do this.
--
Regards Tag: Using inf file to limit installation to XP only Tag: 57471
CM_Reenumeration_DevNoe in Win98
Sirs.
Dose Win98 support CM_Reenumeration_DevNoe function??
poly Tag: Using inf file to limit installation to XP only Tag: 57466
about iscsiprt
Hi,all:
I want to write a virtual scsi disk,and i want to attach this disk to
PDO which created by iScsiport0,but i don't know how to notify iScsiport0
there is a new device arrived,How can i notify iScsiport0?
Thanks a lot
Shumin.Xie
2005.1.11 Tag: Using inf file to limit installation to XP only Tag: 57463
StorePort routines or CreateFile/ReadFile/WriteFile
Hi,
I am trying to write a little diagnotstic program that issues bunch of ATA
commands to IDE HDD for testing purpose. I happened to find a bunch of
StorePort routines in DDK documentation, which also does read/write to the
port. I am wondering which is proper way to comminicate with ATA devices,
such as excersising ATA command, passing CDBs to the devices and configuring
DMA mode.
Thanks a lot! Tag: Using inf file to limit installation to XP only Tag: 57460
irq&irql
Hi,
I'm trying to understand irq and irql. I used softice to observe my system
and found the following:
Interrupt irq irql
A 3 4
B 4 9
Suppose When I run ISR for interrupt A(irq=4, irql=9), interrupt B comes.
From CPU point of view, B, which has a higher priority, can interrupt A. But
from Windows point of view, the irql of B is 4 which is less than current
irql of A(9). Therefore, B can't interrupt A.
What does HAL do for this case?
Thanks,
Min Tag: Using inf file to limit installation to XP only Tag: 57458
can't see TDI_SEND_DATAGRAM called
HI.... I'm analyzind a TDI filter.... I like to trace the calls going
through the filter and functions that gets called... to do so I have simple
client/server TCP and UDP apps... when Testing the TCP app I can see that
TDI_CONNECT and TDI_SEND gets called in the InternalDispatchTable....
However when Testing the UDP app I can't see the TDI_SEND_DATAGRAM called
(though app is working)..... However when Windows Services.exe runs (in the
background) TDI_SEMD_DATAGRAM is called..... why is that??????????
1. does this depends on how exactly the upper layer application makes the
socket/send call????
2. How many different ways do we have to make that call??
3. What exactly is the difference between FsContext and FsContext2 fileds
are in the File Object????
4. The EventType filed in PTDI_REQUEST_KERNEL_SET_EVENT structure returns 2
and 10... what exactly are they??
would very much appreciate your feedback. Tag: Using inf file to limit installation to XP only Tag: 57453
USB PortStatus During DispatchCreate
Does any one know what can cause the PortStatus from
IOCTL_INTERNAL_USB_GET_PORT_STATUS to NOT return USBD_PORT_ENABLED.
I'm trying to check the Port status when opening my USB Device \\Device
(pFileObject->FileName.Length == 0). Under some circumstances I get a
USBD_PORT_CONNECTED but !USBD_PORT_ENABLED. I'm trying out simply
sending a IOCTL_INTERNAL_USB_RESET_PORT in this case. But I'm curious
to try to reproduce this under a more controlled situation than just
waiting for it to occur. The only way I've been able to reproduce this
is plug/unplug/plug quickly.
Thanks for any information Tag: Using inf file to limit installation to XP only Tag: 57450
USB Host Driver
Greetings,
We are currently developing a specialized USB host controller mini-port
driver that is not UHCI, OHCI, or EHCI compliant for Windows 2K, 2003 server,
and Windows XP. The current DDK does not provide any information concerning
the interface between the Windows host controller driver (e.g., usbport.sys
under WinXP) and the minicontroller drivers (e.g., usbuhci.sys).
The design of our hardware requires that we interface to the USB host
controller stack at the USB mini-port level, so we need information about how
to create a USB mini-port driver for these different operating systems. We've
had discussions with other developers who have done this and they've told us
we need to contact Microsoft directly to obtain this information.
Could anyone please advise us how we go about obtaining this information?
Thanks,
Keith Tag: Using inf file to limit installation to XP only Tag: 57443
How do USBCAMD for USB2.0 receive over then 1 packet per SOF
Hello there,
I modify the USBCAMD from video minidrv for using usb 2.0 device. I use
bcdUSB to check the device is running on usb1.1 or usb2.0. I also modify the
USBCAMD_StartDevice(), so that usb 2.0 device can allocatebandwidth
if (bcdUSB==0x200){
USBCAMD_NUM_ISO_PACKETS_PER_REQUEST=256; //32
USBCAMD_MAX_REQUEST=4; //2
}
However, when I choice a 900*3 alternating setting, the packet receive 1
packet/1 SOF all the time. I am sure the packet that waiting for transfer is
over then 900, but why there is only packet transmitted?
I need your help:
Where is the point that the USB driver knows there exist more then 1
packet/SOF can be used? Where is the command that the driver set the packet
to be 3? Can anybody help?
Thank you!!
--
D.D. Tag: Using inf file to limit installation to XP only Tag: 57439
Driver_irql_not_less_or_equal
Hello
I have some little problem.
I Attached my device to serial port, and i configure connection but
when i try to :
irpStack =
IoGetCurrentIrpStackLocation(SmartcardExtension->ReaderExtension->SerialStatusIrp);
irpStack->MajorFunction = IRP_MJ_DEVICE_CONTROL;
irpStack->MinorFunction = 0UL;
irpStack->Parameters.DeviceIoControl.OutputBufferLength =
sizeof(SmartcardExtension->ReaderExtension->ModemStatus);
irpStack->Parameters.DeviceIoControl.IoControlCode =
IOCTL_SERIAL_GET_MODEMSTATUS;
SmartcardExtension->ReaderExtension->SerialStatusIrp->AssociatedIrp.SystemBuffer
= &SmartcardExtension->ReaderExtension->ModemStatus;
SmartcardExtension->ReaderExtension->GetModemStatus = TRUE;
status = IoCallDriver(
SmartcardExtension->ReaderExtension->AttachedDeviceObject,
SmartcardExtension->ReaderExtension->SerialStatusIrp
);
I had a BSOD - Driver_irql_not_less_or_equal, and i have no idea
why... Tag: Using inf file to limit installation to XP only Tag: 57437
how to signal an app from video miniport driver?
Hi
I have a video miniport driver and i want to signal my application
when somethign interesting happens inside that driver.
What i want to do is sort of what in pure WDM land would be said to be
as : "open the driver in asynchronous mode , and send an ioctl from
app to the driver and inside the driver do not call IoCompleteRequest
UNTIL sometihng interesting happens . In the aplication , keep waiting
on the event associated with the particular asynchronous call."
Now the problem following a similar approach in case of vidoe miniport
driver is that videoport.sys manages a strictly synchronously
serialized interface with all video miniport drivers where at the most
ONE VRP can be outstanding at any given time with a video miniport
driver.
How can i manage to solve this problem ? Should i manage it through
EVENT objects shared between user and kernel mode , and by passing the
address of the user mode EVENT object to my driver in the call to
EngDeviceIoControl ?
what would be the best approach here
thanks in advance
regards
Taha Tag: Using inf file to limit installation to XP only Tag: 57436
suggestion needed on win98 display driver
Hello developers,
I am working on a display driver for windows 98. it is supposed to support
the rotation of screen of monitor. I mean to various angles like 90,180,270.
While reading ddk documentation i came across various structures like
pdevice and gdiinfo.
I guess there must be some specific value needed to setup which does this.
any hints ??
regards,
Andrews Tag: Using inf file to limit installation to XP only Tag: 57430
What's the PScript5 driver's MAX resolution(DPI)?
Hello.
I'm working in PScript driver in Windows platform.
I wanna know what's the PScript driver's MAX resolution(DPI)?
I have ever set it to PPD up to 1200 DPI.
What's the limit of DPI in PScript driver?
Is it different between Win9x and, Win2000 or later? Then, what's the limit
of each OS?
Thanks in advance. Tag: Using inf file to limit installation to XP only Tag: 57428
What's the PScript Driver's MAX resolution(DPI)?
Hello.
I'm working in PScript driver in Windows platform.
I wanna know what's the PScript driver's MAX resolution(DPI)?
I have ever set it to PPD up to 1200 DPI.
What's the limit of DPI in PScript driver?
Is it different between Win9x and, Win2000 or later? Then, what's the limit
of each OS?
Thanks in advance. Tag: Using inf file to limit installation to XP only Tag: 57427
What's the PScript5 driver's MAX resolution(DPI)?
Hello.
I'm working in PScript Driver in Windows Platform.
I wanna know what's the PScript driver's Max resolution?
I have ever set it to PPD up to the 1200 DPI.
Thanks in advance. Tag: Using inf file to limit installation to XP only Tag: 57425
usbccgp.sys
Hi,
I read somewhere usbccgp.sys is the prefered parent driver than usbhub.sys
for a multifunction device. I use usbhub.sys for our usb device on windows
2000 and now want to move it to windows XP. I modified the inf for windows
2000, by simply changed all reference to usbhub to usbccgp. I then use this
inf file for the device installation on a Windows XP (we also used tested
our driver with the old usbhub with this XP machine), and delete some
related .inf file in windows\inf directory and the registry key in
HKLM\SYSTEM\CurrentControlSet\Enum\USB\ location. However after inserting
the device and suplied the new .inf file. Hardware Update Wizard in XP
reports that there was a problem installing this hardware, the name is
already in use as either a service name or a service display name. I suspect
this is because of the previous installation of this device with usbhub.sys
(the XP used with uncleaned registry entry).
Is my analysis correct? You guys have any comments?
Best Regards,
Wayut Tag: Using inf file to limit installation to XP only Tag: 57423
Print monitor for intercepting print job
Hello all,
I want to intercept all the print jobs sent to a printer and pop up a dialog
to ask user for confirmation (telling him page count, price, etc.)
I searched on previous posts in the newsgroups and I think that the better
solution was to implement a print-monitor.
So now I've implemented a print monitor DLL (ConfirmMonitor.dll) that
supporta a new kind of port that is redirected to another existing port. The
target .DLL is loaded and initialized by my .DLL. Basically, all the calls
are forwarder to the target monitor .DLL, except StartDocPort(). When
StartDocPort is called in my DLL it pops up the confirmation dialog, if user
cancels then StartDocPort returns FALSE, ...
It works fine when target ports are local (LPT1:, nul:, pdf...).
But it fails with network ports. In this case, I can send the print job, it
arrives to the print server and it's shown in the queue, but it is NOT
printed.
- Then if I stop spooler in the client, the job is printed in the server and
deleted from the queue.
- If I send a second print-job, the first job is printed and the second
remains in the queue.
- In the print server, the real document name does not appear; instead it
appears as "Remote low level document" (maybe another words, I've translated
from spanish).
The printer driver is the same in both computers.
Any suggestion or idea?
Another solution seems to be by using api hooking...
Anyway I would like to now what's the problem in the print monitor DLL.
Thanks,
David D. Tag: Using inf file to limit installation to XP only Tag: 57416
File systems and cylinders
In my driver for a disk drive, I respond to IOCTL_DISK_GET_DRIVE_GEOMETRY
with
typedef struct _DISK_GEOMETRY {
LARGE_INTEGER Cylinders; = Number of sectors
MEDIA_TYPE MediaType; RemovableMedia
ULONG TracksPerCylinder; = 1
ULONG SectorsPerTrack; = 1
ULONG BytesPerSector; = Sector Size
} DISK_GEOMETRY
Now I wonder if TracksPerCylinder or SectorsPerTrack are used by FAT or NTFS
for read/write optimizations. For instance, if I set TracksPerCylinder
and/or SectorsPerTrack to 16, would the file systems try to read/write using
buffers of (16*SectorSize) or so bytes?
My goal is to make file systems send larger i/o buffers down to my drive. My
question is whether DISK_GEOMETRY affects this in any way.
Thanks,
Steve
-- Tag: Using inf file to limit installation to XP only Tag: 57409
IRP_MN_DEVICE_USAGE_NOTIFICATION
In my driver for a disk drive, I'd like to prevent the drive from being used
for special files. So I fail IRP_MN_DEVICE_USAGE_NOTIFICATION with
STATUS_UNSUCCESSFUL or STATUS_NOT_SUPPORTED. The drive is not removable by
itself, though handles removable media.
Now if I go to System/Virtual Memory, I see my drive is listed as available
target for a paging file. When I try to enable paging on my drive, I receive
IRP_MN_DEVICE_USAGE_NOTIFICATION and fail it. Windows then says that it
needs to reboot for the settings to take effect. Obviously Windows thinks
that it still can enable paging after rebooting.
Is there any way to exclude my drive from the list of available paging
targets at all?
Thanks,
Steve
-- Tag: Using inf file to limit installation to XP only Tag: 57407
bswap intrinsic?
Is there an intrinsic to wrap the bswap x86 instruction. I have written a
function to do this with inline assembler but I am wondering if an intrinsic
wouldn't be a better solution.
Regards,
George. Tag: Using inf file to limit installation to XP only Tag: 57406
what io the Best method to capture all audio out?
Hi,
1)
I want to capture all the audio out on my machine .
What i understand is that if the sound card on my machine provides
"stereo
Mix" capability AND I am not recording something on the physical line
in
of my sound card , then and only then i can capture the audio out
going
through the sound card using DirectSound or WaveIn API.
what is the most reliable way to do this that should work on Win 9x+
and Win
2k+ , independent of whether the sound card supports stereo mix or
whether
something is also being recorded in the physical line in of the sound
card?
Is there some way to generically install an upper filter driver on top
of the
sound card driver and do this?
what other option should help here?
In the DDK i have a Microsoft Virtual Audio Driver , will that be of
use ?
There are multiple drivers inside the MSVAD driver directory, which one
can
i use with minimum amount of code change that should achieve my purpose
?
and if i do need to change the code , which portion needs to be changed
?
2)
I was going through the code of MSVAD and its architecture looks
different
from the standard WDM drivers ( particularly WDM USB client drivers ).
No Read/Write Dispatchers etc.
also Walter Oney's Book apparently does not delve into sound card
drivers as
well. What is the best resource to get more information about this ,
apart
from the DDK ?
thanks and regards
Taha Tag: Using inf file to limit installation to XP only Tag: 57401
Handling SRB_FUNCTION_SHUTDOWN
I am trying to see whether I can use SRB_FUNCTION_SHUTDOWN as a cue to start
spindown of attached physical drives (both drives that are configured into
virtual disks and those that are not) on a PCI RAID controller.
Please clarify the following:
1) The DDK says "The system is being shut down. The request is passed
to the miniport driver if CachesData was set to TRUE in the
PORT_CONFIGURATION_INFORMATION data. The miniport driver can receive several
of these notifications before all system activity is actually stopped;
however, the last shutdown notification will occur after the last start I/O.
Only the Function, PathId, TargetId and Lun fields are valid."
How do I know which is the last start I/O?
2) Is there a mechanism that is available so that I can reliably spin
down drives without having to spin them again because there was one more
I/O?
3) In cases where I have a large number of drives, I will not be able
to spinup the drives very quickly. We risk having command timeouts as the
controller firmware tries to spinup drives that it just spun down.
Any recommendation is appreciated.
Thanks,
Jacob Tag: Using inf file to limit installation to XP only Tag: 57392
To what device group does an intelligent frame grabber fit?
Hi,
I am just about to start reading the basics about
windows drivers (I havent started my project...) just a question about
something in general: I was wondering to which device class a pci
frame grabber belongs to.
I am talking about a PCI-card to which you can connect 4 or 6
industrial type CMOS cameras via some kind of LVDS bus or camera link.
On the card, a dedicated processor is grabbing and evaluating the
images (detection of shapes or patterns, datamatrix and OCR searches
and so on).
The card is supplying a video stream through the PCI bus to be
displayed in a Window. Also single images can be grabbed.
A user mode application communicates to the card, telling it
parameters of the jobs it has to do, in which areas of the image it
has to detect what and reading out the results...
So I am wondering... do I have to write a driver for a PCI
multifunction device? or a video streaming device? or a WIA device? or
anything else?
which of the samples supplied in the XP DDK would match my needs best?
Anyway, I have to read a lot before starting... but maybe someone can
give me a hint meanwhile.
thomas Tag: Using inf file to limit installation to XP only Tag: 57391
(NT-)VDD blocks VDM: How to circumvent, and how to perform "secure" cleanup?
Hello,
I'm writing a VDD (for NT/2K/XP) for the first time, and I found the
documentation is not the verbose as I would like it to be.
I'm using the mechanism via DISPATCHCALL (assembler bytes 0xc4, 0xc4,
0x58, 0x02) emmitted into the source code, not via IN/OUT instruction
(although, by testing, I found out the same applies for these, too).
I faced the following problems:
The DOS program in the DOS box calls a function of the VDD. Now, that
function needs some time to perform the action. As long as the VDD
function has not returned, the DOS box is completely blocked. I cannot
even issue a Ctrl+C (or Ctrl+Break) to stop the program.
This is very bad with programs which need to communicate very much with
the VDD: I found out it is almost impossible to stop the DOS mode
program at all (other than closing the whole DOS window).
Another problem I faced is the following: I want to know when the DOS
mode program quits, to close the "access handle" the DOS program
obtained from me, that is, to do some cleanup if the DOS program forgot
to do this itself (for example, if it unexpectedly crashed). Anyway, I'm
not sure how to do this reliably.
Currently, I use VDDInstallUserHook() to install a Block handler, that
is, I am informed if the NTVDM is blocked. I found out that this happens
if the DOS program quits.
Anyway, is this really a reliable (and a recommended) way? First of all,
I thought installing a create and a termination handler with the same
function would be better, as I could find out if it is exactly the
DOS program which obtained the handler which is quit. Anyway, as the VDD
is started with RegisterModule (0xc4, 0xc4, 0x58, 0x00) from the DOS
program, I do not "see" the creation of the DOS program, so I do not
know for which PCB to wait for.
Can anyone help me here?
Thank you,
Spiro.
--
Spiro R. Trikaliotis
http://www.trikaliotis.net/ Tag: Using inf file to limit installation to XP only Tag: 57383
VPC shot me in the ankle
My development environment is crippled right now and I'm forced to use VPC
2004 instead of a target computer.
I've run into a problem that has caused me a few hours of trouble and I've
gotten down to the issue finally. It seems that VPC is not quite as
faithful as I had hoped, or maybe there is a race in my code that simply did
not show up on hardware:
In the File system filter example, at the end of DriverEntry after the
DO_DEVICE_INITIALIZING flag is cleared, I had assumed that it was now ok to
access the file system. In my code, based on this example, after clearing the
flag I created/accessed a particular directory to do some work.
In the hardware version, this always worked fine, in the VPC however I reach
the point of clearing DO_DEVICE_INITIALIZING long before I've seen the system
drives set up and consequently my fiddling with the directory is failing.
So is this a problem with VPC, or more likely have I misunderstood the
significance of DO_DEVICE_INITIALIZING. If the latter, how do I know when
all the file systems have been set up and are now safe to access?
--
Gak -
Finecats Tag: Using inf file to limit installation to XP only Tag: 57374
Need help in Print Driver Plug-in for Windows NT4
Hi,
I'm trying to insert username, hostname, document name, printer name, driver
name, custom and priority into the print job stream from my renderer plug-in
dll.
I realize that there are APIs available for me to gather these info if my
plug-in is
in user mode. That's why I get it to work in W2K.
However, the APIs are not available in kernel mode, at which my renderer
plug-in is invoked. I can't find any equivalent APIs supported in Kernel mode
from the DDK library. I try to collect the info from the UI plug-in(which is
in user mode) and pass the info to the renderer plug-in. However, if the
user does not open the printer properties page, the UI plug-in will not be
invoked.
Are there other ways to get the info from kernel mode? Is it possible to
invoke the UI plug-in from the renderer plug-in and let the plug-ins
communicate? Is language monitor a possible route to explore?
Suggestions are very much appreciated.
Thanks,
Anthony Tag: Using inf file to limit installation to XP only Tag: 57372
ddk where to start?
i put this on earlier but not as my official msdn login and didn't get
anywhere, time is getting shorter, and i am getting more confused by the day
going through ddk, sdk, directx, and other mm interfaces.... so now i try
again the official way:
ok, i must admit i am a bit out of my normal realm here with drivers under
windows... now if you wanted a dos tsr thats a different story. in any
event i got the xp ddk installed and built the samples, and have been wading
through some of the documentation down the audio driver path and think i
want to end up in the msvad area somewhere. but i really do want some
confirmation that i am in the right area and that this is really the best
way to do what i need to do.
Problem: take left and right channels of one or more line in or mic inputs
on one or more sound cards and switch them to the left and/or right channels
of one card's speaker/headphone output. this has to be done in real time
and the routing has to be controllable from a user program with some kind of
a control api.
i can do this now with waveIn/waveOut api, but there is an annoying delay
due to the filling and passing of buffers, and it seems touchy as far as the
timing for setting up buffers and getting them in and out on time. so what
i think i need is something like a super mux combined with a splitter that
can route left and right channels and duplicate them so that i could listen
to combinations like the left channel line in on card 1 in both ears, then
the left channel line in on card 1 in the right ear and the left channel
line in on card 2 in the right ear, or the left channel of line in on card 2
in the left ear and the right channel line in on card 2 in the right ear...
etc.
so, any pointers about where i should be heading? i don't want to tie it to
any particular hardware which is why i am thinking the virtual audio device
stuff is the way to go. but is this the only way? would directsound give
the speed and control or does that work on filling and sending buffers also?
with the virtual audio device how would i configure it so it gets into the
audio stream the right way? too many questions, not enough reading yet i
think.
after more reading what i think i need is a realtime driver that impliments
a ksnodetype_mux or ksnodetype_supermix. does that sound like the right
route? Tag: Using inf file to limit installation to XP only Tag: 57371
trap joystick collection
hi,
I have a HID GamePad/Joystick device.
I wish to have a full control on the joystick : Weather the button
pressed information is passing to DInput, will be my options.
How can I filter a joystick collection, so I can read buttons from a
specified gamepad, and (maybe) drop it without passing to DInput?
Is HIDClass upper filter ok? Will I have to write a minidriver for the
full control on the gamepad? thanks. Tag: Using inf file to limit installation to XP only Tag: 57370
Not getting IRP_MN_STOP_DEVICE
Hello all,
I have a device connected over TCP. The device has a firmware running on
it. I have already written a bus driver to enumerate the device and load the
required function driver for it. The function driver provides a number of
APIs to the application to deal with the device.
One of the API is to reset the device. When this command is issued, the
driver has to carry out same steps implemented in the START_DEVICE to
initialize board and firmware.
So, I want to stop the driver when reset command is issued and start it
again. I have called IoInvalidateDeviceState(), set the flags
(PNP_DEVICE_FAILED | PNP_DEVICE_RESOURCE_REQUIREMENTS_CHANGED) and I am
getting IRP_MN_QUERY_STOP_DEVICE. The PnP Manager then asks for
RESOURCE_REQUIREMENTS and FILTER_RESOURCE_REQUIREMETS. Here I am returning
NULL since I am not using any resources. This is the same value returned by
me when enumerating the device. Then I am getting IRP_MN_CANCEL_STOP_DEVICE.
Why? Since there is no change in the resource requirement, PnP Manager
is cancelling it? I also made sure that no application handles are opened to
the driver and no driver in the stack is cancelling QUERY_STOP_DEVICE.
Waiting for the replys,
Aniketa K S Tag: Using inf file to limit installation to XP only Tag: 57356
capturing all audio out reliably : DirectSound or MSVAD?
Hi,
1)
I want to capture all the audio out on my machine .
What i understand is that if the sound card on my machine provides "stereo
Mix" capability AND I am not recording something on the physical line in
of my sound card , then and only then i can capture the audio out going
through the sound card using DirectSound or WaveIn API.
what is the most reliable way to do this that should work on Win 9x+ and Win
2k+ , independent of whether the sound card supports stereo mix or whether
something is also being recorded in the physical line in of the sound card?
Is there some way to generically install an upper filter driver on top of the
sound card driver and do this?
what other option should help here?
In the DDK i have a Microsoft Virtual Audio Driver , will that be of use ?
There are multiple drivers inside the MSVAD driver directory, which one can
i use with minimum amount of code change that should achieve my purpose ?
and if i do need to change the code , which portion needs to be changed ?
2)
I was going through the code of MSVAD and its architecture looks different
from the standard WDM drivers ( particularly WDM USB client drivers ).
No Read/Write Dispatchers etc.
also Walter Oney's Book apparently does not delve into sound card drivers as
well. What is the best resource to get more information about this , apart
from the DDK ?
thanks and regards
Taha Tag: Using inf file to limit installation to XP only Tag: 57354
DeviceIOControl Hangs
I make a DeviceIOControl call to my driver from within an application. This
is an overlapped IO call and has worked successfully for years, however with
one customer it fails after a few days under heavy load. This is an
asynchronous call and it doesn't appear to even reach the driver and just
hangs on the call itself.
Has anyone seen or heard of this sort of error occurring before? Tag: Using inf file to limit installation to XP only Tag: 57352
How to Enable/Disable USB Device Remote Wakeup?
Iâ??m writing a WIA driver for a USB scanner that supports remote wakeup. I
have not been able to find any way through Windows to enable and disable the
scannerâ??s remote wakeup feature from user mode. Is there a way?
I normally deal with the scanner through USBSCAN.SYS and the
DeviceIoControl() function. But using this function there seems to be no way
to send a Standard Device Request type, which is the type you need to send to
do a SET_FEATURE request to enable the remote wakeup. (According to the
documentation, the IOCTL_SEND_USB_REQUEST control code does not let you set
the bmRequestType).
I notice that you can issue a SET_FEATURE request from a kernel mode driver.
There is even a macro UsbBuildFeatureRequest. But please donâ??t tell me Iâ??ll
need to write my own kernel mode driver merely to enable/disable the remote
wakeup. Iâ??d hate to have to go to such overkill just for a simple thing. You
would think there is an easier way. The USB-IF spec requires that if your
device reports that it supports remote wakeup, then you must have a way to
enable and disable it. (And yes, they enforce this because theyâ??ve snagged me
for it already.)
Sorry if this is the wrong forum for this question. If there is a more
appropriate one, please let me know. Tag: Using inf file to limit installation to XP only Tag: 57334
GetPrinterDataFromPort() in language monitor
From what I read in the MSDN, when we call GetPrinterData(), it should call
GetPrinterDataFromPort() in the language monitor. I added some text to be
printed in my language monitor when the function is called and although the
function worked correctly, it didn't print any messages. It did print
messages when the functions WritePort and StartDocPort were called (by using
WritePrinter and StartDocPrinter).
Any suggestions?
--
John Tag: Using inf file to limit installation to XP only Tag: 57329
irp cloning...
Hello,
I am currently porting a pseudo disk driver to NT from Unix of which one
aspect of its operation is to perform a mirrored write. The manner in
which it performs the mirrored write is to clone the original IRP for
each mirror and then issue the cloned IRPs to the primary and secondary
devices. During the mirrored write the original IRP is stalled. After
the cloned requests complete, the original IRP is eventually completed.
If I only clone the IRP once and issue the clone to the primary device
the driver seems to work well (as evidenced by a data integrity tool
I'm using).
However, if I instruct the driver to perform mirroring, the data sent
to the primary device is always corrupted (I am currently unable to
verify the secondary as it is not written in the original format).
Here's is the gist of my IRP clone operation. After calling the
cloning macro a cloned IRP is further modiefied to point to the
correct device by directly setting the DeviceObject field in the IRP.
Also, the IRPs are hand made and set up by IoInitializeIrp() rather
than by IoAllocateIrp().
It's probably worth admitting that while I have programmed drivers for
Unix for many years I've only been working with NT for a month or so.
I would greatly appreciate any insight into how to solve this problem
correctly. I have scoured this list and the web for similar examples
but haven't found anything relevant thus far.
Thanks!
Greg
#define CLONE_IRP(src, dst, zoffset) \
do { \
IO_STACK_LOCATION *srcstk, *dststk; \
srcstk = IoGetCurrentIrpStackLocation(src); \
dststk = IoGetCurrentIrpStackLocation(dst); \
*dststk = *srcstk; \
dststk->Context = (void *)0; \
(dst)->MdlAddress = IoAllocateMdl( \
MmGetMdlVirtualAddress((src)->MdlAddress), \
MmGetMdlByteCount((src)->MdlAddress), \
FALSE, FALSE, (IRP *)0); \
IoBuildPartialMdl((src)->MdlAddress, (dst)->MdlAddress, \
(char *)MmGetMdlVirtualAddress((src)->MdlAddress) + \
(zoffset), (unsigned long)0); \
(dst)->Tail.Overlay.Thread = (src)->Tail.Overlay.Thread; \
} while (0) Tag: Using inf file to limit installation to XP only Tag: 57328
ReadPrinter fails for TCP/IP port, works for LPT1 and USB using pjlmon XP DDK sample
Hi all,
I have this problem which has been eluding me for weeks. The sample
pjlmon project that comes with the XP DDK works perfectly for printers
that are connected via LPT and USB, but fails when trying to read from
a printer that's connected via TCP/IP. The printer port we're using is
a Standard TCP/IP port, over port 9100 which creates a port named
IP_10.32.56.23 which is fine.
Here's the kicker - when I use WritePrinter to send the data down,
WritePrinter works and returns back a successful value. Using the
Ethereal packet sniffer, I find that we DO get the right data back from
the printer, but for some reason it doesn't "bubble up" from the port
to the language monitor, and ReadPrinter returns with a 0 meaning that
no data was read back, and the buffer's empty. I don't know where the
data's getting blocked. Is the port monitor blocking it from the
language monitor?
I've tried this with both the outdated versions of pjlmon and the
newer updated one (InitializePrintMonitor and InitializePrintMonitor2).
Doing some digging, I found that the port type you're using uses a
different DLL for filling in the MONITOR/MONITOR2 structure. Using a
debugger, I found that for TCP/IP, GetPrinterDataFromPort is NULL for
TCP printers, and valid for LPT and USB. It seems to me that the
tcpmon.dll DLL assumes that backchannel data will never come from a
TCP/IP printer. If this is true, I'm going to have to work out my own
solution since I can't depend on that DLL for reading data back. In
fact, I already did that, but it bypasses ReadPrinter which I really
don't feel comfortable doing.
According to the MSDN documentation, using SendRecvBidiDataFromPort
only works on Windows XP anyway, so that solution will not be an option
since we have to support 9x->XP.
So, what I want to know, if anyone can answer, are the answers to
these questions:
1) Why do we not get backchannel data back from a printer with pjlmon
(both old and new) using TCP/IP, but works with LPT and USB?
2) Will bidi communication work on server-based system such as CUPS and
Samba? HP's bidi software wouldn't work with printers connected to
these types of systems, but did work with direct TCP/IP connections.
Thanks in advance.
Mike Tag: Using inf file to limit installation to XP only Tag: 57304
FIREWIRE CDR as SCSI device
Hello,
ist it possible to trat a firewire devive (e.g. a cdr) as a
scsi device ?
I have written an application which communicates with atapi and scsi
cd/dvd drives using SCSI commands.
Now i also want to do it with firewire drives.
Can anybody help me ?
Regards,
Thomas Tag: Using inf file to limit installation to XP only Tag: 57303
Language Monitor question
Hi,
I try to make my own Language Monitor Dll in order to enable bi-directionnel
communication with my thermal Printer. I work with Windows XP SP2
I read that I write the following functions :
ClosePort
EndDocPort
GetPrinterDataFromPort
InitializePrintMonitor2
OpenPortEx
ReadPort
StartDocPort
WritePort.
then I set to NULL the other pointer function of the MONITOR2 structure.
I test it and my dll is loaded and InitializePrintMonitor2 is called but at
the end
of the installation of my printer mini-driver, I receive an error message :
"The specified print monitor is unknow"
What is wrong ?
Do I write the other functions of MONITOR2 structure ?
Thanks in advance Tag: Using inf file to limit installation to XP only Tag: 57302
My File System Filter driver depends on certain features that are only
available on XP and later, how do I indicate this in my INF file?
--
Gak -
Finecats
Re: Using inf file to limit installation to XP only by Pavel
Pavel
Tue Jan 11 20:33:11 CST 2005
Please read the installation articles @ WHDC site. Explained there.
--PA
"finecats" <finecats@nospam.nospam> wrote in message news:0A15B22A-DDAC-418F-9B8A-528D5673AFA2@microsoft.com...
>
> My File System Filter driver depends on certain features that are only
> available on XP and later, how do I indicate this in my INF file?
> --
> Gak -
> Finecats
Re: Using inf file to limit installation to XP only by Eliyas
Eliyas
Tue Jan 11 21:02:40 CST 2005
I don't know how file system filters get installed but for a device driver,
you can use decorations in the Manufacturer section to control the target
platform.