DrvEnablePDEV is called more than DrvDisablePDEV
Hi
Going through my driver, I noticed that DrvEnablePDEV is called more often
than DrvDisablePDEV in a printjob'
The docs say I should allocate resources for PDEV in DrvEnablePDEV, and
deallocate in DrvDisablePDEV, but this way I get a memory leak
BTW, the driver seems to work !!!
Any help on this ?
TIA
LB Tag: Class Specific Descriptors Tag: 50403
RNDIS question
Hi all ,
I am working on RNDIS device now and have a couple of questions on
this regard :
1. There are two fields in the REMOTE_NDIS_QUERY_MSG {
InformationBufferLength, InformationBufferOffset } . Those fields
indicate where the params for the specific query are located in the
transfer . The question is : where can I get a list of the structs
which are passed for each query ? I have searched in the MSDN and DDK
information , but nothing .
For example , for the OID_GEN_LINK_SPEED I see that the host passes
some params - but I dont know what they are .
2. I have noticed that params for the same query are different between
2K and XP . For example , for the same OID_GEN_LINK_SPEED 2K sends 4
bytes while XP sends about 40 . Does anyone know what is the deal
there ? Why is the difference ? Where can I see the list of
differences ?
thanks a lot
Oleg Tag: Class Specific Descriptors Tag: 50402
IoGetDeviceObjectPointer on serial driver !!
Hi
The first time I call IoGetDeviceObjectPointer on \Device\Serial0 the
function call do not fail.
Any attempts to open the COM port from user mode app. fails, which is fine.
But when I stop the driver i stil can't open the COM port from a user mode
app. ??
In my DriverUnload function I do call ObDereferenceObject() on the
fileobject returned by IoGetDeviceObjectPointer.
Any further attempts to call IoGetDeviceObjectPointer on \Device\Serial0
fails, (with error code 3221225506) which according to the DDK help files,
can't be returned ?
Isn't IoGetDeviceObjectPointer a combination of ZwCreateFile,
ObReferenceObjectByHandle, IoGetRelatedDeviceObject, ZwClose ??
So why can't I reopen the COM port ??
Thomas Tag: Class Specific Descriptors Tag: 50401
1394 devices: Bus reset while processing SRB_INITIALIZE_DEVICE !
Hello list!
I am still working on the issue that my drivers fail to communicate with
a IEEE1394 ( firewire ) device on device initialization.
This is what I see:
The driver gets an SRB_INITIALIZE_DEVICE request. While this happens,
another bus reset is happening on the IEEE-1394 bus which changes the
generation count.
Now the driver tries to access the device to initalize the drivers
structures and the device state BUT every register access fails due to
"STATUS_INVALID_GENERATION".
According to MSDN, the driver should now request the current generation
count using the REQUEST_GET_GENERATION_COUNT bus request BUT it should
not use this generation count unless the next Bus Reset Notification is
recevied by the driver. And in fact, it is not possible to do a single
register access while processing the SRB_INITIALIZE_DEVICE request from
now on.
So what am I supposed to do in this situation?
If I fail the SRB_INITIALIZE_DEVICE request with STATUS_IO_DEVICE_ERROR,
the driver gets unloaded for the device and is not accessible at all.
If I succeed the SRB_INITIALIZE_DEVICE in the hope that I get the Bus
Reset Notification afterwards to update the generation count and finish
the initialization in SRB_INITIALIZATION_COMPLETE also does not work
because SRB_INITIALIZATION_COMPLETE is called first and the Bus Reset
Notification is called later on.
Worst of all, this behaviour is completely reproducable on my system
since I installed the Service Pack 2 for windows XP! If I uninstall the
service pack, I do not get multiple bus resets when connecting the
device ( at least I do not get a bus reset while processing
SRB_INITIALIZE_DEVICE ) anymore and everything works fine.
I am completely stuck. I fear, this one is going to cause BIG TROUBLE!!!
-Arne Tag: Class Specific Descriptors Tag: 50398
How to get the indication in protocol driver?
Hello,
I have written an protocol driver (Modifid from DDK sample code, Ndisprot).
I found that if the service "QoS packet Scheduler" is enabled,
then my protocol driver can't receive the indication in ProtocolStatus().
But if I disable the service "QoS packet Scheduler",
then my protocol driver can receive the indication.
How can my protocol driver receives the indication and the service "QoS
packet Scheduler" is enabled?
Best Regards,
Ivan Tag: Class Specific Descriptors Tag: 50395
plug-in for Internet Connection Firewall
Does anyone know of any help at all about how to write a
plug-in for MS Internet Connection Firewall? Tag: Class Specific Descriptors Tag: 50394
Scsi Miniport driver question
Hi,
Does any one know what I am supposed to do for these 2 IOCTLs
1. IOCTL_SCSI_MINIPORT_RETURN_STATUS
2. IOCTL_SCSI_MINIPORT_READ_SMART_THRESHOLDS
The SCSI Port driver sends my Scsi MiniPort driver these 2 requests.
However, I could not find any where in the world the document for what I need
to do with them. Will Microsoft answer me if I ask them????? I hope someone
here works for Microsoft.
Thank you
Vu Tag: Class Specific Descriptors Tag: 50389
Wireless Provisioning Services (WPS) documentation now available
------=_NextPart_0001_4280AB10
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
See http://www.microsoft.com/whdc/device/network/wireless/wps.mspx.
Wireless Provisioning Services
Updated: August 18, 2004
Wireless Provisioning Services (WPS) enable the discovery of and connection
to wireless networks. WPS enhancements are included in Microsoft Windows XP
Service Pack 2 (SP2) and under consideration for Windows Server? 2003
Service Pack 1 (SP1).
WPS extends the wireless client software included with Windows XP and the
Internet Authentication Service (IAS) included with Windows Server 2003 to
allow for a consistent and automated configuration process when connecting
to public wireless hotspots or private wireless networks that provide guest
access to the Internet.
The WPS APIs allow for the pre-provisioning of network information to
connect to these networks and the provisioning of network settings to
connect to private wireless networks.
To help driver developers who create network components that can take
advantage of WPS capabilities, Microsoft is providing a Driver Development
Kit (DDK) preview, including these components:
? WPS documentation preview from the Windows DDK
? Netprov.h header and related files
Bryan S. Burgin
bburgin@online.microsoft.com
This posting is provided "AS IS" with no warranties, and confers no rights.
------=_NextPart_0001_4280AB10
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 See http://www.microsoft.com/whdc/device/network/wireless/wps.mspx.
\par
\par Wireless Provisioning Services
\par Updated: August 18, 2004
\par Wireless Provisioning Services (WPS) enable the discovery of and connection to wireless networks. WPS enhancements are included in Microsoft Windows XP Service Pack 2 (SP2) and under consideration for Windows Server\'99 2003 Service Pack 1 (SP1).
\par
\par WPS extends the wireless client software included with Windows XP and the Internet Authentication Service (IAS) included with Windows Server 2003 to allow for a consistent and automated configuration process when connecting to public wireless hotspots or private wireless networks that provide guest access to the Internet.
\par
\par The WPS APIs allow for the pre-provisioning of network information to connect to these networks and the provisioning of network settings to connect to private wireless networks.
\par
\par To help driver developers who create network components that can take advantage of WPS capabilities, Microsoft is providing a Driver Development Kit (DDK) preview, including these components:
\par
\par \bullet WPS documentation preview from the Windows DDK
\par
\par \bullet Netprov.h header and related files
\par
\par
\par
\par Bryan S. Burgin
\par bburgin@online.microsoft.com
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par }
------=_NextPart_0001_4280AB10-- Tag: Class Specific Descriptors Tag: 50388
Getting SID While Deleting Files Over LAN.
I've tried to get SID in my server when some other client delete the shared
files in my server.In my file system filter driver,IRP_MJ_SET_INFORMATION
dispatch,when the FileInformationClass==FileDispositionInformation, I got NO
token of current thread,but got a token of current process.it is S-1-5-18.why
I can not get the correct SID of the impersonation user??
Regards,
Ming Tag: Class Specific Descriptors Tag: 50384
Devicepath from SetupDiGetDeviceInterfaceDetail
After enumerating device interfaces for GUID_NDIS_LAN_CLASS and
getting the interface detail, I get the devicepath like-
DevicePath = \\?\....#{ad498944-762f-11d0-8dcb-00c04fc3358c}\{86ff7813-229e-4030-905e-dff4822330dd}
I want the adapter name, which is actually the "ServiceName" value of
the registry key:
HKLM\Software\microsoft\Windows
NT\CurrentVersion\NetworkCards\<number>
This ServiceName (128bit GUID in W2K and later), matches with the
"{86ff7813-229e-4030-905e-dff4822330dd}" part I get in the devicepath
using SetupDiGetDeviceInterfaceDetail call.
Is this always the case and a safe assumption? Tag: Class Specific Descriptors Tag: 50383
running app from driver
Hi All,
I need to run a command line application with a parameter from my filesystem
filter driver. If you can give me some idea i will appreciate it, even if it
is complicated.
Thanks Tag: Class Specific Descriptors Tag: 50374
how to add registry keys during inf install?
hi all
can i add registry entries from an inf file.
i am installing a mirror display driver.
assaf Tag: Class Specific Descriptors Tag: 50373
SCSI SRB FLAG does not make sense - SRB_FLAGS_NO_DATA_TRANSFER
Hello everyone,
In the DDK, page SCSI_REQUEST_BLOCK (System Support for Buses->SCSI
Bus->Reference->SCSI Bus Structure->SCSI_REQUEST_BLOCK), the SrbFlags can
have a flag set as 'SRB_FLAGS_NO_DATA_TRANSFER'. The page says, "Indicates no
data transfer with this request. If this is set, the flags
SRB_FLAGS_DATA_OUT, SRB_FLAGS_DATA_IN, and SRB_FLAGS_UNSPECIFIED_DIRECTION
are clear"
Now when I look at the include file srb.h, this flag is '#define'd as
0x00000000. Can anyone explain this? If I am going to test the flag using
the following statement:
if( srb->SrbFlags & SRB_FLAGS_NO_DATA_TRANSFER )
{
// do all this
}
I will never have the block executed.
This got to be a bug, true or not? Thanks. Tag: Class Specific Descriptors Tag: 50372
microsoft os descriptor (usb)
Can anyone help me locate the information on how to implement the Microsoft
OS descriptor in a USB device? I found some "os descriptor" defines and
structs in the 2003 DDK which, when returned by my device does seem to make
WinXP SP2 to query for more information. However, I have not found (ddk
help, microsoft.com, google, etc.) any documentation whatsoever on how to
correctly/fully implement this.
http://www.microsoft.com/whdc/system/bus/usb/USBFAQ_intermed.mspx
<quote>
The Microsoft OS descriptor is a set of data structures that IHVs can use to
include extra information in device firmware, information that Microsoft OS
descriptor-enabled applications and operating systems can extract. The data
is extracted by vendor-specific USB requests to the device as indicated in
the OS Descriptor specification. The information retrieved will provide the
operating system and/or applications with additional information about the
device and its special features.
For additional information about the Microsoft OS descriptors, please visit
USB Architecture and Driver Support.
</quote>
Thanks in advance Tag: Class Specific Descriptors Tag: 50359
USB port monitor error 1223
Hi there,
I'm working on a custom language monitor for a USB printer.
I've found that if the printer is unplugged then plugged back in, any
WritePort calls to the USB port monitor result in failure with an
error 1223. Obviously I can't write to the printer while it's
unplugged :) but once it's plugged back in, is there anything I can do
to get the port talking again? If I delete the job that is failing,
the next one writes to the printer without a problem.
--
Matt Kane
mkane@zebra.com Tag: Class Specific Descriptors Tag: 50358
IRQ Sharing causes multi-function adapter to lock PC
We are having problems with a third party vendors card. Everytime it
shares an IRQ with another PC device, it locks the controller. We've
been able to recreate and fix the symptoms by freeing up the sharing
IRQ resource.
The vendor is trying to integrate a LSI mulitfunction chip that passes
about 120MB/s (yes, 120 Mega Bytes per second) on the PCI bus. This
is near the theroetical bandwidth of the PCI bus.
One caveat that we have is that for stability purposes, we have to use
the "Standard PC" HAL instead of one of the ACPI HAL's available with
XP/2K. This is for compatibility purposes with legacy devices
integrated into our product.
Our ultimate goal is to get the device to share an IRQ. We aren't
going to rewrite their driver.
Are there any BIOS settings or OS fixes that might help to let this
device share an IRQ? Any suggestions? Anyone?
Thanks. Tag: Class Specific Descriptors Tag: 50354
Anyone use VFW driver with WME ?
Hi,
I 'm wondering did anyone used VFW capture driver with WME (Window Media
Encoder) b4.
Cause I'm on the midst testing my driver, but just to make sure go in right
direction !
Thank in advance
wp Tag: Class Specific Descriptors Tag: 50353
Listing files that comprise a display driver
Hi,
One of my current tasks is to list out all the files that comprise a
display driver, and the final piece of code should work on both WinXP and Win2000.
I have written a piece of code that will list out the files of a
driver, given the driver inf file, and the device id.
Now my task is to figure out the inf file of the display driver
installed on the system. When I use EnumDisplayDevices, the field
DeviceKey gives me some information about a location in the registry
to the driver registry area within HKLM\SYSTEM\CurrentControlSet.
Would like to know if I could and if yes, how, could I use the
information in the DeviceKey to get to the inf file of the driver...
Can anyone help??
Thanks,
Radha. Tag: Class Specific Descriptors Tag: 50351
getting gray text with hp laserjet 4L
Hi,
I've got a HP Laserjet 4L. When an applications in Win98 prints gray or
colored text, the HP Laserjet prints it in gray by using some dithering.
Now I have got WinXP and with applications like WordPad or StarOffice
the printed text is simple black. With other applications like Acrobat
Reader the text is still gray.
Is there something wrong with the driver (It's original Windows-driver)?
Is there something wrong or missing in the gpd-file? If yes, how can I
correct it?
kind regards
Regina Tag: Class Specific Descriptors Tag: 50350
Checking File and Print Sharing
Hi -
I'm creating an installation program that will install a VB.NET program and
an instance of MSDE on an unknown desktop (commercial application). The
install will include the MSDE redistributable files (and it will launch the
MSDE Setup.exe to install MSDE).
I've read that "Except on Win 98 and Millennium, file and print sharing must
be active"
How can my install program ensure this (programmatically)? More
specifically:
Where (registry setting or elsewhere) do I check for these settings, and
what name-value pairs are valid?
Is this the correct approach?
Thanks for your help.
- Jeff Tag: Class Specific Descriptors Tag: 50349
VFW Streaming Transfer under WME
Hi,
I have port a 32bit, user-mode only VFW driver from bravodo sample to an
user-mode only Video Capture Driver.
I understand that VFW using two transfer mode - Frame (Single Capture) and
Stream.
For eg, Dorgem, use Frame (Single Capture), However, AMCAP and WME seem use
Stream (WDM based).
My only problem now remain is on STREAM transfer mode
Cause it quite long, in summarized, I used as follow :
on DVM_STREAM_PREPAREHEADER
- return DV_ERR_NOTSUPPORTED, so suppose client will supply the buffer
on DVM_STREAM_ADDBUFFER
- add into queue, return DV_ERR_OK
When the data ready, I use DriverCallback (with MM_DRVM_DATA).
But however, the data seem not pass-through client driver, the preview
and/or output screen show nothing, and the WME FPS (Frame per Seconds) show
zeros, but show encoding... and my debug show
DVM_STREADM_PREPAREHEADER, then DVM_STREAM_ADDBUFFER repeated for about 40
times, then my driver fill the buffer and callback, and this repeat.
FYI, I'm using separate thread procedure to supply the data into VHdr
(buffer queue), synchronized through semaphore (replace STI/CLI for H/W
board), and notify client with DriverCallback (MM_DRVM_DATA etc).
I understand that WME, AMCAP etc use somekind of VFW wrapper for WDM,
How do I verify that my Callback worked ? Any recommend for a sample WDM
client with source-code for me to easy debug (for,eg, the callback did
called correctly) ?
Thank in advance
wp Tag: Class Specific Descriptors Tag: 50348
Problem with NDIS transport driver
Hi,
I have miniport driver which is using NdisMIndicateStatus function to send
some "events" (my own status values) via transport driver into application.
Everything works as long as I don't bridge my connection with any other
network interface using standard Win XP bridge. When my interface is bridged
then transport driver is no longer receving status indications from my
miniport driver. Are they filtered by the bridge driver? Is there a solution
to that or I have to to change the whole mechanism of sending events up from
miniport driver?
Thanks for help
Marcin Tag: Class Specific Descriptors Tag: 50347
MS Internet Connection Firewall
Can anyone tell me how MS Internet Connection Firewall
works? I know that it opens an outgoing packet and
changes its source address so that the incoming packets
are routed to alg.exe (application layer gateway). Can
someone tell me how it does this? How does it change the
packet? Does it use a TDI driver, a filter hook driver,
or an NDIS intermediate driver? Tag: Class Specific Descriptors Tag: 50344
USB: multifunction device beside usbser.sys
Hi
Because of many people recommended to use usbser.sys instead of writing
my own COM mapping driver I did so, and it works so far.
My problem now is, that I should be able to use the device's second
configuration - so I think I can name some kind of multifunctional device.
For getting quick results about feasability, I used libusb-win32 (latest
version). I tried to reset the device, enumerate all for getting a new
handle set config but got an error. I think it must be usbser.sys that
claims the device befor I can do it. How can I solve the problem. Any idea.
Many thanks in advance
Robin Tag: Class Specific Descriptors Tag: 50338
how does Softice stop the window system?
Hello all.
I wanna ask a question about softice again. When i start softice, the windows
system is stopped. How is this possible? Softice doesn't hook irq0(timer),
i think. But, the windows system can't get the chance of handling a timer
interrupt.
I wanna use a same method like softice's to implement my little driver.
Any ideas?
thanks for reading. Tag: Class Specific Descriptors Tag: 50334
How do you tell WZC that our driver/adapter is WPA compliant
We handle OID_802_11_AUTHENTICATION_MODE and return that
we are doind WPA authentication but WZC authentication does not
show WPA option.
Any ideas? -Ron- Tag: Class Specific Descriptors Tag: 50326
problem using a standalone device object with NDIS
Hello, I have a problem when using 'NdisMRegisterDevice()' in my NDIS driver.
I use this call to create a standalone device object so that my application
can communicate with my driver. Using this, I can communicate with my driver
fine from my app. However, the file handle that my application creates to
talk to my driver does NOT get notified when I register to receive device
notifications using 'RegisterDeviceNotification'. However, if I create a
handle using the REAL device name (obtained by using the SetupDixxx
functions), my app properly receives the notifications. I can't use this
handle tho', 'cuz NDIS owns it and my driver won't received Irps sent to it.
The basic problem I'm trying to solve is this: if the device is unplugged
WHILE the app is running, the app needs to close the handle to allow the
driver to unload.
Thx,
Rick Tag: Class Specific Descriptors Tag: 50318
Getting quick IP address on P2P RNDIS network
There is a small problem that we've run into, which I hope somebody can help
us with.
We have a USB device, which supports RNDIS and that causes an XP machine to
create a separate network for it. The device also creates a "remote" node on
that network essensially establishing point-to-point network inside the
device itself.
Now to the problem, how do we quickly assign IP address to this network?
I am looking for any suggestions - from totally legal to semi-legal. So far
this device is restricted to a lab environment, but having fully supported
solution is obviously preferred.
Static IP assignment is out of question. So is auto IP as it is too slow.
We need to be able to assign a address in a matter of seconds or even
faster. Also a requirement - multiple instances of this device can be
connected to the same machine and they all have to sit on separate networks
and don't conflict with each other.
The only solution that I can think of at a moment is to have the device
being a DHCP server for its own net. Problem: multiple devices can be
connected to the PC and there must be a solid algorithm in place to avoid
any conflicts.
I was also told that IPv6 would solve this issue.
This is very generic problem and I am sure there are good solutions to it.
Can anybody offers any suggestions or refer me to relevant RFC or something?
Any help would be appreciated.
Thanks!
-- Max. Tag: Class Specific Descriptors Tag: 50314
DIFx Framework - HOWTO
Hi All,
First, I have only a basic understanding of the certificates, signing, etc.
so please excuse me if some question appears to be a stupid one :-)
I'm evaluating the MS DIFx framework as to make a single file installation
of the driver I've made. In connection with this I have tried to set-up an
installation through DIFx framework but have some troubles with it. I get
the following error in DpInst.log file for every INF file in the driver:
"ERROR: driver package 'drive:\path\INFFILE.INF' is unsigned. Error code
0x800B0100, No signature was present in the subject."
Could somebody explain me what is the right way to set-up the installation.
- As far as I know only the cat file should be signed not all the files
in the driver package...
Follows a short description of how I've tried to make the installation:
In the INF file I have included the requested CatalogFile and
DriverPackageType sections:
CatalogFile=CBMA.cat
DriverPackageType=PlugAndPlay
The content of CBMA.cdf file is:
[CatalogHeader]
name=CBMA.cat
[CatalogFiles]
CBM.dll=CBM.dll
OEMUI.dll=OEMUI.dll
OEMUNI.dll=OEMUNI.dll
CBM.ini=CBM.ini
CBM_CT1000II.INF=CBM_CT1000II.INF
CBM_CTS300.INF=CBM_CTS300.INF
CBM_PPU700.INF=CBM_PPU700.INF
CBM1000II.GPD=CBM1000II.GPD
CTS300.GPD=CTS300.GPD
PPU700.GPD=PPU700.GPD
ttfsub.GPD=ttfsub.GPD
CBMA.HLP=CBMA.HLP
eula.txt=eula.txt
From this file I have successfully created .cat file and subsequently signed
it with a test certificate obtained through makecert.exe and cert2spc.exe...
After that I copied DpInst.exe in the driver directory and made eula.txt and
dpinst.xml files. Subsequently when I ran DpInst.exe I received the
described error.
Any help will be appreciated!
10x
___________________________________________
Best regards,
Ivan Dimitrov Tag: Class Specific Descriptors Tag: 50299
DPC has high latency only with SMP
Hallo,
i'm back with my DPC latency problem: i'm testing my driver on an SMP
machine, and 4 or 5 times every second when in the isr i request the
dpc, i find that the old request is still in queue.
When I start the OS with the /onecpu option, this behaviour disappears
and the DPC is never delayed too much (>1ms).
Does anyone have some clue for solving this problem ?
I don't understand why the dpc handling seems to slow down so much on a
SMP machine.
Thanks,
e. Tag: Class Specific Descriptors Tag: 50298
question from IRP Cheat Sheet 1 ==> Scenario 2 ) Forward and Wait
Hello,
I have questions regarding the IRP cheat sheet's Scenario 2 , Forward
and Wait.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;320275
could somebody pls clarify these
thanks
Taha
Question 1 )
------------
in DispatchRoutine_2 ( ...
if (status == STATUS_PENDING) {
does this return value of STATUS_PENDING mean that the completion
routine of some lower level driver
would have returned STATUS_MORE_PROCESSING_REQUIRED?
Question 2)
-----------
in DispatchRoutine_2 ( ...
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return status;
i) What control flow will the call to IoCompleteRequest initiate?
ii) To whom will the "return status;" statement give control
How are i) and ii) above inter-related? Tag: Class Specific Descriptors Tag: 50297
[Q] how can i get the CR3 value?
Hello all.
I have a question about getting cr3 value. (page directory base address)
In softice, the 'PAGE' command shows the cr3 value exactly.
(on windows 2000, 0x30000. on windows xp, 0x39000)
But, my driver can't catch the value. (0xb9e83d8f <- like this)
the code is this.
push cr3
pop eax
it doesn't work.
I think this is because my driver is called in a user process, not in kernel.
so, my question is this.
is there any way to get the cr3 value of the kernel? (running a thread in kernel?)
if no, how can i use the same method like softice's.
thanks for reading. Tag: Class Specific Descriptors Tag: 50295
BugCheck in TDI Filter TDI_RECEIVE Completion.
Have some very simple code but it is Bug Checking from time to time.
Seems to be trouble with MDL.
if(*IoRequestPacket && (STATUS_MORE_PROCESSING_REQUIRED == status))
{
//do set up the filters completion routine and call it
IrpStack->CompletionRoutine = F_RECV_COMPLETION_ROUTINE ;
}
F_RECV_COMPLETION_ROUTINE(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP pIrp,
IN PVOID Context
)
{
PMDL pMDL = pIrp->MdlAddress ;
if(pMDL)
ulBytes = MmGetMdlByteCount(pMDL) ;
//call original Completion afterwards...
}
Bug Checks vary from DRIVER_IRQL... to IRQL_NOT_LESS...
Do I miss something? Since I am only filtering, I supposed that the MDL was
already locked. Tag: Class Specific Descriptors Tag: 50294
Question on IRP Cheat sheet SCENARIO 4: QUEUE FOR LATER, OR FORWARD AND REUSE
Hello,
I have questions regarding the IRP cheat sheet's SCENARIO 4: QUEUE FOR
LATER, OR FORWARD AND REUSE
http://support.microsoft.com/default.aspx?scid=kb;EN-US;320275
could somebody pls clarify these
thanks
Taha
===================================================
|SCENARIO 4: QUEUE FOR LATER, OR FORWARD AND REUSE|
===================================================
Question 1)
-----------
The comment in DispathRoutine_4 says the following:
//
// You mark the IRP pending if you are intending to --> queue the
IRP <----
// and process it later. If you are intending to forward the IRP
// directly, use one of the methods discussed earlier in this
article.
what is meant by "queue the IRP" over here?
Question 2)
-----------
In the explanation it says:
"
The completion routine can either return
STATUS_CONTINUE_COMPLETION or STATUS_MORE_PROCESSING_REQUIRED.
You return STATUS_MORE_PROCESSING_REQUIRED only if you intend to
reuse the IRP from another thread and
complete it later.
"
what does it mean by "if you intend to reuse the IRP from another
thread and
complete it later"?
Question 3)
-----------
In CompletionRoutine_42 (.....
Here in the comment it sys:
//
// Because you are stopping the completion of the IRP by returning
the
// following status, you must complete the IRP later.
What is meant by "you must complete the IRP later." , later when ,
why and how? Tag: Class Specific Descriptors Tag: 50293
Question on IRP Cheat sheet SCENARIO 4: QUEUE FOR LATER, OR FORWARD AND REUSE
Hello,
I have questions regarding the IRP cheat sheet's SCENARIO 4: QUEUE FOR
LATER, OR FORWARD AND REUSE
http://support.microsoft.com/default.aspx?scid=kb;EN-US;320275
could somebody pls clarify these
thanks
Taha
===================================================
|SCENARIO 4: QUEUE FOR LATER, OR FORWARD AND REUSE|
===================================================
Question 1)
-----------
The comment in DispathRoutine_4 says the following:
//
// You mark the IRP pending if you are intending to --> queue the
IRP <----
// and process it later. If you are intending to forward the IRP
// directly, use one of the methods discussed earlier in this
article.
what is meant by "queue the IRP" over here?
Question 2)
-----------
In the explanation it says:
"
The completion routine can either return
STATUS_CONTINUE_COMPLETION or STATUS_MORE_PROCESSING_REQUIRED.
You return STATUS_MORE_PROCESSING_REQUIRED only if you intend to
reuse the IRP from another thread and
complete it later.
"
what does it mean by "if you intend to reuse the IRP from another
thread and
complete it later"?
Question 3)
-----------
In CompletionRoutine_42 (.....
Here in the comment it sys:
//
// Because you are stopping the completion of the IRP by returning
the
// following status, you must complete the IRP later.
What is meant by "you must complete the IRP later." , later when ,
why and how? Tag: Class Specific Descriptors Tag: 50292
Questions on IRP Cheat Sheet ==> SCENARIO 2: FORWARD AND WAIT
Hello,
I have questions regarding the IRP cheat sheet's Scenario 2 , Forward
and Wait.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;320275
could somebody pls clarify these
thanks
Taha
Question 1 )
------------
in DispatchRoutine_2 ( ...
if (status == STATUS_PENDING) {
does this return value of STATUS_PENDING mean that the completion
routine of some lower level driver
would have returned STATUS_MORE_PROCESSING_REQUIRED?
Question 2)
-----------
in DispatchRoutine_2 ( ...
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return status;
i) What control flow will the call to IoCompleteRequest initiate?
ii) To whom will the "return status;" statement give control
How are i) and ii) above inter-related? Tag: Class Specific Descriptors Tag: 50291
Questions on IRP Cheat Sheet ==> SCENARIO 2: FORWARD AND WAIT
Hello,
I have questions regarding the IRP cheat sheet's Scenario 2 , Forward
and Wait.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;320275
could somebody pls clarify these
thanks
Taha
Question 1 )
------------
in DispatchRoutine_2 ( ...
if (status == STATUS_PENDING) {
does this return value of STATUS_PENDING mean that the completion
routine of some lower level driver
would have returned STATUS_MORE_PROCESSING_REQUIRED?
Question 2)
-----------
in DispatchRoutine_2 ( ...
IoCompleteRequest (Irp, IO_NO_INCREMENT);
return status;
i) What control flow will the call to IoCompleteRequest initiate?
ii) To whom will the "return status;" statement give control
How are i) and ii) above inter-related? Tag: Class Specific Descriptors Tag: 50290
simple & stripe volumes filter driver differences ?
Hi
i got a working simple volume filter driver, it is installed as an
upperfilter driver.
When working with stripe volumes it does not write and / or read the
data correctly.
What is different between simple and stripe volumes for that driver
then ?
Thanks. Tag: Class Specific Descriptors Tag: 50288
after application call CancelIO
USB device .
after application called CancelIO,
driver receive two IRPs with ioControlCode 0x80002004 and 0x8000201C ,
how to find out the meaning of these ioControlcodes?
I tried to split it in to parts as DDK defined,but i don't know how to do
next.
Is there a way to get the meaning? Tag: Class Specific Descriptors Tag: 50287
SetFeature DEVICE_REMOTE_WAKEUP
Sir...Good afternoon
I had a problem on USB RemoteWakeup, that Device is not belong to Keyboard
or mouse.
The Bit of "support remote wakeup" in device ConfigurationDescriptor Had
been Setted as 1 .
How can i make the Windows replay device a SetFeature to enable this
function?
or i should send SetFeature out while my driver checking
ConfigurationDescriptor??
May i have your kindly answer? Tag: Class Specific Descriptors Tag: 50286
static driver verifier?
Has anybody used any pre-release version of Microsoft's SDV ?
http://www.microsoft.com/whdc/devtools/tools/SDV.mspx
are there any updates on when would this be available ?
regards
Taha Tag: Class Specific Descriptors Tag: 50285
Driver debugging issue
Can anyone teach me how to step by step debug a kernel mode driver in
C++ source rathar than in DASM?
I am currently using DriverStudio 3.x but I don't know how to break a
driver. I've tried using DbgBreakPoint(), but it breaks in assembly
code. How can I debug in my C++ source?
also, if I issue GO command after breaking at DbgBreakPoint(), the
target system crash and reboot. How to solve it?
Besides Driver Studio, tutorials on how to debug kernel mode driver
in C++ source using WinDbg will also appreciated.
Thanks
David Tag: Class Specific Descriptors Tag: 50281
network link speed
Hello, does anyone know how the link speed is determined by Windows when
attached to a wireless network? I know Windows queries the Ndis driver using
OID_GEN_LINK_SPEED, which is supposed to return the max Tx rate. In a
wireless network, the max rate is determined by the Service Set. Therefore,
I would assume that when associating with a particular Access Point, I should
always get the same link speed. However, I've seen cases where the link
speed changes between 1, 2, 5.5 & 11Mbps - even though I'm still connected
(i.e. no disassociation/reassociation occurs). My service set consists of a
single Access Point, which is configured to use all 4 rates (i.e. they're all
marked Mandatory in the beacon parameter set).
Thx,
Rick Farrington Tag: Class Specific Descriptors Tag: 50272
IoBuildDeviceIoControlRequest
DDK for IoBuildDeviceIoControlRequest(...) says that field
" Event is set to to the signaled state when lower driver
has completed the requested operation..."
Does it mean that I/O Manager set Event ?
thanks,
dave Tag: Class Specific Descriptors Tag: 50271
AVStream: Saving MPEG2-PS to file with Dump filter sees loss of stream
Hi,
I'm using the Dump filter from the SDK to connect to my HW encoder and
save to file.
When I playback the file I get a loss of content everey couple ~5
seconds for ~1/3 of a second (my source shows time code on screen).
Wondering if any body has seen this problem?
Would it be possible that the latency from the dump filter writing to
the HD could cause this?
MY encoder buffers ~2 seconds of MPEG2-PS and never experiences an overflow.
Thx Tag: Class Specific Descriptors Tag: 50265
scsi troubles...
Hi folks,
my (first attempt of a) pcmcia scsi miniport driver is driving me insane...
The driver consists of only a DriverEntry() - which initializes a
HW_INITIALIZATION_DATA structure - and a few (empty) functions for the
drivers entry points. (As seen at MSDN->SCSI Miniport Drivers).
Here's how the initialization of the HW_INITIALIZATION_DATA structure
looks like:
ULONG DriverEntry(IN PVOID DriverObject, IN PVOID Argument2)
{
HW_INITIALIZATION_DATA InitData;
ULONG Status;
ULONG i;
for (i=0; i<sizeof(HW_INITIALIZATION_DATA); i++)
((PUCHAR)&InitData)[i] = 0;
InitData.HwInitializationDataSize = sizeof(HW_INITIALIZATION_DATA);
InitData.AdapterInterfaceType = PCMCIABus;
InitData.DeviceExtensionSize = sizeof(MY_DEV_EXT);
InitData.NumberOfAccessRanges = 2;
InitData.HwFindAdapter = FFS_FindAdapter;
InitData.HwInitialize = FFS_HwInitialize;
InitData.HwStartIo = FFS_StartIo;
InitData.HwResetBus = FFS_ResetBus;
InitData.HwAdapterControl = FFS_AdapterControl;
InitData.HwInterrupt = FFS_Interrupt;
InitData.HwAdapterState = FFS_AdapterState;
InitData.HwDmaStarted = NULL;
Status = ScsiPortInitialize(DriverObject, Argument2,
&InitData, NULL);
__asm int 3
return(Status);
}
The bare minimum inf file to install my bare minimum driver looks like
this:
[Version]
Signature="$WINDOWS NT$"
Class=MTD
ClassGuid={4D36E970-E325-11CE-BFC1-08002BE10318}
Provider="Mike"
DriverVer=08/14/2004
[DestinationDirs]
DefaultDestDir=12
[Manufacturer]
"Flashcard"=DeviceList
[DeviceList]
"PCMCIA Flashcard"=DriverInstall,PCMCIA\UNKNOWN_MANUFACTURER-0000
[DriverInstall.NTx86]
CopyFiles=@ffs.sys
[DriverInstall.NTx86.Services]
AddService=ffs, 2, ServiceInstallSettings
[ServiceInstallSettings]
DisplayName = "PCMCIA Flashcard"
ServiceType = 1
StartType = 3
ErrorControl = 1
ServiceBinary = %12%\ffs.sys
LoadOrderGroup = SCSI Miniport
Dependencies = PCMCIA
AddReg = ServiceRegistryEntries
[ServiceRegistryEntries]
HKR, "Parameters\PnpInterface", "8", 0x00010001, 0x00000001
The driver is ment to be pnp compliant as the PnpInterface registry key
and the presence of the HwAdapterState-function indicate.
After the driver is installed and a memory card is pluged in, the drivers
DriverEntry() function is called and ScsiPortInitialize() returnes a value
of zero. (Which seems to be ok). But after that, no other function will be
called!
The main question is: Why is no other function than DriverEntry() called?
Acording to MSDN this may happen if PnpInterface is present but the driver
is not installed as a service for the device. Which leads directly to the
question:
The above inf file should install the driver ffs.sys as service (with
the name 'ffs') for devices of type PCMCIA\UNKNOWN_MANUFACTURER-0000.
Is this the case? Or do you see any mistakes?
(I used msdn and Oneys WDM book to 'tinker' the above inf file together,
but it's well possible that i've missed something... ?!?)
I have no idea why my driver does not initialize proper. Maybe a legacy
driver would be a better idea than a pnp driver...
Please let me know if you have any advice.
Thanks in advance,
Mike Tag: Class Specific Descriptors Tag: 50264
USB Driver : 0xC0000B00 + 0xC000A00 errors with Isochronous OUT Endpoint when ASAP is specified !
Hi,
My device supports an Isochronous OUT Endpoint, set to 895 bytes/ms.
Also I would like to fully use this endpoint (ie : fill in all
Isochronous OUT frames each millisecond).
To do this, I implemented a stuff that sends 4 pending URBs to the USB
Bus driver. Each URB also gets completed but some are completed with
0xC0000B00 error (USBD_STATUS_ISOCH_REQUEST_FAILED).
For those URBs that fails with this error, Iso packets (that do not have
data) are told to be in error (0xC0000A00 = USBD_STATUS_BAD_START_FRAME),
whereas all URB are sent with the USBD_START_ISO_TRANSFER_ASAP flag.
Does anyone knows this kind of problem, and is there any trick to fix
this problem ?
Thanks by advance !
Sebastien Tag: Class Specific Descriptors Tag: 50258
Are Class specific descriptors also obtained as part of the
GET_DESCRIPTOR(ConfigurationType) alongwith the interface and endpoint
descriptors ?