Crash Dump Analysis
Hello All,
i have posted a query regarding the crash few days ago. Yakub
suggested me to do !wdfdevicequeues for seeing if there are any
pending requests.
I did the following for the serial driver. i opened the hyper terminal
and here is the output for above command.
kd> !wdfdevicequeues 0x7d569a48
Dumping queues of WDFDEVICE 0x7d569a48
=====================================
Number of queues: 4
----------------------------------
Queue: 1 (!wdfqueue 0x7d5259e0)
Parallel, Power-managed, PowerOn, Can accept, Can dispatch,
ExecutionLevelDispatch, SynchronizationScopeDevice
Number of driver owned requests: 2
!WDFREQUEST 0x7d52e510 !IRP 0x82817b48
!WDFREQUEST 0x7d83c180 !IRP 0x822bd490
Number of waiting requests: 0
Number of driver owned cancelable requests: 2
!WDFREQUEST 0x7d52e510 !IRP 0x82817b48
!WDFREQUEST 0x7d83c180 !IRP 0x822bd490
EvtIoRead: (0xaad056a0) usbservista!SerialEvtIoRead
EvtIoWrite: (0xaad05940) usbservista!SerialEvtIoWrite
EvtIoDeviceControl: (0xaacffab0) usbservista!
SerialEvtIoDeviceControl
EvtIoInternalDeviceControl: (0xaad00010) usbservista!
SerialEvtIoInternalDeviceControl
EvtIoCanceledOnQueue: (0xaacfef80) usbservista!
SerialEvtCanceledOnQueue
----------------------------------
Queue: 2 (!wdfqueue 0x7d5247f8)
Manual, Power-managed, PowerOn, Can accept, Can dispatch,
ExecutionLevelDispatch, SynchronizationScopeDevice
Number of driver owned requests: 0
Number of waiting requests: 0
EvtIoCanceledOnQueue: (0xaacfef80) usbservista!
SerialEvtCanceledOnQueue
----------------------------------
Queue: 3 (!wdfqueue 0x7d5237f8)
Manual, Power-managed, PowerOn, Can accept, Can dispatch,
ExecutionLevelDispatch, SynchronizationScopeDevice
Number of driver owned requests: 0
Number of waiting requests: 0
EvtIoCanceledOnQueue: (0xaacfef80) usbservista!
SerialEvtCanceledOnQueue
----------------------------------
Queue: 4 (!wdfqueue 0x7d522a88)
Manual, Power-managed, PowerOn, Can accept, Can dispatch,
ExecutionLevelDispatch, SynchronizationScopeDevice
Number of driver owned requests: 0
Number of waiting requests: 0
EvtIoCanceledOnQueue: (0xaacfef80) usbservista!
SerialEvtCanceledOnQueue
I closed the hypterminal then i get the following output for the above
command.
kd> !wdfdevicequeues 0x7d569a48
Dumping queues of WDFDEVICE 0x7d569a48
=====================================
Number of queues: 4
----------------------------------
Queue: 1 (!wdfqueue 0x7d5259e0)
Parallel, Power-managed, PowerOn, Can accept, Can dispatch,
ExecutionLevelDispatch, SynchronizationScopeDevice
Number of driver owned requests: 0
Number of waiting requests: 0
Number of driver owned cancelable requests: 1
!WDFREQUEST 0x00000034 !IRP 0x82817b48
Failed to get a pointer @ 0xfffffff4: invalid address, or memory is
paged out?
c0000005 Exception in D:\WINDDK\6000\bin\x86\wdfkd.wdfdevicequeues
debugger extension.
PC: 7c812a5b VA: 00000000 R/W: 1003f Parameter: 00000000
im not able to figure out what is going wrong. Can any one help me in
analyzing the problem.
Thank You.
Regards,
uba Tag: ATAPort Tag: 95515
chkinf bug: No )'s in the path so no DirectX in the path
Hi,
Running chkinf gives me:
\Utilities\Bin\x86 was unexpected at this time.
This is part of a DirectX install which adds the following to the path:
C:\Program Files\Microsoft DirectX SDK (April 2007)\Utilities\Bin\x86
I'm guessing the problem is this "for" line (about line 27):
for %%I in (%PATH%) do (
if exist %%~fsI\chkinf.bat (
set PLibPath=-I%%I
goto runit
)
The "if" may become a problem too.
I worked around the problem by modifying the path variable to not have
that directory in the path. I did this by:
1. Typing "echo %path%"
2. Copying the path to notepad
3. Deleting the problematic directory
4. Coping the new text for the path variable
5. typing "path=" followed by pasting the new list of directories
I'm not sure, but it appears another work around is to add the chkinf
directory to the beginning of the path variable.
I'm not sure where to report this issue, and my quick check doesn't show
any documentation on this issue. I hope this is the appropriate way to
get this fixed or at least documented. If not, please advise me.
Thanks,
Drew Daniels Tag: ATAPort Tag: 95514
USB communication hangs
Hello NG,
I am currently testing our self-developed USB device driver. It works fine
on most machines. However on a few machines it seems as if a reading
operation which has been passed down the stack does not return. Meaning the
completion routine is never called and therefore the IRP is never completed.
As my application is performing synchronous IO-operation on the device my
application hangs up and can be ended only by killing it through the task
manager. I found this strange driver behaviour by implementing several debug
traces in a checked version of the driver and watching that traces with
debug view. Debugging the driver with WinDBG also did not bring anything
new. Here a short code snippet how I pass down the IRP to the lower driver:
//***************************************************************************************************************************************
pNextStack=IoGetNextIrpStackLocation(pIrp);
pNextStack->MajorFunction=IRP_MJ_INTERNAL_DEVICE_CONTROL;
pNextStack->Parameters.Others.Argument1=(PVOID)pUrb;
pNextStack->Parameters.DeviceIoControl.IoControlCode=IOCTL_INTERNAL_USB_SUBMIT_URB;
IoSetCompletionRoutine(pIrp, ReadCompletion, pReadContext, TRUE, TRUE,
TRUE);
IoMarkIrpPending(pIrp);
ntStatus=IoCallDriver(pDeviceInfo->pNextDeviceObject, pIrp);
return STATUS_PENDING;
//***************************************************************************************************************************************
What can be the reason for not getting the IRP completed? Any ideas?
Thanks in advance
Benji Tag: ATAPort Tag: 95512
Disabling Devices by calling Setupapi.dll, or Converting Devcon to C#
Hello group,
My C# app needs to disable and re-enable devices. I did some research
and found that I could do exactly what I wanted by using Devcon from
the DDK.
Devcon disable =net @ROOT\POSNATMP\0001
Now, the next challenge is getting this to work in my app. Devcon
comes with its C++ source. I see that the function makes SetupDi*
calls to the Setupapi.dll library. I am not quite sure how to do this
in C#.
I followed Vladimir Afanasyev articles and got a little closer. I can
enumerate the devices and properties. Afanasyev mentions, in the user
comments, that you can disable devices as well but does not provide
sample code. This means I am much closer but still not quite able to
toggle the device drivers.
In sum, I am looking for the answer to one of three questions.
1) Does the .Net Framework 2 provide a way to disable/enable devices?
2) If it does not, what is the best way to convert Devcon C++ sample
to a C# app?
3) Alternatively, what could I add to Vladimir Afanasyev's code to
disable/enable devices?
Thanks in advance,
J Wolfgang Goerlich
Related Links:
Microsoft Article 311272, The DevCon command-line utility functions as
an alternative to Device Manager
http://support.microsoft.com/kb/311272
.NET - Diving into System Programming - Part 1, 2, 3
By Vladimir Afanasyev
http://www.codeproject.com/cs/system/divingsysprog1.asp
http://www.codeproject.com/cs/system/divingsysprog2.asp
http://www.codeproject.com/cs/system/divingsysprog2.asp Tag: ATAPort Tag: 95502
Why is IoStatus.Information is so sensitive?
In a completion routine for a (pending) IRP for writing numBytes
(coming via DeviceIoControl), I am setting the IoStatus block before
calling IoCompleteRequest():
irp->IoStatus.Status = STATUS_SUCCESS;
irp->IoStatus.Information = numBytes;
IoCompleteRequest(irp, IO_NO_INCREMENT);
The strange thing is that if I set irp->IoStatus.Information to the
actual numBytes that were written (several hundreds), the driver
doesn't like it... Strange things happen like access violation etc.
But... if I set irp->IoStatus.Information to a hard coded value of 4,
all is well.
Why?
Isn't irp->IoStatus.Information supposed to actually relay back (to
the caller of DeviceIoControl) any number desired? (in this case the
number of bytes actually written, just like file I/O for example.
I tried to find some documentation about the *purpose* and *intended
use* of IoStatus.Information but all I could find is:
"This is set to a request-dependent value. For example, on successful
completion of a transfer request, this is set to the number of bytes
transferred. If a transfer request is completed with another
STATUS_XXX, this member is set to zero."
Now... I *am* returning STATUS_SUCCESS, so what's wrong with returning
a number greater than 4?
Thanks,
Don Tag: ATAPort Tag: 95485
mirror driver and service in multiple sessions
Hi all,
I developed a mirror driver that is able to map its framebuffer into a
usermode process' context. (The usermode app does this by calling ExtEscape
on the mirror driver). This is all working fine but what i really want is a
seperate service .exe and be able to map a specific session's mirror driver
framebuffer into that service app.
Obviously the problem here is that the server .exe and the session the
mirror driver is in are probably different. I was thinking about using some
kind of intermediate/broker process in every session but I'd really like to
avoid ending up mapping the mirror driver's framebuffer into this
intermediate/broker process and then somehow send it to the service app. So
in other words: i want to be able to call a particular mirror driver's
DrvEscape function so that it can map the framebuffer into the calling
process (my service in this case).
Thanks in advance! Tag: ATAPort Tag: 95474
New to driver development
Hi,
We are developing a USB thermal printer driver. We were able to install our
printer using the sample codes from the DDK but how do we issue commands when
we do the actual printing? I mean how do we issue the ESC sequences that are
sent to the printer? Where do we write the code for this purpose?
Regards,
Samir Tag: ATAPort Tag: 95470
Pagefile and FSCTL_QUERY_RETRIEVAL_POINTERS
Is FSCTL_QUERY_RETRIEVAL_POINTERS just for the first pagefile on the boot
volume or does it also work for additional pagefiles? I am trying to
interpret the following comment by Tony Mason: "<!--StartFragment-->That is
why FSCTL_QUERY_RETRIEVAL_POINTERS only works on the boot drive's
paging file (the dump driver needs the blocks to dump it)."
http://www.osronline.com/showThread.cfm?link=40066.
Regards,
George. Tag: ATAPort Tag: 95458
Virtual network adapter ?
Hello,
I'm willing to write a virtual network adapter, which won't be
connected to any real hardware, but will be "driven" by a running
application: packet sent to this adapter shall be read by this
application, and the app sometimes send packets to the adapter which
are to be dispatched on whoever read on the specified port.
The problem being, I'm new to driver developpement. Thus I have a
couple of questions:
1 - I've installed the latest windows DDK, is ti correct ? I've seen
another framework, but it seems to be vista only out of the box, right ?
2 - I'm looking at the "netvmini" sample provided by microsoft, since
it also create a virtual network adapter, again, am I correct ? I'm a
little lost between all teh different NDIS drivers types.
3 - What is the best way to make my driver and the running application
communicate ? Ioctl control, shared memory, ... ?
And what function in the driver should I look at on msdn for
receiving/sending packet ? (aka: where in the driver should I put my
logic for reading packets from the application, and sending the
received packet to the application).
Thanks for any answer
--
Lepidosteus / Vianney Devreese
mail: lepidosteus at gmail dot com
url: http://lepidosteus.com Tag: ATAPort Tag: 95452
Create a virtual network adapter ?
Hello,
I need to create a driver for a virtual network adapter, the prupose
being to allow softwares to communicate on it asif it was a real
connection, while in fact it is controlled by a running application
(packets sent to it are read by this application, and the same
application sometimes needs to send packets "trough" this interface to
answer).
I'm new to driver coding, so I have some questions:
1 - I'm using the latest Windows DDK to develop this, is it correct ?
(I've seen another framework for vista drivers, but I guess it isn't
backward compatible out of the box ?)
2 - to do this, I'm studying the "netvmini" sample provided by
microsoft, since it creates a virtual adapter that, well, do nothing.
Am I correct ? (I'm a little lost between the different kind of NDIS
drivers)
3 - How to make it write and read its packet to an application ? What I
would like to know is both the best way to share data between them
(shared memory ? ioctl control ?), and the two "base" fonction I should
look at for sending/receiving packets (I've found no how to, so all I
can do is study the api for this function).
Thanks a lot for any anwser
--
Lepidosteus / Vianney Devreese
mail: lepidosteus at gmail dot com Tag: ATAPort Tag: 95451
WDK 6000 build env error "error '-f' is not recognized as an internal or external command"
First thanks a lot to Doron Holan & Eliyas Yakub for your help.
I'm moved into WDK 6000 with KMDF 1.5 ,then the Common buffer allocation
works well ,if failed ,I can see the yellow "!" in my device manager.But
there is a small problem between my building progress.Followwing is the
error log:
*************************************
errors in directory l:\work\file4drvtest\kerneldrv\src
l:\work\file4drvtest\kerneldrv\src\generating code... : error '-f' is not
recognized as an internal or external command,
*************************************
And my build command window log:
***********************************
L:\Work\File4DrvTest\KernelDrv\Src>build -ceg
BUILD: Compile and Link for x86
BUILD: Loading e:\winddk\6000\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Start time: Sat Jun 02 15:22:57 2007
BUILD: Examining l:\work\file4drvtest\kerneldrv\src directory for files to
compi
le.
l:\work\file4drvtest\kerneldrv\src - 7 source files (4,550 lines)
BUILD: Saving e:\winddk\6000\build.dat...
BUILD: Compiling l:\work\file4drvtest\kerneldrv\src directory
_NT_TARGET_VERSION SET TO WINXP
Precompiling - precomp.h
Compiling - adxdev.rc
Compiling - adxdev.c
Compiling - init.c
Compiling - isrdpc.c
Compiling - read.c
Compiling - write.c
Compiling - generating code...
Compiling - generating code...
errors in directory l:\work\file4drvtest\kerneldrv\src
l:\work\file4drvtest\kerneldrv\src\generating code... : error '-f' is not
recogn
ized as an internal or external command,
BUILD: Linking l:\work\file4drvtest\kerneldrv\src directory
_NT_TARGET_VERSION SET TO WINXP
Linking Executable - objfre_wxp_x86\i386\adx16xx.sys
BUILD: Finish time: Sat Jun 02 15:23:00 2007
BUILD: Done
11 files compiled - 1 Error - 4550 LPS
1 executable built
************************************
And the followwing is my "sources" file context:
************************************
TARGETNAME=Adx16xx
TARGETTYPE=DRIVER
KMDF_VERSION=1
INF_NAME=Adx16xx
MISCFILES=$(OBJ_PATH)\$(O)\$(INF_NAME).inf
NTTARGETFILES=
TARGETLIBS=$(TARGETLIBS) \
$(DDK_LIB_PATH)\ntstrsafe.lib
PRECOMPILED_INCLUDE=precomp.h
PRECOMPILED_PCH=precomp.pch
PRECOMPILED_OBJ=precomp.obj
#C_DEFINES = $(C_DEFINES) -DASSOC_WRITE_REQUEST_WITH_DMA_TRANSACTION=1
SOURCES= AdxDev.rc \
AdxDev.c \
Init.c \
IsrDpc.c \
Read.c \
Write.c
#
# Generate WPP tracing code
# $(SOURCES) -- run software preprocessor on files listed in SOURCES
# -km -- use kernel mode
# -func -- define function we'll use for tracing
# This would map all TraceEvents calls to
# DoTraceMessage.
#
RUN_WPP= $(SOURCES) \
-km \
-func:TraceEvents(LEVEL,FLAGS,MSG,...) \
-gen:{km-WdfDefault.tpl}*.tmh
*****************************************
Can you give some suggestions to aviod the error?
Thanks ! Tag: ATAPort Tag: 95449
Oemui and Oemuni...what's the difference?
Hi,
I am currently working on trying to convert an oemuni image
printing driver to a user-mode driver instead of a kernel-mode driver
for use in Windows Vista.
First question, is there any reason an oemuni driver cannot be
implemented as a user-mode driver? I've found these two resources on
conversion
([url]http://www.unixwiz.net/techtips/win32-pdriver-ktou.html[/url] and
[url]http://msdn2.microsoft.com/en-us/library/ms801104.aspx[/url]) and
have tried converting along those guidelines, but am still unable to
compile my driver in user mode with the ddk.
Second question, is there a major difference/what is the
difference between oemuni drivers and oemui drivers? I was considering
porting the oemuni driver to oemui, since oemui is already compiled
under user mode, but I'm not sure if that's even possible.
Again, just for reference, I am working on a print driver that
saves the printed document as a sequenced image file (which has been
tested in Windows XP) and am trying to port it to a user-mode driver for
use in Windows Vista (since vista does not allow kernel-mode drivers).
Any replies/references/etc are appreciated. Thanks for taking the
time to read this thread!
Nuvious
P.S. I am working for a company that produces this software as a
FREERWARE utility, so I am unable to post any code due to legal
restrictions. Again, any help is appreciated.
--
Nuvious
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: ATAPort Tag: 95443
storport requests queue
Hi
I am developing a storport mini-port driver for Vista and I got a strange
problem â?? the storport queues not more than 20 requests against my mini-port
driver; I generated different workloads and under heavy load I can see that
my mini-driver has 20 outstanding requests practically all the time during
the test
Any idea how this limitation gets imposed?
TIA
Andrew Tag: ATAPort Tag: 95439
How to get debug prints in WinDbg from Vista
I'm trying to debug my property page provider application on 32bit variant
of Vista Ultimate by using WinDbg with a serial connection to try and
capture the snapshots being sent by the "OutputDebugString" calls, but
nothing comes out to the command window! The same application works just
fine under Windows XP, Server 2003, and Windows 2000.
I've inserted the "IsDebuggerPresent" and "DebugBreak" function calls only
to learn that the former returns a FALSE to the local variable receiving the
value when the breakpoint is hit on the latter call. What isn't clear is
why the debug connection is established and control is passed to the
debugger, yet "IsDebuggerPresent" returns a false and "OutputDebugString"
calls are not routed through the connection?
I've tried setting the "Debug Print File" as defined in
http://www.osronline.com/article.cfm?article=295, but to no avail. Is there
another trick to getting debug print statements out of Vista to WinDbg that
I'm missing? Tag: ATAPort Tag: 95434
Property sheets in Printer Preferences
I have a problem with a property page in the printer preferences.
I am setting a handle to my current printer in the creation of the property
page.
Page.lParam = (long)((OEMUIPSPARAM*)(pPSUIInfo->lParamInit))->hPrinter;
When I open this page I save this printer handle in
case WM_INITDIALOG:
// OpenPrinter
hPrinter = (HANDLE)((PROPSHEETPAGE *)lParam)->lParam;
VERBOSE(PRNTEXT("Printer handle [%x]\n"), hPrinter);
UserData.hPrinter = hPrinter;
PUserData1 = &UserData;
SetLastError(0);
if ((PUserData =
(CBMYUSERDATA*)SetWindowLong(hDlg,GWL_USERDATA,(DWORD)PUserData1)) == 0)
{
dwError = GetLastError();
}
Now when I get into the case case WM_NOTIFY:
it works to retrieve this printer handle and work with it, but when I press
a button on the dialog it goes into case WM_COMMAND:
and my handle is false!
What am I doing wrong here? I need the access to the printer handle to use
GetPrinterData and SetPrinterData.
Any help appreciated.
Thanks,
--
\Manfred Tag: ATAPort Tag: 95430
kernel memory hog
There is a certain well know virus/spyware protection company, (not mcaffe,
not symantec) that uses a gigantic chunk (around 78 MB ) of paged memory in
the kernel and NEVER relinquishes it.
If this stuff is installed on a computer, my software , which uses a
substantial chunk of paged memory from time to time will simply not
function.
So far I've not gotten anyone's attention beyond the 1st line of technical
support
The unnamed company is much bigger than me, what can be done?????
I'd hate to think about forcing my driver to load early, grabbing what it
needs before this hog gets it snout in the trough ....That would result in 2
hogs with the expected results ... blah blah.
--
Gak -
Finecats Tag: ATAPort Tag: 95427
strange things about NET_BUFFER_LIST
hi everybody
I write a miniport driver under Vista base on the sample rtlnwifi, and I
crypt the out data. What I do like this:
1, get the NET_BUFFER from NET_BUFFER_LIST
2, get the MDL from this NET_BUFFER
3, get the data address of the MDL
4, so I copy all the data of the NET_BUFFER_LIST to a buffer use this
method, and I crypt the data within the buffer(size of data not changed)
5, at last I copy the data back to NET_BUUFER_LIST, send it out through the
NIC
on the other PC which has Vista on it, I decrypt the data.
The problem is:
I share a fold, and copy some files in it, such as 123.txt or aaa.bmp, from
PC1 to PC2, PC2 can get the
file correctly, but the strange thing is that the files on PC1 are changed,
even the fold is read only! aaa.bmp can not be recognized as BMP file, and
the content of 123.txt which should be "123" also can not be recognized. It
seems that when I crypt the data and copy it back to NBL, I also change the
content of the file(or the content in memory, because after I reboot, the
files are be OK). But I think that the NBL which my miniport get from the
protocol driver should can be modified, it should not changed the content of
any file or other things.
Sorry for my poor English.
--
Arthur Tu
best regards Tag: ATAPort Tag: 95417
Does devcon.exe work at all?
I am trying to use devcon.exe to ease the pain of repetitively re-
installing a device driver under development for test & debug
purposes.
The device driver I am developing is based on MSVA (i.e. has no real
hardware).
When I attemp invoking it like this:
devcon.exe update msvad.inf
I get the error message: "devcon.exe: Invalid use of update."
It seems that it also requires hwid as the second parameter?
So I typed:
devcon.exe hwids *
but all I get is: "No matching devices found."
What could be not matching in the wild card * ?????????
What does devcon.exe do? Does it work at all?
Or am I so sleepless and tired that I can't even get a clue how to use
a simple tool like this?
Thanks,
Don
P.S. If there is another way to re-install a driver (specified by .inf
and a path to the actual location of the .sys driver file) without the
annoying required mouse clicking on the update driver wizard, I would
appreciate describing it here. Tag: ATAPort Tag: 95415
Spooler does not inform the Port Monitor about errors
I have compiled the XPSDrv demo targeting Windows Vista and run it on
Windows XP. It fails printing some documents causing the applicaitons to
hang when some standard print ports are used. I'm writing a custom print
monitor grounding on the DDK example. Both the redmon and my monitor receive
a premature EndDoc -- after a single 22-byte write is made. The following
error is recorded in the System Event Log:
" The document Microsoft Word - XPSDrv_Config-1.doc owned by valentin failed
to print on printer XPSDrv Sample Driver. Data type: RAW. Size of the spool
file in bytes: 405633. Number of bytes printed: 65577. Total number of pages
in the document: 11. Number of pages printed: 0. Client machine: \\MERCURY.
Win32 error code returned by the print processor: 2147549183 (0x8000ffff). "
The same problem is observed when using RedMon -- it starts your application
and delivers only 22 first bytes to it. There is no way to inform the
application about failure since the monitor is not aware of it itself. I was
trying getting error flag from job status retreived via GetJob in the EndDoc
of my monitor -- The status is PRINTING for normally finished jobs and is
additionally SPOOLING for the troublesome jobs. But but no error observed.
Furthermore, I have also noticed that XPSDrv does not notify the printqueue.
I have a monitor application, which logs all the activity in a printer's
queue but it is silent on the XPS sample driver regardless of whether the
job is printed sucessfully or fails. But that is another story.
I'm sure that 1) XPSDrv must be repaired; and 2) threads must fail fast. The
latter means that you should stop a task once one of it steps (which likely
is a preconditioin for the subsequent stages) fails. I see no reason to
invoke further processing from the monitor when printing fails and the
output is incomplete, therefore.
Thanks Tag: ATAPort Tag: 95414
Device Setup Class Question
Dear All,
We're developing a scientific instrument which communicates via USB to
transfer experimental procedures from the PC and stored results to the PC.
Can anyone advise on what Device Setup Class this should go into? I can't
see one but creating a custom setup class seems a like a big step for this
one product (all the others are major groups of devices)
We are using the Jungo system to do the comms, so we don't have a separate
driver as such, just an inf file to tell Windows to use the Jungo driver when
our instrument is connected. The instrument uses interrupt-mode transfers
only.
Thanks for your help. Tag: ATAPort Tag: 95412
Is there a MS approved general purpose USB driver ?
Hello MS team and group members,
I'm searching for a general purpose USB driver approved (aka signed ) by MS
that is available in Vista and/or XP and allows simple raw transfers to/from
device endpoints, mainly bulk and control transfers but iso will be a nice
addition.
Is there such a beast included with ddk/sdk or I have to do it the hard way ?
Best regards,
Mircea CIocan Tag: ATAPort Tag: 95410
composite device behavior of UVC device on Win98/ME/2000/XP?
I found UVC device would be a multi-interface USB device.
For example, interface 0 is for video control interface and interface 1 is
for video stream interface.
As I konw, multi-interface device will display composite device first, and
then find driver for each interface.
However, it seems that XP SP2 only query driver for interface 0 of UVC
device after display composite device.
It doesn't query driver for interface 1 of UVC device.
If I plug in UVC device on WinME, it will query driver for interface 0 and 1
of UVC device after display composite device.
If I plug in UVC device onWin2000, it doesn't display composite device.
Why doesn't Win2000 find composite device first for UVC device?
I think the behavior difference is a serious problem for developing UVC
driver on these OS.
For example, do I need to write different driver for each interface of UVC
device on WinME?
Do I need to handle multi-interface in one driver on Win2000?
Best Regards
Jack Huang Tag: ATAPort Tag: 95400
What's the best way to develop UVC driver for Win98/ME/2000?
Our device follows UVC spec.
Microsoft provides standard driver usbvideo.sys for UVC device on Win XP SP2
or later
I would develop the UVC driver for older OS such as Win98/ME/2000.
USB Camera driver can be developed based on AVStream or USBCamd model.
As I know, usbvideo.sys is a AVStream driver.
AVStream driver needs new DirectX is insatalled.
I am not sure whether this would be a issue for users of legacy OS.
We already have developed the camera driver based on USBCAMD model for other
PCam devices.
I hope we can develop UVC driver based on our current driver.
But I don't know whether any driver architecture limitation exists on
USBCAMD model.
Could anyone give me a suggestion?
Best Regards
Jack Huang Tag: ATAPort Tag: 95399
Debugging for beginners
I have just started to learn Video Capture device development. I have built
and installed the testcap sample that comes with the DDK. It have tested it
using AMCap and I can see the pretty test pattern (thanks Microsoft). My
next step is to understand how the driver works. To do this, I would like
to step-by-step the driver through a debugger. However, I am unsure how to
attach the debugger to the driver - I knew when I was working with a WIA
device I had to debug the WIA service. Does WDM work similarly? Or should
I be attaching to AMCap? Is it possible to debug the driver on the same
machine as it is running on - or do I need two computers connected by a
cable? Any guidance on the simplest approach would be much appreciated. Tag: ATAPort Tag: 95389
Software Publishing Certificate Certificate Authority
You document KMCS_Walkthrough.doc says to purchase a â??Software Publisher
Certificate from a commercial CA.â?? And â??For a list of SPC CAs, see
â??Resourcesâ?? at the end of this paper.â?? There is no list of CAs in the
Resources at the end of the paper.
Later on your document says to go to
http://www.microsoft.com/whdc/winlogo/drvsign/crosscert.mspx
â??This Web page includes:
â?¢ A list of Root Authority cross-certificates.
â?¢ A list of CAs that provide SPCs for kernel-mode code signing.â??
But again there is no list of CAs, but I will assume that the companies in
the Cross-Certificate List are included in the CA list. I then picked
VeriSign to investigate purchasing a â??Software Publisher Certificateâ??. But I
cannot find this certificate available from this source. Why is this so hard?
Please, tell me specifically what â??certificateâ?? or whatever to purchase in
order to sign kernel mode drivers. On one of the examples in the document it
says, â??Issued by: VeriSign Class 3 Code Signingâ??. So I went to VeriSign but
the only information I could find says that this is for object signing for
Internet Explorer, etc. Why is this so hard? Does VeriSign sell what I need
or do I have to look elsewhere? Where should I look and what should I buy?
The only mention of Digital Signing and Microsoft talks about Microsoft
Authenticode to sign .exe, .cab, .dll, and .ocx. But, I want to sign a
kernel mode driver. Is this the certificate or is there some other
certificate? Why is this so hard?
Also is there an updated document and web page that has correct information? Tag: ATAPort Tag: 95388
How to share a common file in 2 different inf set?
Hi,
Based on the INF copyfiles directive describe in the link below, it seems
that for files that is shared between 2 different inf driver sets, there is
no way to ensure that the latest version of the file gets retain in the
system since the COPYFLG_OVERWRITE_OLDER_ONLY flag is ignored by digitally
signed sets.
http://msdn2.microsoft.com/en-us/library/ms794560.aspx
Does anyone knows of any way to safely share a common file between 2
different inf driver set, such that one can always ensure that the newest
version of the file always gets retained by the system, no matter what the
order of installation was? Or is it not possible to share a common file
between 2 inf driver set that is digitally signed? Thanks
KS Tag: ATAPort Tag: 95382
RSS on windows Vista and IM driver
Hi ,
I am working on IM driver.
My IM driver creates ARP requests,If the underlying miniport driver
(this IM driver bound to) supports receive side scaling , what
additional steps IM driver should take before sending the packet and
after receiving the packet ?
Thanks Tag: ATAPort Tag: 95381
How to load KMDF SAMPLER driver in Windows Vista
i have compiled the KMDF sample driver . but i unable to load the this
driver any body please help on the same.
i following this step.
1. building the echo driver in Windows Vista build environment for
x86 .
2. Copy the all echo.sys,echo.inf,WdfCoinstaller010007.dll file in one
directory.
3. usin the Add new hardware wizard i give the above directory.
4. it will copy .sys file into the system32/driver direcotry.
but i will through the Error Code 37.
if any body the information related for the same please give.
thanks in Advance
sulabh Tag: ATAPort Tag: 95378
WDK 6001 driver is not loading the Windows Vista
Hello All,
i have build the sample driver which is available in WDK 6001. i am
using the Vista checked build environment for x86 system . i have
compiled and build driver properly but i unable to the load this
driver in Windows Vista operating system . In the installation disk i
have copied the echo.sys file, echo.inf file and
WdfCoinstaller010007.dll file. but windows given the error message 37.
if any body know please tell me.
Thanks in Advance.
sulabh Tag: ATAPort Tag: 95375
WDK Kit 6000 for Windows Vista
Hello All,
please tell me where i will get the WDK 6000 kit for building the KMDF
driver for Windows Vista.
thanks Tag: ATAPort Tag: 95372
File system Driver: File Properties window problem.
hello,
I am developing a file system driver right now.
I am successfully able to create file and directory.
There is a problem after that.
After creating the file when i right click on file my driver hangs,
The request IRP_MN_QUERY_DIRECTORY comes repeatedly.
I dont know how and why it is coming continuously?
please help me to solve this problem,
if you didn't understand my question completely then please ask me,
thanks in advance,
regards,
Hitesh Tag: ATAPort Tag: 95365
accessing physical memory mapped to a pci board
I would like to view physical memory that is mapped to a pci board. (I am
writing a driver for the board for a real-time OS and I would like to see
what data is in the board's registers after a successful startup in Windows
to help recreate that in the other OS.) I tried using a tool called WinIO
to try to create a virtual address to that physical memory. It works for
both read and write of some addresses, like 0x9FFF0. However, the resource
the board uses is address at 0xE8100000 which I cannot pick up with the
tool. I have confirmed that address in windows device manager and in the
BAR0 entry in the table that the PCI board registers with windows. Is there
some protection in Windows that I must circumvent to view that memory?
I am running XP SP2. The board's driver is installed and the board is
functioning properly in windows while I am trying to read the memory. I have
1 GB of physical RAM and a swap file of 1.5 GB. (the memory address that PCI
board is at appears to be about 3.8 GB offset (0xE8100000)... I'm not sure
why it is able to have an address that is beyond the sum of the physical and
swap memory.)
I appreciate any thoughts you have.
Thanks,
John Tag: ATAPort Tag: 95364
[WIA] Minidriver (UMDF/WDM), usbscan (32/64 bit) and certification
Hello,
In order to use a scanner on Windows XP/2003/Vista, we can't use an UMDF
driver, can we?
So, we have to start from the scanner minidriver sample "wiascanr", which is
a WDM driver. Is it ok for Vista?
In the WIA architecture, we have to make a minidriver (user mode) but we
need an USB driver (kernel mode) for instance... Is "usbscan.sys" always
correct?
And for a x64-based version of Vista?
Finally, in order to have a "Microsoft certification", are "wiascanr" and
"usbscan" usable?
Thank you very much!! Tag: ATAPort Tag: 95362
How to write a virtual com port driver on XP or later?
I would write a virtual com port driver on XP or later.
Is there any sample code for this?
or What should be the start point to study com port driver?
Best Regards
Jack Huang Tag: ATAPort Tag: 95359
Developing a device driver for a WiFi device
Hi...
I need to interface a WiFi device that defines its own protocols with a
Windows PC. I've done some Googling and a found a set of Windows WiFi APIs
that I think I can use.
Do I need to build a device driver? ( The device will never interact
directly with the kernel ) And what would be best IDE to use?
Thanks in advance... Tag: ATAPort Tag: 95358
Job opportunities
Hi everyone,
My employer has opened or is about to open several positions.
Four of them require skills and proficiency in Windows driver writing,
especially in Network and Storage drivers.
Thus there are great chances that the potential candidates are readers of
this newsgroup (and a few other ones. I am cross-posting).
I know this group is not made for that purpose and I apologize in advance
to those of you who are not interested (sorry for the cross postings too,
but the skills we are searching are quite hard to find, I want to maximize
our chances to find the right future colleagues).
Two positions are opened in Paris, France and two will be opened in the
USA (east coast) very soon.
In each location there is one Senior Engineer position and one
Developer-Engineer position.
Contact me in private (jobs at windowsdiskless dot com) for more details
(this is a forwarded e-mail address and I will receive the e-mails sent to
this address).
This is a real opportunity, not a fake!
Thanks in advance
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ Tag: ATAPort Tag: 95355
optimazation options on free build environment by default
Hi all.
I have a question about free build environment on WDK(version 6000).
On x86 Free Build Environment, MSC_OPTIMIZATION defaults to /0xs.
I understand that /Oxs implies the use of the Frame Pointer Omission (/Oy)
option.
but /Oy- is appointed in compile.
This cause is so that it is written as the following in "i386mk.inc" .
DBGFLAGS=$(DBGFLAGS) /Oy-
CFLAGS=$(386_FLAGS) $(NT386FLAGS) $(STDFLAGS) $(DBGFLAGS) $(PERFFLAGS)
$(USER_C_FLAGS)
Why will /Oy- be set ? Will there be any important meaning in setting /Oy- ? Tag: ATAPort Tag: 95350
windows ce 5.0 intermediate driver
hi all,
i'm new to windows ce... And i'm using windows ce 5.0 platform builder....
could any body tell me,how to install the intermediate driver using windows
ce 5.0 platform builder?
thanQ all Tag: ATAPort Tag: 95349
WDF DMA use
Hi. I'm designing a device driver that interacts with a master PCI DSP. I
have read the documentation regarding the DMA abstraction and have some
questions.
The way that the DMA will work is packet-based mode, and packets will be
4KByte. Packets will be allocated by a user mode process, and an MDL will be
built to describe this packet.
Although the packet size is equal to a page size (32 bit OS) it might be
fragment to several locations on the physical memory. A scatter\gather list
will hold the description of physical address per fragment.
The questions are:
1. What is the size of the smallest fragment? Will it be a byte?
1a. Can I assume what will be the number of fregamnts for 4096 bytes packet
(reminder - it was allocates in a user mode application)?
2. Can I set the number of fragments and size?
3. If I set the trasfer length to be 4096 bytes and my packet size is 4096
bytes will a transaction contain one transfer?
4. If the DSP interrupts when a trasfer is completed, however it interrupts
in other occasions, can the driver tell the difference? Can I write some
logic in the DPC (ISR of course cannot tell the difference) in order to
destingwish between two "reasons" of DSP interrupt?
5. Will a 4096 bytes
Thank you in advanced for your help! Tag: ATAPort Tag: 95333
How to progamatically do a USB "soft eject" like explorer
Windows explorer allows for a soft eject feature for USB drives that I would
like to recreate in my program. This is useful for USB drives where a
compact flash is inserted and removed but the USB drive remains connected to
the PC. Does anyone know what functions are involved to accomplish this? I
have seen code which accomplishes the hard eject (removing the entire USB
device) but not the soft eject which only flushes the cache.
Thanks Tag: ATAPort Tag: 95324
Re: No UINumber being assigned to PCI attached MPS devices in Vista
Eliyas,
The UINumber is correctly reported on XP. The same computer, BIOS and
adapters cards are used in both instances but with different boot
drives. The system uses PCI and PCI-X buses.
Should there be a difference between XP and Vista? Seems like a
bug...
We use the UINumber to show the physical position of Adapter cards in
systems we ship out. The user can then distinguish between multiple
Adapter cards installed in the same system, configure the cards,
attach cables, etc..
Needless to say, we will continue to ship our product with XP until we
can get everything working properly and with the same performance.
Thanks for your response,
Todd Lange
On May 29, 8:15 pm, "Eliyas Yakub [MSFT]"
<eliy...@online.microsoft.com> wrote:
> What are you trying to do with theUINumber?
>
> According to PCI folks, starting Vista, this information is reported if the
> ACPI firmware includes the UI information.
>
> Windows Vista populates the value forUINumberin the DEVICE_CAPABILITIES
> structure using one of the two methods based on the device types
>
> For PCI Express devices, a UI number is obtained by reading the Physical
> Slot Number value in the Slot Capabilities register. This is only when the
> PCI root bus implements an _OSC method and the firmware hands control for
> express features to the operating system using this method.
>
> For non-express devices, the PCI driver populates the UI number value from
> the parent.
> It is perfectly legit for the BIOS/firmware to provide UI number info (using
> _SUN method for instance). In this case, the value from this method
> over-writes the value populated by the PCI bus driver.
>
> -Eliyas
>
> <toddlan...@yahoo.com> wrote in message
>
> news:1180470255.199597.299690@m36g2000hse.googlegroups.com...
>
> > On May 25, 12:13 pm, "Del Fredricks"
> > <del.fredri...@ms.discussions.com> wrote:
> >> I have an MPS driver which relied upon theUINumberto identify which
> >> attached device was being addressed. Past OS's apparently assigned this
> >> attribute the PCI slot location of the MPS board. However, it appears as
> >> though Vista no longer performs this assignment. Is the a different
> >> mechanism that can be used which works in 2000, Server 2003, and XP?
>
> > Hi Del,
>
> > I've run across the same problem in Vista. We have an application
> > that scans the PCI bus and gets device id and physical slot number
> > (UINumber). I have tried three different methods of getting the
> >UINumber, but each method has failed.
>
> > I have tried the following:
>
> > 1) Calling IoGetDeviceProperty() with DevicePropertyUINumber as a
> > parameter. This fails with error code 0xC0000034
> > (STATUS_OBJECT_NAME_NOT_FOUND).
>
> > 2) Using IRP IRP_MN_QUERY_CAPABILITIES. This returns -1 in the
> >UINumberitem of the DEVICE_CAPABILITIES structure.
>
> > 3) Calling SetupDiGetDeviceRegistryProperty() with SPDRP_UI_NUMBER (I
> > also tried SPDRP_UI_NUMBER_DESC_FORMAT) as an input parameter. This
> > function returns FALSE with LastError set to (ERROR_INVALID_DATA).
>
> > There is no mention that this is not supported in Vista in the
> > documentation. It appears to be a Vista bug.
>
> > If you find out another method of getting this information, please let
> > me know.
>
> > Thanks,
>
> > Todd Lange Tag: ATAPort Tag: 95323
Question regarding COM ports
I'm trying to use a call to:
l = ComDBGetCurrentPortUsage( HComDB,
bufBits,
256,
CDB_REPORT_BITS,
pMaxPortsReported );
to determine if a USB serial port device is plugged in. Before plugging in
the device, the device manager reports that I have 2 COM ports and 2 printer
ports. After plugging in the device it reports 3 COM ports and 2 printer
ports. However, before plugging in the device, a call to
ComDBGetCurrentPortUsage fills in the bit array with 05 00 00... and after
the call it still returns 05 00 00... (for COM 1 and COM 3) How can I
determine if the USB COM device has been plugged in and if it has, what
number has been assigned to it?
It returns these values even if I powered up with the device unplugged.
The call to ComDBGetCurrentPortUsage is in a dll written in 'C++'. The call
to the dll is from a routine written in Visual Basic.
Thanks for your help
--
Regards,
Dean Tag: ATAPort Tag: 95315
WdfUsbTargetDeviceSendControlTransferSynchronously from TimerExpired function causes access violation
I'm currently writing a KMDF based driver that will upon insertion of
a USB device, download firmware to it and then reset the USB bus
causing re-enumeration. I'm not entirely clear on the best way to
implement this, my current plan is as follows:
* From EvtPrepareHardware, I start a timer which causes TimerExpired
to be called
* In TimerExpired, I do a USB control transfer to check device state,
upload a block of data and then set another timer.
I thought this should be working, but I'm running into an access
violation somewhere in the USB stack, and I'm not sure how to debug
this further. When I call this function from EvtPrepareHardware
itself, everything works fine, but calling it from TimerExpired causes
the access violation. The call stack at that moment is as follows:
(using KMDF 1.5)
nt!DbgBreakPoint
Wdf01000!imp_WdfUsbTargetDeviceSendControlTransferSynchronously+0x186
mydriver!WdfUsbTargetDeviceSendControlTransferSynchronously+0x29
mydriver!TimerExpired
Now I have two questions:
1. Should I be using this design or would you suggest a different way?
(the protocol requires me to sleep every now and then, and since you
can't just use Sleep() I decided to go for the design as described).
2. What could be causing the access violation? Is it not allowed to
call USB stack functions from TimerExpired?
My TimerExpired function looks something like this:
VOID TimerExpired(IN WDFTIMER Timer)
{
NTSTATUS status;
WDFDEVICE Device;
PDEVICE_CONTEXT pDeviceContext;
WDF_USB_CONTROL_SETUP_PACKET thePacket;
BYTE buf[16];
DWORD len, nbytes;
WDF_MEMORY_DESCRIPTOR memoryDescriptor;
Device = WdfTimerGetParentObject(Timer);
pDeviceContext = GetDeviceContext(Device);
WDF_USB_CONTROL_SETUP_PACKET_INIT_CLASS(
&thePacket,
BmRequestDeviceToHost,
BmRequestToInterface,
0x05,
0,
0
);
pDeviceContext = GetDeviceContext(Device);
WDF_MEMORY_DESCRIPTOR_INIT_BUFFER(&memoryDescriptor,
(PVOID) buf,
*len);
status = WdfUsbTargetDeviceSendControlTransferSynchronously(
pDeviceContext-
>WdfUsbTargetDevice,
WDF_NO_HANDLE, // Optional
WDFREQUEST
NULL, //
PWDF_REQUEST_SEND_OPTIONS
&thePacket,
&memoryDescriptor, //
MemoryDescriptor
&nbytes); // BytesTransferred
} Tag: ATAPort Tag: 95314
[problem in installing the KMDF sample driver in windows XP]
I am having a problem installing the KMDF sample driver in windows XP
operating system.
i am using the WinDDK/6001/ windows XP x86 checked build environment
for building the driver sys file. it will create the automatic inf
file . this inf file has Coinstaller.Section which is specifies the
WdfCoinstaller01007.dll file. WDK provides this file in WDK/redist
directory . i copied .inf file .sys file and WdfCoinstaller010007.dll
file in one directory . using the control panel add new hardware i
have installed the driver. but this is not installed the driver
properly.
it has given this error message:
"The specified resource type cannot be found in the image file".
if any body have idea to solve this error give suggestion:
thanks is advance.
sulibsp Tag: ATAPort Tag: 95313
Can we use cpp to write WDM driver ?
Hi
I found that some WDM audio driver source use cpp files , so can DDK use all
C++ class and library ?
Can we use other languages (like VB C# Java) to develop Microsoft drivers ?
Thank you Tag: ATAPort Tag: 95311
[KMDF] General question: test of a 64 bit driver
Is it really impossible to install uncertified driver on a 64 bit Vista ?
If yes, how to test the driver ? ^^
Thank you! Tag: ATAPort Tag: 95306
KMDF driver for XP
Hello All,
I am using Windows XP SP1. I have downloaded the WDK 6001 with KMDF
version 1.7.
when I tried to load the sample driver "echo" or "toaster", the
following error message is generated
"The specified resource name cannot be found in the image file"
Release notes says that, the sample drivers provided with KMDF 1.7 can
run on Windows Server 2003 / Vista.
Even a simple driver with DriverEntry with only KdPrint() on KMDF with
CoInstaller of 1.7, same error message is coming.
Please let me know how to solve this problem.
Also, whether can I use this WDK / KMDF version for XP driver
development?
-Kans. Tag: ATAPort Tag: 95305
How to get the packet of KS_TVTUNER_CHANGE_INFO in Analog tuner Dr
Hello:
I am studying analog tuner driver. I start from DDK Sample "anlgtuner". In
graphedt, it can play. When i want to change the channel, it stops work with
error code "Incorrect function 0x80070001".
It seems that the function to receive KS_TVTUNER_CHANGE_INFO is missed in
driver from DDK doc:
when the tuner switches from one channel to another, A minidriver must
propagate a tuning packet from its tuner filter, through the crossbar filter,
and then into the analog video input pin on its capture filter. This packet
is only available in user mode until it reaches the capture filter. The
minidriver receives this tuning packet as a KS_TVTUNER_CHANGE_INFO structure
on the analog video input pin of the minidriverâ??s capture filter.
I add AVStrMiniPinProcess callback routine in KSPIN_DISPATCH of the video
input pin of the capture filter. But this routine was never hit and error
still occured.
So how to get the packet of KS_TVTUNER_CHANGE_INFO in Analog tuner Driver?
Could somebody point me out?
Thanks
Max Tag: ATAPort Tag: 95304
code optimization hurt my driver
Once built with the default optimization in free build, my driver cannot
ackledge the interrupt flags (writing back to clear). Once I added /Od and
/Oi, the driver works fine again.
Anyone has suggestion where should I check for such kind of problem ?
Thanks
-Gary Tag: ATAPort Tag: 95291
avstream sample freezes system
hello,
i'm already wrote about this problem with no reply.
building avssamp example and using it with some client app freeze xp and
vista (this app is works well with real cameras). i can't find a way to
figure out what is the problem with, because bsod is not happening, just
mouse cursor is freezes and system is stall :( no error logs found on
reboot.
-Andrey Tag: ATAPort Tag: 95288
It was rumor floating around that MS planned to re-introduce the ATAPort on
this WinHECâ?¦did it happen?