[AVStream]: Device is not connected
Hi all,
I can use GraphEdit to build a graph for my video capture driver filter - an
AVStream minidriver. And VMR grants the connection between pins. But when I
"Run" the graph, an error message appears: "Device is not connected. Return
code: 0x8007048f".
In fact, if the real device is connected, the filter will not be inserted
into the graph. It's strange!
Does anyone meet this problem before?
Thanks for your help Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89950
SetupDiRemoveDevice questions?
Hi,
I want to remove 10 SATA disk running in AHCI mode without rebooting.
At the moment I eject each disk with SetupDiRemoveDevice one by one. It
takes about 3 seconds for each disk, for 10 disk about 30 seconds.
Everything is working fine.
If I eject each disk in its own thread, all 10 disks still needs 30
seconds to eject. It seems its not possible to eject more than one
disk simultaneously.
Is there a solution to eject all the disk at the same time?
Many thanks in advance,
Chris Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89949
Can not map the video memory into mapped file in mirror driver
Note: I copied the sample from Microsoft DDK and just added few code to
map the video memory to a file.
--
jarvisbao
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89946
Can not map the video memory into mapped file in mirror driver
I am writing a mirror driver to share the video memory with user-mode
applications, here is my idea:
1. In DrvEnablePDEV, create a mapped file (such as c:\mirror.dat) for
video memory by function EngMapFile, and store the mapped memory in the
point pVideoMemory of PPDEV. The map will be unmapped and the file will
be deleted in DrvDisablePDEV
2. In DrvEnableSurface, modify the surface with EngModifySurface.
The source code for DrvEnableSurface looks like:
HSURF DrvEnableSurface(
DHPDEV dhpdev)
{
PPDEV ppdev;
HSURF hsurf;
SIZEL sizl;
ULONG ulBitmapType;
FLONG flHooks;
ULONG mirrorsize;
MIRRSURF *mirrsurf;
DHSURF dhsurf;
LONG lDelta=0;
// Create engine bitmap around frame buffer.
ppdev = (PPDEV) dhpdev;
DISPDBG((0,"DISP
DrvEnableSurface:(%d,%d,%d)\n",ppdev->cxScreen,ppdev->cyScreen,ppdev->ulBitCount));
ppdev->ptlOrg.x = 0;
ppdev->ptlOrg.y = 0;
sizl.cx = ppdev->cxScreen;
sizl.cy = ppdev->cyScreen;
if (ppdev->ulBitCount == 16)
{
ulBitmapType = BMF_16BPP;
flHooks = HOOKS_BMF16BPP;
lDelta = ALIGNEDWIDTH(2 * sizl.cx);
}
else if (ppdev->ulBitCount == 24)
{
ulBitmapType = BMF_24BPP;
flHooks = HOOKS_BMF24BPP;
lDelta = ALIGNEDWIDTH(3 * sizl.cx);
}
else if(ppdev->ulBitCount==32)
{
ulBitmapType = BMF_32BPP;
flHooks = HOOKS_BMF32BPP;
lDelta = ALIGNEDWIDTH(4 * sizl.cx);
} else
return FALSE;
flHooks |= flGlobalHooks;
mirrorsize = (ULONG)(sizeof(MIRRSURF) +
lDelta * sizl.cy);
DISPDBG((0,"DISP DrvEnableSurface:
MirrorSize:%d,lDelta:%d,pVideoMemory:%lx",mirrorsize,lDelta,
ppdev->pVideoMemory));
mirrsurf = (MIRRSURF *) EngAllocMem(FL_ZERO_MEMORY,
mirrorsize,
0x4D495252);
if (!mirrsurf) {
RIP("DISP DrvEnableSurface failed EngAllocMem\n");
return(FALSE);
}
dhsurf = (DHSURF) mirrsurf;
hsurf = EngCreateDeviceSurface(dhsurf,
sizl,
ulBitmapType);
if (hsurf == (HSURF) 0)
{
DISPDBG((0,"DISP DrvEnableSurface failed
EngCreateDeviceSurface\n"));
return(FALSE);
}
if (!EngAssociateSurface(hsurf, ppdev->hdevEng, flHooks))
{
DISPDBG((0,"DISP DrvEnableSurface failed
EngAssociateSurface\n"));
EngDeleteSurface(hsurf);
return(FALSE);
}
if(!EngModifySurface(hsurf, ppdev->hdevEng, flHooks, 0,
(DHSURF)dhsurf,
ppdev->pVideoMemory, lDelta, NULL))
{
DISPDBG((0,"DISP DrvEnableSurface failed
EngModifySurface\n"));
EngDeleteSurface(hsurf);
return(FALSE);
}
ppdev->hsurfEng = (HSURF) hsurf;
ppdev->pvTmpBuffer = (PVOID) dhsurf;
mirrsurf->cx = ppdev->cxScreen;
mirrsurf->cy = ppdev->cyScreen;
mirrsurf->lDelta = ppdev->lDeltaScreen;
mirrsurf->ulBitCount = ppdev->ulBitCount;
mirrsurf->bIsScreen = TRUE;
return(hsurf);
}
The mapped file will always be filled with Zero, so the image from the
mapped file will be black. Can any one tell me what's wrong with the
source code?
Thanks in advance
Jarvis Bao
--
jarvisbao
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89945
unable to open Tdi Connection Context on Windows Vista
Hi All,
Here I have a problem with TDI in Windows Vista,
In My TDI Client Driver ,
Code to open the Transport Address executed successfully in Vista. But
I am facing a
problem while opening a TdiConnectionContext File object on Vista.
I am creating a UNICODE_STRING data structure from a unicode string
L"\\Device\\Tcp"
and then creating an OBJECT_ATTRIBUTES data structure
TdiDriverNameAttributes
from a UNICODE_STRING.
Then I initialize the Extended Attributes data structure members as
follows.
RtlCopyMemory(&ExtendedAttributesInformation->EaName,
TdiConnectionContext, TDI_CONNECTION_CONTEXT_LENGTH);
ExtendedAttributesInformation->EaNameLength = (sizeof
(TdiConnectionContext) -
1)
ExtendedAttributesInformation->EaValueLength = (sizeof
(TdiConnectionContext) -
1).
My call to ZwCreateFile completes with STATUS_INVALID_PARAMETER.
ZwCreateFile(&hConnection,
FILE_READ_EA | FILE_WRITE_EA,
&TdiDriverNameAttributes,
&IoStatusBlock,
NULL,
FILE_ATTRIBUTE_NORMAL,
0,
FILE_OPEN_IF,
0,
ExtendedAttributesInformation,
EASize
);
May I know the reason for failure? The same code is working fine on 2K
& XP OS.
Only on vista I came across this behavior.
Thanks. Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89944
setup class/interface class GUID dilemma
Our old WDM driver uses the same GUID for its setup class and for its
interface class.
I have written a new WDF driver and am in a quandary over what to do about
the GUIDs. Our application requires that the interface class GUID remain the
same. That implies that I should change the setup class GUID. If I do, do I
need to change the ClassName too? What will happen when users update from
the old driver to the new driver if the drivers have a different setup class
GUID and ClassName? Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89943
Passing down IOCTLs
I'm trying to figure out how IOCTLs make it all the way down to a PDO
if they need to (for example through a disk class FDO down to a disk
PDO, although I'm not sure there are other examples). For the subset
of IOCTLs not supported by a generic FDO, is it conventional to use
IoSkipCurrentIrpStackLocation and IoCallDriver in the dispatch
routines for IRP_MJ_DEVICE_CONTROL and IRP_MJ_INTERNAL_DEVICE_CONTROL?
I figure if the PDO doesn't recognize the requests it will just fail
them anyway.
The "DispatchDeviceControl in Higher-Level Drivers" section of the DDK
docs seem to imply copying the current stack location to the next and
installing a completion routine, but I don't see why this would be
necessary if the FDO doesn't support the IOCTL and therefore doesn't
need to do any post-processing on it. IoSkipCurrentIrpStackLocation
seems more appropriate in that case. Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89927
Kmdf
I have the old WDK (no wdf is included).
Is it already too late to download the KMDF's
release >= 1.1 separately ? It seems that the
KMDF1.5 only comes with the latest WDK. Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89923
CreateFile faiedl with correct SymbolicLink
Hi, dears!
I added call to IoRegisterDeviceInterface() in AddDevice() for keyboard
filter driver and it returned successfully with correct SymbolicLink (
checked in the registry ) like
\\?\ACPI#PNP0303#4&4b018eb&0#{b4ee1d31-cbf8-400d-8d63-f99c500dbe76} but fail
in
HANDLE h = CreateFile(SymbolicLink, GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,OPEN_EXISTING,NULL,NULL);
for that ( I change '?' to '.' and so forth without success ) with error 2
( ERROR_FILE_NOT_FOUND ).
Is possible to open keyboard filter driver at all and send custom IOCTLs ?
TIA
Arkady Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89922
String to GUID in C++ only
This seems to exist in .Net but I would like to do it in C++ only (no
MFC, .net, ATL...)
Do you have any snippet of code doing this ?
GUID StringToGUID(const String myGuidAsAString)
{
//???
}
Any help would be much appreciated,
Mathieu LEMAIRE Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89917
netvmini DHCP off, setting IP statically
Hi everbody,
Does anybody know if it is possible to change netvmini sample driver
from DDK so that DHCP is off when installing the driver? If that is
possible how can I set the IP statically?
If is not possible, can I set DHCP off for my driver from a user
application? How? I have looked IpHelpApi but Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89915
Ndis Driver problem
hello,
i am writting a network driver,and facing problem in ICMP resolve.
can anybody tell me how to form a proper packet in receive path.?
it is a miniport - ndis driver.
first i am creating a packet,
NdisAllocateBuffer();
NdisAllocatePacket();
I copied the ICMP packet of 98 bytes,,
then set the status of the packet to NDIS_SET_PACKET_STATUS(
packet,,_SUCCESS)
then attached the packet at front,
and then send it to upper layer ,,,
NdisMIndicateReceive();
Am i missing something? if yes then tell me how to resolve it,?
thanks,,
from
Hitesh Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89910
Ndis Driver problem
hello,
i am writting a network driver,and facing problem in ICMP resolve.
can anybody tell me how to form a proper packet in receive path.?
it is a miniport - ndis driver.
first i am creating a packet,
NdisAllocateBuffer();
NdisAllocatePacket();
I copied the ICMP packet of 98 bytes,,
then set the status of the packet to NDIS_SET_PACKET_STATUS(
packet,,_SUCCESS)
then attached the packet at front,
and then send it to upper layer ,,,
NdisMIndicateReceive();
Am i missing something? if yes then tell me how to resolve it,?
thanks,,
from
Hitesh Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89909
How to find LowerDeviceObject in DDK MSVAD Audio Sample??
I use MSVAD to develop my own usb audio stream driver. When I want to
CallUSBD, I must have LowerDeviceObject to pass down the IRP. How to
find the LowerDeviceObject??
--
duoman
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89907
ieee1394 driver resume blue screen
Hello
I am using a driver for IEEE1394 DCAM-compliant cameras (sources can be
downloaded from here http://www.cs.cmu.edu/~iwan/1394/downloads/index.html)
When hibernating with this driver loaded, I get a blue screen at resume,
with a NO_MORE_IRP_STACK_LOCATIONS message and a stop code of 0x00000035
The power management part of the driver is taken from the ieee1394
samples from the DDK, but apparently there is more to be done to make it
work...
Does anyone has an idea of how to solve this ? Or at least is there a
way to prevent system hibernation if this driver is loaded ?
Thanks in advance
Nicolas Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89906
WINDOWS VISTA, WINDOWS XP ( X64 ) PRO CORP SP2, OFFICE 2007, PROJECT 2007, PUBLISHER 2007, HACKING LESSONS 1-17, other 2006/December/20 new programs
WINDOWS VISTA, WINDOWS XP ( X64 ) PRO CORP SP2, OFFICE 2007, PROJECT
2007, PUBLISHER 2007, HACKING LESSONS 1-17, other 2006/December/20 new
programs
------------------------------------------------------------------------
PC new programs 2006-Dec-17
Nr=5262 MICROSOFT VISUAL STUDIO 2005 TEAM EDITION FOR DATABASE
PROFESSIONALS (DEVELOPERS KIT) 1DVD
Nr=5260 MICROSOFT OUTLOOK 2007 (E-MAIL CLIENT)
Nr=5258 MICROSOFT VISUAL STUDIO 2005 TEAM TEST LOAD AGENT (TEST)
Nr=5257 MICROSOFT EXPRESSION WEB 2007
Nr=5256 MS PRESS MICROSOFT SQL SERVER 2005 ADMINISTRATORS COMPANION
(BOOKWARE)
PC new programs
Nr=5251 MICROSOFT OFFICE ACCOUNTING PROFESSIONAL 2007 (ACCOUNTING)
Nr=5249 MICROSOFT HOST INTEGRATION SERVER 2006 (BUSINESS)
Nr=5244 MS PRESS MICROSOFT SQL SERVER 2005 ADMINISTRATORS COMPANION
(BOOKWARE)
Nr=5239 M.O.D.L.2273BL DISTANCE LEARNING MANAGING AND MAINTAINING A
MICROSOFT WINDOWS SERVER 2003 ENVIRONMENT 1DVD
Nr=5231 MICROSOFT WINDOWS XP PROFESSIONAL CORPORATE SP2 INTEGRATED
NOVEMBER 2006 MULTI IMAGE (OPERATING SYSTEM)
Nr=5230 MICROSOFT WINDOWS XP X64 PROFESSIONAL CORPORATE SP2 RC
INTEGRATED MULTI IMAGE (OPERATING SYSTEM)
Nr=5235 MICROSOFT WINDOWS VISTA ENTERPRISE 32BIT VLM (OPERATING SYSTEM)
1DVD
Nr=5198 MICROSOFT WINDOWS VISTA FINAL (OPERATING SYSTEM) 1DVD
Nr=5197 MICROSOFT WINDOWS VISTA DRIVER KIT RTM (DEVELOPMENT KIT) 1DVD
Nr=5227 MICROSOFT OFFICE 2007 ENTERPRISE UG VL (OFFICE-SOLUTION) 1DVD
Access 2007
Enterprise 2007
Excel 2007
Groove 2007
InfoPath 2007
OneNote 2007
Outlook 2007
PowerPoint 2007
Professional Plus 2007
Project Professional 2007
Project Standard 2007
Publisher 2007
SharePoint Designer 2007
Standard 2007
Visio Professional 2007
Visio Standard 2007
Word 2007
Nr=5225 MICROSOFT PROJECT PROFESSIONAL & STANDARD EDITION 2007 (PROJECT
MANAGEMENT)
Nr=5224 MICROSOFT PUBLISHER 2007 (D.T.P)
Nr=5223 MICROSOFT SHAREPOINT DESIGNER 2007
Nr=5222 MICROSOFT VISIO PROFESSIONAL & STANDARD EDITION 2007 (BUSINESS
TOOLS)
===============================================================
please send e-mail astra35@freemail.gr, loa210@mail.gr,
loa210@mailbox.gr Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89899
Emulate USB Modem device
Hi,
We have a requirement to emulate a USB modem device in order to test
PDA functionality which is a host.
I assume we would need to emulate a communication class device.
We also need to send data back to host based on packets received from
host. This would include call setup AT command responses and data
packets after the connection is established.
Does anybody know if this possible?
Thanks,
Jim Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89890
Remove locks IRP-by-IRP
Okay, despite earlier doubts I suppose I can believe the file-based
IRPs cannot be concurrent with IRP_MN_REMOVE_DEVICE, but I still have
questions about the earliest OS version where this applies and about
exactly which IRPs are file-based.
Assuming Windows 2000 or later, here's what I interpret for every IRP
major code, but I have questions about some cases, and some are not
even documented (just found in the .h file so maybe don't matter?)
IRP_MJ_CREATE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_READ
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_WRITE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_DEVICE_CONTROL
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_INTERNAL_DEVICE_CONTROL (IRP_MJ_SCSI)
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_FLUSH_BUFFERS
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_CLEANUP
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_CLOSE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_QUERY_INFORMATION
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_SET_INFORMATION
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_PNP
IRP_MN_CANCEL_REMOVE_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_CANCEL_STOP_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_QUERY_REMOVE_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_QUERY_STOP_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_START_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_STOP_DEVICE
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MN_SURPRISE_REMOVAL
- cannot be concurrent with IRP_MN_REMOVE_DEVICE
<other IRP_MJ_PNP minor IRPs>
- can be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_SYSTEM_CONTROL
- can be concurrent with IRP_MN_REMOVE_DEVICE, but
IoWMIRegistrationControl(..., WMIREG_ACTION_DEREGISTER) can
be used in place of a remove lock
IRP_MJ_POWER
- can be concurrent with IRP_MN_REMOVE_DEVICE
IRP_MJ_SHUTDOWN
- ?
IRP_MJ_CREATE_NAMED_PIPE
- ?
IRP_MJ_QUERY_EA
- ?
IRP_MJ_SET_EA
- ?
IRP_MJ_QUERY_VOLUME_INFORMATION
- ?
IRP_MJ_SET_VOLUME_INFORMATION
- ?
IRP_MJ_DIRECTORY_CONTROL
- ?
IRP_MJ_FILE_SYSTEM_CONTROL
- ?
IRP_MJ_LOCK_CONTROL
- ?
IRP_MJ_CREATE_MAILSLOT
- ?
IRP_MJ_QUERY_SECURITY
- ?
IRP_MJ_SET_SECURITY
- ?
IRP_MJ_DEVICE_CHANGE
- ?
IRP_MJ_QUERY_QUOTA
- ?
IRP_MJ_SET_QUOTA
- ?
Are any cases different in Windows 98 or Me? Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89883
MiniSpy source?
I have downloaded the WDK 6000 from MSDN (I have a premium account) and
cannot find the source MiniSpy. I'm looking for the source code to some
sample MiniFilter driver. I have never developed a file system filter
(either legacy or with the File System Manager archecture) and
experience has taught me to find sample code before leaping into
something new.
Anyone know why this sample code appears to be missing? Know where I
can get it? Is there better/newer MiniFilter source available? Anyone?
Anyone? Bueller?? Bueller?? Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89882
What does "arp entry addition failed: 5" mean?
I see the following mesg for the error of above type:
Error Message:
The ARP entry addition failed: parameter
User Action:
Check the command-line format for the Address Resolution Protocol (ARP)
command. When adding an entry to the table, the Internet Protocol (IP)
address must be entered in a dotted decimal format; the associated media
access control (MAC) address must be entered in a 6-digit hexadecimal format
with digits separated by hyphens.
But in my case, I get this error only sometimes for the same syntax and
arguments and for the same card and not always.
The command I use:
arp -s <remote IP> <remote mac>
Looks like device/driver bindings got screwed up or something. If I disable
my device and then reenable, the exact same command works.
The above text on microsoft site does not provide any useful information on
what the value "5" in error mesg means?
Does anyone have info on what this error no means?
Regds, Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89879
Which is the first NDIS routine registered by miniport with NDIS that needs to be called when network device is disabled?
This is a multi-part message in MIME format.
------=_NextPart_000_0026_01C72391.85217160
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Which is the first NDIS routine registered by miniport with NDIS that =
needs to be called when network device is disabled?
When I try to disable the ethernet device, the device manager hangs and =
device disable never seems to get disabled.
I see lots of incoming traffic and packets getting indicated from my =
driver to NDIS.
\windows\inf\setuapi.app.log has the log enclosed below.
Wondering why disable is not going through.. Looking at my device =
context I dont have any pendings sends to be completed.
Neither is my pause routine getting called. Nor is Ndis close routine =
getting called. Any what the problem could be?
Regds,
>>> [DIF_PROPERTYCHANGE - =
{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0&00]
>>> Section start 2006/12/19 00:28:50.234
cmd: "C:\Windows\system32\mmc.exe" C:\Windows\system32\devmgmt.msc
dvi: Using exported function 'NetClassInstaller' in module =
'C:\Windows\system32\NetCfgx.dll'.
dvi: Class installer =3D=3D NetCfgx.dll,NetClassInstaller
dvi: Using exported function 'NciDeviceInstall' in module =
'C:\Windows\system32\nci.dll'.
dvi: CoInstaller 1 =3D=3D nci.dll,NciDeviceInstall
dvi: Using exported function 'WlanDeviceClassCoInstaller' in module =
'C:\Windows\system32\wlaninst.dll'.
dvi: CoInstaller 2 =3D=3D wlaninst.dll,WlanDeviceClassCoInstaller
dvi: Using exported function 'FDCoInstaller' in module =
'C:\Windows\system32\fdco1ins.dll'.
dvi: CoInstaller 3 =3D=3D fdco1ins.dll,FDCoInstaller
dvi: CoInstaller 1: Enter 00:28:50.265
dvi: CoInstaller 1: Exit
dvi: CoInstaller 2: Enter 00:28:50.281
dvi: CoInstaller 2: Exit
dvi: CoInstaller 3: Enter 00:28:50.281
dvi: CoInstaller 3: Exit
dvi: Class installer: Enter 00:28:50.281
dvi: Class installer: Exit
dvi: Default installer: Enter 00:28:50.281
dvi: {Change State}
dvi: Device Instance =3D =
'{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0&00'.
dvi: {DICS_DISABLE, DICS_FLAG_GLOBAL}
dvi: Using exported function 'NetClassInstaller' in =
module 'C:\Windows\system32\NetCfgx.dll'.
dvi: Class installer =3D=3D NetCfgx.dll,NetClassInstaller
dvi: Using exported function 'NciDeviceInstall' in module =
'C:\Windows\system32\nci.dll'.
dvi: CoInstaller 1 =3D=3D nci.dll,NciDeviceInstall
dvi: Using exported function 'WlanDeviceClassCoInstaller' =
in module 'C:\Windows\system32\wlaninst.dll'.
dvi: CoInstaller 2 =3D=3D =
wlaninst.dll,WlanDeviceClassCoInstaller
dvi: Using exported function 'FDCoInstaller' in module =
'C:\Windows\system32\fdco1ins.dll'.
dvi: CoInstaller 3 =3D=3D fdco1ins.dll,FDCoInstaller
dvi: CoInstaller 1: Enter 13:34:36.234
dvi: CoInstaller 1: Exit
dvi: CoInstaller 2: Enter 13:34:36.234
dvi: CoInstaller 2: Exit
dvi: CoInstaller 3: Enter 13:34:36.234
dvi: CoInstaller 3: Exit
dvi: Class installer: Enter 13:34:36.234
dvi: Class installer: Exit
dvi: Default installer: Enter 13:34:36.234
dvi: {Change State}
dvi: Device Instance =3D =
'{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0&00'.
dvi: {DICS_DISABLE, DICS_FLAG_GLOBAL}
dvi: Using exported function =
'NetClassInstaller' in module 'C:\Windows\system32\NetCfgx.dll'.
dvi: Class installer =3D=3D =
NetCfgx.dll,NetClassInstaller
dvi: Using exported function 'NciDeviceInstall' =
in module 'C:\Windows\system32\nci.dll'.
dvi: CoInstaller 1 =3D=3D =
nci.dll,NciDeviceInstall
dvi: Using exported function =
'WlanDeviceClassCoInstaller' in module =
'C:\Windows\system32\wlaninst.dll'.
dvi: CoInstaller 2 =3D=3D =
wlaninst.dll,WlanDeviceClassCoInstaller
dvi: Using exported function 'FDCoInstaller' in =
module 'C:\Windows\system32\fdco1ins.dll'.
dvi: CoInstaller 3 =3D=3D =
fdco1ins.dll,FDCoInstaller
dvi: CoInstaller 1: Enter 14:00:13.609
dvi: CoInstaller 1: Exit
dvi: CoInstaller 2: Enter 14:00:13.625
dvi: CoInstaller 2: Exit
dvi: CoInstaller 3: Enter 14:00:13.625
dvi: CoInstaller 3: Exit
dvi: Class installer: Enter 14:00:13.625
dvi: Class installer: Exit
dvi: Default installer: Enter 14:00:13.625
dvi: {Change State}
dvi: Device Instance =3D =
'{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0&00'.
dvi: {DICS_DISABLE, DICS_FLAG_GLOBAL}
<ins>
>>> [DIF_PROPERTYCHANGE - =
{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0&00]
>>> Section start 2006/12/19 13:34:36.187
cmd: "C:\Windows\system32\mmc.exe" C:\Windows\system32\devmgmt.msc
<ins>
>>> [DIF_PROPERTYCHANGE - =
{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0&00]
>>> Section start 2006/12/19 14:00:13.578
cmd: "C:\Windows\system32\mmc.exe" C:\Windows\system32\devmgmt.msc
<ins>
------=_NextPart_000_0026_01C72391.85217160
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<P><FONT face=3DArial>Which is the first NDIS routine registered by =
miniport with=20
NDIS that needs to be called when network device is disabled?</FONT></P>
<P><FONT face=3DArial>When I try to disable the ethernet device, the =
device=20
manager hangs and device disable never seems to get disabled.</FONT></P>
<P><FONT face=3DArial> I see lots of incoming traffic and packets =
getting=20
indicated from my driver to NDIS.</FONT></P>
<P><FONT face=3DArial>\windows\inf\setuapi.app.log has the log enclosed=20
below.</FONT></P>
<P><FONT face=3DArial>Wondering why disable is not going through.. =
Looking at my=20
device context I dont have any pendings sends to be =
completed.</FONT></P>
<P><FONT face=3DArial> Neither is my pause routine getting called. =
Nor is=20
Ndis close routine getting called. Any what the problem could =
be?</FONT></P>
<P><FONT face=3DArial></FONT> </P>
<P><FONT face=3DArial>Regds,</FONT></P>
<P><FONT face=3DArial></FONT> </P><FONT face=3DArial size=3D2>
<P><BR>>>> [DIF_PROPERTYCHANGE -=20
{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0&=
amp;00]<BR>>>> =20
Section start 2006/12/19 00:28:50.234<BR> =
cmd:=20
"C:\Windows\system32\mmc.exe"=20
C:\Windows\system32\devmgmt.msc<BR> dvi: Using =
exported=20
function 'NetClassInstaller' in module=20
'C:\Windows\system32\NetCfgx.dll'.<BR> dvi: =
Class=20
installer =3D=3D =
NetCfgx.dll,NetClassInstaller<BR> dvi:=20
Using exported function 'NciDeviceInstall' in module=20
'C:\Windows\system32\nci.dll'.<BR> dvi: =
CoInstaller 1 =3D=3D=20
nci.dll,NciDeviceInstall<BR> dvi: Using exported =
function 'WlanDeviceClassCoInstaller' in module=20
'C:\Windows\system32\wlaninst.dll'.<BR> dvi: =
CoInstaller=20
2 =3D=3D =
wlaninst.dll,WlanDeviceClassCoInstaller<BR> dvi: =
Using exported function 'FDCoInstaller' in module=20
'C:\Windows\system32\fdco1ins.dll'.<BR> dvi: =
CoInstaller=20
3 =3D=3D fdco1ins.dll,FDCoInstaller<BR> dvi: =
CoInstaller 1:=20
Enter 00:28:50.265<BR> dvi: CoInstaller 1:=20
Exit<BR> dvi: CoInstaller 2: Enter=20
00:28:50.281<BR> dvi: CoInstaller 2:=20
Exit<BR> dvi: CoInstaller 3: Enter=20
00:28:50.281<BR> dvi: CoInstaller 3:=20
Exit<BR> dvi: Class installer: Enter=20
00:28:50.281<BR> dvi: Class installer:=20
Exit<BR> dvi: Default installer: Enter=20
00:28:50.281<BR> =
dvi: =20
{Change State}<BR> =20
dvi: Device =
Instance=20
=3D=20
'{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0=
&00'.<BR> =20
dvi: =
{DICS_DISABLE,=20
DICS_FLAG_GLOBAL}<BR> =20
dvi: Using =
exported=20
function 'NetClassInstaller' in module=20
'C:\Windows\system32\NetCfgx.dll'.<BR> =20
dvi: Class =
installer=20
=3D=3D NetCfgx.dll,NetClassInstaller<BR> =20
dvi: Using =
exported=20
function 'NciDeviceInstall' in module=20
'C:\Windows\system32\nci.dll'.<BR> =20
dvi: =
CoInstaller 1=20
=3D=3D nci.dll,NciDeviceInstall<BR> =20
dvi: Using =
exported=20
function 'WlanDeviceClassCoInstaller' in module=20
'C:\Windows\system32\wlaninst.dll'.<BR> =20
dvi: =
CoInstaller 2=20
=3D=3D =
wlaninst.dll,WlanDeviceClassCoInstaller<BR> =20
dvi: Using =
exported=20
function 'FDCoInstaller' in module=20
'C:\Windows\system32\fdco1ins.dll'.<BR> =20
dvi: =
CoInstaller 3=20
=3D=3D fdco1ins.dll,FDCoInstaller<BR> =20
dvi: =
CoInstaller 1:=20
Enter 13:34:36.234<BR> =20
dvi: =
CoInstaller 1:=20
Exit<BR> =20
dvi: =
CoInstaller 2:=20
Enter 13:34:36.234<BR> =20
dvi: =
CoInstaller 2:=20
Exit<BR> =20
dvi: =
CoInstaller 3:=20
Enter 13:34:36.234<BR> =20
dvi: =
CoInstaller 3:=20
Exit<BR> =20
dvi: Class=20
installer: Enter 13:34:36.234<BR> =20
dvi: Class=20
installer: Exit<BR> =20
dvi: Default =
installer: Enter 13:34:36.234<BR> =20
dvi: &nb=
sp; =20
{Change State}<BR> =20
dvi: &nb=
sp; =20
Device Instance =3D=20
'{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0=
&00'.<BR> =20
dvi: &nb=
sp; =20
{DICS_DISABLE, DICS_FLAG_GLOBAL}<BR> =20
dvi: &nb=
sp; =20
Using exported function 'NetClassInstaller' in module=20
'C:\Windows\system32\NetCfgx.dll'.<BR> =20
dvi: &nb=
sp; =20
Class installer =3D=3D =
NetCfgx.dll,NetClassInstaller<BR> =20
dvi: &nb=
sp; =20
Using exported function 'NciDeviceInstall' in module=20
'C:\Windows\system32\nci.dll'.<BR> =20
dvi: &nb=
sp; =20
CoInstaller 1 =3D=3D =
nci.dll,NciDeviceInstall<BR> =20
dvi: &nb=
sp; =20
Using exported function 'WlanDeviceClassCoInstaller' in module=20
'C:\Windows\system32\wlaninst.dll'.<BR> =20
dvi: &nb=
sp; =20
CoInstaller 2 =3D=3D=20
wlaninst.dll,WlanDeviceClassCoInstaller<BR> =20
dvi: &nb=
sp; =20
Using exported function 'FDCoInstaller' in module=20
'C:\Windows\system32\fdco1ins.dll'.<BR> =20
dvi: &nb=
sp; =20
CoInstaller 3 =3D=3D =
fdco1ins.dll,FDCoInstaller<BR> =20
dvi: &nb=
sp; =20
CoInstaller 1: Enter 14:00:13.609<BR> =20
dvi: &nb=
sp; =20
CoInstaller 1: Exit<BR> =20
dvi: &nb=
sp; =20
CoInstaller 2: Enter 14:00:13.625<BR> =20
dvi: &nb=
sp; =20
CoInstaller 2: Exit<BR> =20
dvi: &nb=
sp; =20
CoInstaller 3: Enter 14:00:13.625<BR> =20
dvi: &nb=
sp; =20
CoInstaller 3: Exit<BR> =20
dvi: &nb=
sp; =20
Class installer: Enter 14:00:13.625<BR> =20
dvi: &nb=
sp; =20
Class installer: Exit<BR> =20
dvi: &nb=
sp; =20
Default installer: Enter 14:00:13.625<BR> =20
dvi: &nb=
sp; &nbs=
p; =20
{Change State}<BR> =20
dvi: &nb=
sp; &nbs=
p; =20
Device Instance =3D=20
'{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0=
&00'.<BR> =20
dvi: &nb=
sp; &nbs=
p; =20
{DICS_DISABLE, DICS_FLAG_GLOBAL}<BR><ins></P>
<P>>>> [DIF_PROPERTYCHANGE -=20
{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0&=
amp;00]<BR>>>> =20
Section start 2006/12/19 13:34:36.187<BR> =
cmd:=20
"C:\Windows\system32\mmc.exe" =
C:\Windows\system32\devmgmt.msc<BR><ins></P>
<P>>>> [DIF_PROPERTYCHANGE -=20
{1A3E09BE-1E45-494B-9174-D7385B45BBF5}\NVNET_DEV0373\4&55C493A&0&=
amp;00]<BR>>>> =20
Section start 2006/12/19 14:00:13.578<BR> =
cmd:=20
"C:\Windows\system32\mmc.exe"=20
C:\Windows\system32\devmgmt.msc<BR><ins></FONT></P></DIV></BODY></H=
TML>
------=_NextPart_000_0026_01C72391.85217160-- Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89873
APCs
Dear all,
Do all APCs run at APC_LEVEL Irql? For example, user APCs that start at
ntdll!KiUserDispatchApc. I always thought that they did but !pcr is
reporting an IRQL of 0.
Many thanks,
Carl Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89872
Using i.MX21 with a monochrome display
Hello,
I'm using i.MX21 on the ADS eval board from freescale. I try to drive a
monochrome display. The BSP is delivered to support a sharp display and
I've modified initialisation code for LCD in OAL but as soon as I
configure the monochrome mode (clear TFT and COLOR bits of LPCR
register) the FLM and LP signal are stopped ?
any clue, any experience in this domain ...
If you have already a configuration that works for a monochrome display
it could help.
Any advises are welcome
thanks in advance
Nyrbyk Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89864
USB device descriptor
I'm not an expert of device drivers programming on Windows so I hope my
question is not stupid for you. What I'm trying to do is reading the
USB descriptor of an USB hard disk (or an USB key) in order to read the
product id and the serial number of the device. The problem is that I
can't even read the USB descritpor. The code is this:
USB_DEVICE_DESCRIPTOR data;
USBSCAN_GET_DESCRIPTOR descriptor;
DWORD length;
BOOL ret;
descriptor.DescriptorType=USB_DEVICE_DESCRIPTOR_TYPE;
ret=DeviceIoControl(hPhysicalDriveIOCTL,IOCTL_GET_USB_DESCRIPTOR ,
&descriptor,sizeof(descriptor),&data,sizeof(data),
&length,NULL);
hPhysicalDriveIOCTL is an handle that I get from a CreateFile call on
the device I want to get the descriptor from. I tried GetLastError()
and I received the error message "The request is not supported". What
do you think it could be?
Thanks a lot for your help
Cold Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89862
what happens when WM_DEVMODECHANGE message is broadcasted
Hi..
Whenever printer settings are changed, i am passing this message.
SendMessageTimeout (HWND_BROADCAST, WM_DEVMODECHANGE, 0L, (LPARAM)
pszPrinterName, SMTO_NORMAL, 1000, NULL)
So that applications will come to know the change in devmode. But the new
changes are not reflected in opened applications. Can somebody tell me what
happens when WM_DEVMODECHANGE message is broadcasted?? and why the change is
not reflected in opened application??
Thanks in Advance. Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89861
Create DDK projects in Visual Studio *easily*!
Hi,
wanted to introduce you to my Visual Studio project creation wizard:
DDKWizard. It is based on the two DDKBUILD flavors of OSR and allows
you to customize many aspects of the driver project. For example you
can tell DDKWizard to create a project using C++ or C source files. You
can optionally create PREfast configurations, 64bit configurations
(either IA-64 and/or x64).
There are 3 predefined project types. "Driver" creates a generic legacy
driver (i.e. includes ntddk.h, could be easily changed to WDM, though).
"Native App" creates a native application such as are smss.exe,
autochk.exe and so on. "Empty Driver" allows you to migrate an existing
project into a Visual Studio project.
DDKWizard creates one project per DDK you choose from the listbox. The
solution configurations will automatically include only the project
which is relevant for the current configuration. The configurations
(both project and solution configurations) are named after the DDKBUILD
configuration, e.g. "WLHNET checked" (i.e. Windows Vista DDK for .NET
Server checked build) or "WNET checked (PREfast)" (i.e. WNET DDK
checked PREfast build).
Download and information about the wizard at:
http://ddkwizard.assarbad.net/
Yes it's free, yes it's OpenSource - no, your created projects are not
affected by any particular license, they are yours. Yes, it will be
free in future, yes I will continue to maintain it ;)
Give it a try. If you don't want to install before looking into the
documentation, have a look at the manual first:
http://ddkwizard.assarbad.net/downloads/ddkwiz_manual.pdf
It supports the DDKs supported by DDKBUILD (from OSR) and is compatible
with Visual Studio 2002, 2003 and 2005 (tested only with one VS
installation per test-system, yet).
Best regards,
Oliver
PS: If you like it, spread the word! Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89857
How important is IoStatus.Information?
I've seen five different ways of handling IoStatus.Information in the
DDK docs, but one of them doesn't make sense to me:
On success IoStatus.Information is set to a count to indicate how
much work was performed, which on error implies it should be 0.
On success IoStatus.Information is set to the address of some
data structure allocated by the driver, which on error implies it
should be NULL.
On success IoStatus.Information is set to the address of some
data structure allocated by another driver, which on error implies it
should be left alone.
On success or error, IoStatus.Information is irrelevant (not
mentioned in the description of the IRP).
On success, IoStatus.Information is 0.
The last case makes no sense to me. If IoStatus.Information is only
set on success, then on error it would either be some indeterminate
value or the initial value from the originator, but the originator
could just as easily check IoStatus.Status, so IoStatus.Information is
irrelevant. Does any code actually depend on IoStatus.Information to
be 0 on success, or were the doc authors just having fun pasting "On
success, a driver sets Irp->IoStatus.Information to zero." over and
over? Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89847
usb filter driver - constant serial number
Hi, i am new to whole driver develompent so i would like some pointers. I'm
trying to make my UBS printers (same vendorid and productid, different serial
number) to be detected as one ie. my idea is to set serial number to constant
value. Something like IgnoreHWSerNumXXXXXXXX registry key but that method is
not good enough for me because when i plug printer into another usb port,
windows detects it as new device. So, I would like to know it this possible
and how. Thanks in advance. Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89827
parport.sys driver installation from user-land application
i am working on ddk parport sample.
after make, i get the parport.sys.
now, i want to replace the system32\driver\parport.sys
with this new one, in order to set breakpoint in windbg.
i can net stop parport, then i want to overwrite the old parport.sys
with the new parport.sys together with the pdb file .
is it ok?
TIA Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89826
Kernel Direct-x
Hi,
Can i use direct x in kernel mode device like doing direct drawing to the
video card???
Where can i find some examples?
Thanks Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89819
Can IRP_MN_REMOVE_DEVICE race with IRP_MN_QUERY_DEVICE_RELATIONS?
Is it possible for IRP_MN_QUERY_DEVICE_RELATIONS to race with
IRP_MN_REMOVE_DEVICE? I get the impression from "Multiprocessor
Considerations for Kernel-Mode Drivers" that it is.
(If not then what documentation should I be reading that says they are
serialized?)
If so, then is this possible:
- bus driver's FDO receives IRP_MN_QUERY_DEVICE_RELATIONS
(BusRelations) and reports child
- child receives IRP_MN_START_DEVICE
- PnP manager sends IRP_MN_REMOVE_DEVICE, still thinking child
has been reported present
- bus driver calls IoInvalidateDeviceRelations
- bus driver's FDO receives IRP_MN_QUERY_DEVICE_RELATIONS
(BusRelations) and does not report child
- child receives IRP_MN_REMOVE_DEVICE and since it was not
reported calls IoDeleteDevice on itself
- PnP manager sends IRP_MN_REMOVE_DEVICE, now realizing child
was not reported present
- child receives IRP_MN_REMOVE_DEVICE, even though
IoDeleteDevice has already been called
?
I think the documentation alludes to the possibility of receiving
IRP_MN_REMOVE_DEVICE even after IoDeleteDevice, but the explanation is
shady. Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89795
History of remove locks
I don't want to discuss again when exactly remove locks are necessary.
The question I still have trouble answering is why they were ever
invented, why they were ever necessary even for one single IRP. It
seems kind of roundabout for reference counting to always protect a
device object yet not always block what is basically a device object's
destructor (IRP_MN_REMOVE_DEVICE). If the OS can protect a device
from being removed in the middle of certain IRPs, then why not for all
IRPs?
Is there some historical reason? Was it a Windows 9x philosophy? Was
safe object retention not as popular on such a consumer platform? Was
it awkward to merge Windows 9x plug and play into the NT stream when
Windows 2000 was created? (not that I know what the NT driver model
looked like) Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89792
SRB_INITIALIZE_DEVICE
Hello, I have two USB attached, DirectShow cameras that when booting
up, only one of the cameras is successfully enumerated. The other
camera will usually show up as an "Unknown Device" (VID_0000&PID_0000)
or sometimes not at all in the device manager (as if I didn't even have
it plugged in). After the reboot, unplugging and plugging back in the
problem camera then allows it to be successfully enumerated.
After using SoftICE to poke around to see what my driver is doing on a
reboot, I see that only one of the cameras is getting the
SRB_INITIALIZE_DEVICE and enumerating just fine.
This is behind a native UHCI, Intel USB2.0 controller and a Dell system
running XPPro, SP2. DirectX9.0C has been installed, as well as all
other updates.
It seems as if both cameras are successfully enumerated when behind a
USB1.1 hub, so I'm not sure if this is timing related or not.
Suggestions? What would cause the class driver to not send another
SRB_INITIALIZE device and consequently get the descriptors, etc? Am I
going to have to put a USB analyzer on it to determine or?
If you need more information, just let me know. Any help, suggestions,
tips, links to read up on would help.
Thanks in adv. Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89788
METHOD_OUT_DIRECT and ISR
I am updating/writing a driver that collects a large amount of data
(4MB) from an ISA card.
Here is the way I want it to work:
In my Dispatch routine I handle a START_SAMPLING IOCTL, which is
METHOD_OUT_DIRECT.
I read in some settings from the input buffer and store what I need in
my device extension.
It is the output buffer (at Irp->MdlAddress) that I need help with. I
translate this address using
MmGetSystemAddressForMdlSafe(Irp->MdlAddress,NormalPagePriority), as I
should.
But now I need help.
After my dispatch routine finishes, the user mode code will start a
timer on the ISA card, which triggers interrupts to my driver.
I have an ISR that runs once for each interrupt, and reads one data
point each time... which it should append to the buffer.
The interrupts keep occuring until the ISR sees that it has collected
the all the data, and turns off the interrupts.
So what my ISR needs to do is access and write to that output buffer
that was given to the driver back in the dispatch routine? But how?
I gather that in my dispatch routine I need to do something like.. lock
the buffer and/or mark the irp as pending and/or queue the irp, etc.
Then in my ISR I might need to do more of the same.
Can someone tell me what I need to do to use this METHOD_OUT_DIRECT
buffer in my ISR?
Buzz Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89784
IoAttachDevice oddities
I'm curious to understand a couple things about IoAttachDevice.
Why does IoAttachDevice (not IoAttachDeviceToDeviceStack) require the
AttachedDevice out parameter to point to a global memory location?
Why can't it be on the stack? The stack will be around until
IoAttachDevice returns, and why would IoAttachDevice have to access
the pointer after that?
I also wonder, why does IoAttachDevice open a file on the target
device and then perform the attach _before_ it closes the file object
instead of after? (so that the source device being attached on top
receives spurious IRP_MJ_CLEANUP and IRP_MJ_CLOSE IRPs that have no
matching IRP_MJ_CREATE) Was this an accident or is there some
architectural reason for it? (which I'd like to understand if there
is) Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89783
METHOD_OUT_DIRECT and ISR
I am updating/writing a driver that collects a large amount of data
(4MB) from an ISA card.
Here is the way I want it to work:
In my Dispatch routine I handle a START_SAMPLING IOCTL, which is
METHOD_OUT_DIRECT.
I read in some settings from the input buffer and store what I need in
my device extension.
It is the output buffer (at Irp->MdlAddress) that I need help with. I
translate this address using
MmGetSystemAddressForMdlSafe(Irp->MdlAddress,NormalPagePriority), as I
should.
But now I need help.
After my dispatch routine finishes, the user mode code will start a
timer on the ISA card, which triggers interrupts to my driver.
I have an ISR that runs once for each interrupt, and reads one data
point each time... which it should append to the buffer.
The interrupts keep occuring until the ISR sees that it has collected
the all the data, and turns off the interrupts.
So what my ISR needs to do is access and write to that output buffer
that was given to the driver back in the dispatch routine? But how?
I gather that in my dispatch routine I need to do something like.. lock
the buffer and/or mark the irp as pending and/or queue the irp, etc.
Then in my ISR I might need to do more of the same.
Can someone tell me what I need to do to use this METHOD_OUT_DIRECT
buffer in my ISR?
Buzz Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89780
METHOD_OUT_DIRECT and ISR
I am updating/writing a driver that collects a large amount of data
(4MB) from an ISA card.
Here is the way I want it to work:
In my Dispatch routine I handle a START_SAMPLING IOCTL, which is
METHOD_OUT_DIRECT.
I read in some settings from the input buffer and store what I need in
my device extension.
It is the output buffer (at Irp->MdlAddress) that I need help with. I
translate this address using
MmGetSystemAddressForMdlSafe(Irp->MdlAddress,NormalPagePriority), as I
should.
But now I need help.
After my dispatch routine finishes, the user mode code will start a
timer on the ISA card, which triggers interrupts to my driver.
I have an ISR that runs once for each interrupt, and reads one data
point each time... which it should append to the buffer.
The interrupts keep occuring until the ISR sees that it has collected
the all the data, and turns off the interrupts.
So what my ISR needs to do is access and write to that output buffer
that was given to the driver back in the dispatch routine? But how?
I gather that in my dispatch routine I need to do something like.. lock
the buffer and/or mark the irp as pending and/or queue the irp, etc.
Then in my ISR I might need to do more of the same.
Can someone tell me what I need to do to use this METHOD_OUT_DIRECT
buffer in my ISR?
Buzz Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89779
METHOD_OUT_DIRECT and ISR
I am updating/writing a driver that collects a large amount of data
(4MB) from an ISA card.
Here is the way I want it to work:
In my Dispatch routine I handle a START_SAMPLING IOCTL, which is
METHOD_OUT_DIRECT.
I read in some settings from the input buffer and store what I need in
my device extension.
It is the output buffer (at Irp->MdlAddress) that I need help with. I
translate this address using
MmGetSystemAddressForMdlSafe(Irp->MdlAddress,NormalPagePriority), as I
should.
But now I need help.
After my dispatch routine finishes, the user mode code will start a
timer on the ISA card, which triggers interrupts to my driver.
I have an ISR that runs once for each interrupt, and reads one data
point each time... which it should append to the buffer.
The interrupts keep occuring until the ISR sees that it has collected
the all the data, and turns off the interrupts.
So what my ISR needs to do is access and write to that output buffer
that was given to the driver back in the dispatch routine? But how?
I gather that in my dispatch routine I need to do something like.. lock
the buffer and/or mark the irp as pending and/or queue the irp, etc.
Then in my ISR I might need to do more of the same.
Can someone tell me what I need to do to use this METHOD_OUT_DIRECT
buffer in my ISR?
Buzz Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89775
BUGCODE_NDIS_DRIVER 7C, Duplicate packet descriptor on Vista RTM 32 bit
Hi all
Got this bug once on Visdt which cant be repeated, and has never been
seen on XP, either 32 or 64 bit.
Four packet descriptors are allocated and put in a list at startup.
Four 2k buffers are also allocated.
The header size is set for the packet too at start up.
When there is data to send up the driver calls:
NdisInterlockedRemoveHeadList() to get a packet descriptor off the
queue.
NdisReinitializePacket()
NdisAllocateBuffer() using one of the presupplied 2k buffers.
NdisAdjustBufferLength()
NdisChainBufferAtBack()
NDIS_SET_PACKET_STATUS() to SUCCESS or RESOUCES depending if this was
the last descriptor on the queue
NdisMIndicateReceivePacket() <----- this is where the BSOD was.
The descriptor is returned to the miniports return packets handler
whicjh calls:
NdisUnchainBufferAtFront()
NdisFreeBuffer()
NdisInterlockedInsertTailList()
So, does anyone know of a bug in Vista that might cause it to think it
still has the oacket after it has been given back to the miniport
driver?
Thanks in advance Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89769
USB<->Serial Virtual Driver
Hi All,
i have my own firmware( USB hardware) and i developed a driver for that
which communicate to it.
Now i want to develop USB<->Serial driver for it.
So from where can i start? I have DDK2003 and also check serial.sys and
serenum.sys.
Currently i changed my inf such that which loads serenum.sys and my own
driver and displays in device manager as a virtual "com12" or any. But
now i want to communicate with it. I know without doing nothing i can
not grab the data but here is the my problem..
From where pass the data from driver. Meaand IRP to URB or whatever
is....
I did not find any help on the net. SO if possible then provide me a
direction or link.
I have a hardware with 2 bulk and 1 control end point. If i need then i
will use interrupt end point for serial settings communication but for
simplicity i am using control pipe with some vendor specific API and
pass serial settings to the hardware.
Now please help me on that.
Thanks in advance.
Regards,
Tejas
--
slsnios
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------ Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89767
Loading data using isochronous USB Driver crashes the computer
When I connect my USB device to computers (hp dc71007 and hp d530) with USB
controller Int 82801FB or more recent versions, while sending data from the
PC the computer will crash frequently. I couldn't see the issue when using
old pcs (hp d53c and hp Brio) that have USB controller 82801AA and 82801EB.
Are there any known issues with the USB driver for these devices in Windows
XP SP2? Does anyone know of a way of avoiding the crash? Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89738
How to get a drive letter for a virtual device
Hello,
I'm new in the device driver world. So I appreciate all the help that I
get.
I have a written a device driver for a virtual device.
Is there anyway that I can assign a drive letter ( lets say f: or g: )
to that virtual drive, such that when a user tries to do a file drag
and drop to that drive letter, my driver can intercept the data?
Thanks
pada Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89735
Dynamically loading export drivers
Hello,
I want to know how an export driver can be dynamically loaded.
Article http://www.microsoft.com/whdc/driver/tips/KmDLL.mspx states at
the end
"In the export driver, define an I/O control code (IOCTL) that
instantiates a class and returns an interface pointer that other
drivers can use to call methods on the interface object in the usual
way. The class should provide a method for freeing the object, and the
header file should contain only pure abstract methods."
I don't know how this is done and have not found any reference or code
which explains this.
Another way of dynamically loaded an export driver is by using a Device
interface and I have found some discussions on this but again no
reference code to explainn how it is done.
Can anyone please help me? Any reference code explaining the process
would be a great help.
Thanks,
..Ram Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89718
How to deal with selective suspend/wait wake/stand by ?
Hi,
I have an issue on my USB driver that features both selective suspend,
wait wake when a request for stand by occurs.
This is on XP, but I guess it will be thr same on Vista.
Here is the scenario:
Note that this device is a smart card reader, capable of waking up the
system after a stand by occured
1. After some period of inactivity, the driver issues a selective
suspend request to the device
2. The device successfully enters selective suspend
3. The user issues a stand by mode
4. The driver receives an IRP QUERY POWER request
5. Then the Wait Wake IRP is completed, so as the WDK says, the driver
issues a PowerD0 request and a new wait wake IRP
6. Then comes the boiler plate of QUERY/SET POWER IRPs, that finally
ends with a D2 request to the device
7. Problem is that the device is no longer capable of waking up the
system when inserting a smart card. This does NOT occur if the device
is not suspended before the system stands by.
I guess there is some problem because there are some mixing D0 (because
the Wait Wake IRP is completed) and D2 (because of stand by request)
messages. But as issuing a D0 request generates QUERY/SET POWER IRPs as
the stand by request does, I don't really see how to hold the stand by
request while the D0 request is being completed.
I had a look at the bulkusb sample from WDK 6000, it seems that there
is no particular mecanism to manage that.
Any suggestions ?
Thanks, Roger Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89710
How to install VHIDMINI driver program on VISTA 64BIT OS
Hi,
My device need setup 2 drivers, one driver manage USB
communication with device, the other is a virtual HID class driver
which enumerate some HID devices such as keyboard, mouse and so on.
2 drivers can be installed and work normanlly on windows MCE OS,
WINXP 64 bit OS and Vista RC2 32 bit OS.
Now, I need setup this 2 drivers on Vista 64 bit OS. I known that
every driver on Vista 64 bit OS require to pass digital signatures.
Through pressing F8 key after OS started, I can disable the digital
signatures for a while for testing my driver. unfortunately, I only
can setup the USB driver, the HID driver always return failure.
My HID class driver is based on the VHIDMINI driver, it locate in
these directory {system disk}\WINDDK\5744\src\hid\vhidmini\sys. I
have tried to setup the VHIDMINI driver by running ''devcon'' tool,
It also return failure. Can someone try to install it on VISTA 64 bit
OS?
I check the setupapi.dev.log, it report "Installing NULL driver"
information and other information. I don't understand it. I think
that some infomation in inf file bring out.
I attached these inf and sys files for reference. Any additional
links or information will be greatly appreciated!
Lejianz,
john at cwtek.com.tw
THE inf file's content:
[Version]
Signature="$CHICAGO$"
Class=HIDClass
ClassGuid={745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider=%VENDOR%
CatalogFile=vhidmini.cat
;LayoutFile=layout.inf
DriverVer=09/21/2006,6.0.5736.1
;
; Layout.inf (etc.) list all files shipped with the operating system
so the
; source description sections are only needed if other files are
needed.
;
; In order to use IHV drivers, the SourceDisksNames section must
list the
; disk(s) containing the drivers and the SourceDisksFiles section
must list
; which disk number each file to be copied is found on.
; Disk number 99 is used to avoid a conflict with the disk numbers
defined
; in layout.inf
;
; Files used in a driver installation need to be digitally signed
otherwise
; installation may fail. See documentation elsewhere in the DDK
regarding
; driver signing.
[SourceDisksFiles]
vhidmini.sys = 99
[SourceDisksNames.x86]
99 = %DISK_NAME%,,,\i386
;[SourceDisksNames.ia64]
;99 = %DISK_NAME%,,,\ia64
[SourceDisksNames.amd64]
99 = %DISK_NAME%,,,\amd64
[DestinationDirs]
CopyFilesSYS = 12 ; should it be 10 to take care of 98 stuff??????
CopyFilesDLL = 11 ; %SystemRoot%\system or system32 - 98 or
Win2000
CopyFilesSYS_98 = 10, system32/drivers
[Manufacturer]
%VENDOR%=Vendor, NTx86, NTia64, NTamd64
; For Win2K
[Vendor]
%VHidMini% = VHidMini.Inst,
{D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
%VHidDevice% = VHidDevice.Inst, HID\MyVirtualHidDevice
; For XP and later
[Vendor.NTx86]
%VHidMini% = VHidMini.Inst,
{D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
%VHidDevice% = VHidDevice.Inst, HID\MyVirtualHidDevice
[Vendor.NTia64]
%VHidMini% = VHidMini.Inst,
{D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
%VHidDevice% = VHidDevice.Inst, HID\MyVirtualHidDevice
[Vendor.NTamd64]
%VHidMini% = VHidMini.Inst,
{D49F883C-6486-400a-8C22-1A9EF48577E4}\HID_DEVICE
%VHidDevice% = VHidDevice.Inst, HID\MyVirtualHidDevice
[ControlFlags]
ExcludeFromSelect = HID\MyVirtualHidDevice
;===============================================================
; VHidMini (Root Enumerated Hid Device) install section
;===============================================================
[VHidMini.Inst]
CopyFiles = CopyFilesSYS_98, CopyFilesDLL
AddReg = VHidMini_98me.AddReg
[VHidMini.Inst.NT]
CopyFiles = CopyFilesSYS, CopyFilesDLL
[VHidMini.Inst.NT.HW]
AddReg = VHidMini_Parameters.AddReg
[VHidMini.Inst.NT.Services]
AddService = vhidmini,0x00000002,vhidmini_Service_Inst,
[CopyFilesSYS]
vhidmini.sys
;HidClass.sys
;HidParse.sys
[CopyFilesSYS_98]
vhidmini.sys
HidClass.sys
HidParse.sys
[CopyFilesDLL]
Hid.dll
[VHidMini_Parameters.AddReg]
HKR,,"ReadFromRegistry",%REG_DWORD%, 0x00000001
HKR,,"MyReportDescriptor",%REG_BINARY%, 06, 00, FF, 09, 01, A1, 01,
85, 01, 09, 01, 15, 00, 26, ff, 00, 75, 08, 95, 01, B1, 00, 09, 01,
15, 00, 26, FF, 00, 75, 08, 95, 01, B1, 00, 09, 01, 75, 08, 95, 01,
81,00, C0
[VHidMini_98me.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,"vhidmini.sys"
[vhidmini_Service_Inst]
DisplayName = %VHidMini%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_IGNORE%
ServiceBinary = %12%\vhidmini.sys
;===============================================================
; VHidDevice (Virtual Hid Device) install section
; - Only a Null service is installed.
;===============================================================
[VHidDevice.Inst]
[VHidDevice.Inst.NT]
[VHidDevice.Inst.NT.Services]
AddService = ,0x00000002, ; NULL Service
;================================================================
[Strings]
; *******Localizable Strings*******
VENDOR = "Microsoft Corp"
VHidMini = "Root Enumerated Hid Device (sample)"
VHidDevice = "Virtual Hid Device (sample)"
DISK_NAME = "Virtual Hid Device Sample Install Disk"
; *******Non Localizable Strings*******
SERVICE_BOOT_START = 0x0
SERVICE_SYSTEM_START = 0x1
SERVICE_AUTO_START = 0x2
SERVICE_DEMAND_START = 0x3
SERVICE_DISABLED = 0x4
SERVICE_KERNEL_DRIVER = 0x1
SERVICE_ERROR_IGNORE = 0x0
SERVICE_ERROR_NORMAL = 0x1
SERVICE_ERROR_SEVERE = 0x2
SERVICE_ERROR_CRITICAL = 0x3
REG_EXPAND_SZ = 0x00020000
REG_DWORD = 0x00010001
REG_MULTI_SZ = 0x00010000
REG_BINARY = 0x00000001
REG_SZ = 0x00000000 Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89708
dynamically allocated memory
I am trying to find out how the memory is distributed among kernel
components and the drivers. I could find this for the static memory. Is
there any way to find this information for the dynamic memory, i.e.
memory allocated using malloc etc.
Basically, I have a driver for which I do not have the source code. I
want to figure out if it does mallocs etc and what are the memory
ranges it uses.
Thanks Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89706
DDK with Cygwin
Hi Group,
I want to know whether DDK can work with Cygwin and gcc compiler. Or
do I compulsorily need MS Visual Studio. Also can someone give me an
idea about what is the role of driver studio in developing windows
device drivers.
thanks
Sai K Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89694
HidP_TranslateUsagesToI8042ScanCodes API Crash?
Hi, I'm new to driver programming and I'm writing a keyboard driver
that translates Usage to Scan Code, then to a Unicode string. I
modified a similar sample code, but I keep getting a crash from the API
(according to the call stack, it's from hid.dll), and the debugger
doesn't show any bad pointer. It says "Unhandled exception at
<address>. Access violation writing location <address>". I've been
searching for more sample code, but so far I can't find any, not in
Google search results...
Below are the two functions I have. I call UnpackReport. The
InsertScanCode callback function is called and able to convert the scan
code to unicode string successfully, but it will crash after that at
the line of HidP_TranslateUsagesToI8042ScanCodes.
Am I missing something? Thanks in advanced.
BOOLEAN InsertScanCode(PVOID context, PCHAR newScanCodes, ULONG length)
{
HKL activeKeyboardLayout = GetKeyboardLayout(0);
UINT vkCode = MapVirtualKeyEx(*newScanCodes, 1, activeKeyboardLayout);
BYTE keyStateArray[256];
BOOL bKeyState = GetKeyboardState(keyStateArray);
if (vkCode != -1 && bKeyState)
{
TCHAR buffer[16] = {0};
int nConvert = ToUnicode(vkCode, 0, keyStateArray, buffer, 16, 0);
if (nConvert > 0)
{
int haha = 1;
}
}
return true;
}
BOOLEAN UnpackReport (
IN PCHAR ReportBuffer,
IN USHORT ReportBufferLength,
IN HIDP_REPORT_TYPE ReportType,
IN OUT PHID_DATA Data,
IN ULONG DataLength,
IN PHIDP_PREPARSED_DATA Ppd
)
{
HIDP_KEYBOARD_MODIFIER_STATE modState;
memset(&modState, 0, sizeof(HIDP_KEYBOARD_MODIFIER_STATE));
ULONG maxUsageLen = 14;
maxUsageLen = HidP_MaxUsageListLength(HidP_Input,
HID_USAGE_PAGE_KEYBOARD, Ppd);
if (maxUsageLen == 0)
{
Dbg(_T("Invalid HidP_MaxUsageListLength returned.\n"));
return FALSE;
}
ULONG numUsages; // Number of usages returned from GetUsages.
ULONG i;
UCHAR reportID;
ULONG Index;
ULONG nextUsage;
reportID = ReportBuffer[0];
for (i = 0; i < DataLength; i++, Data++)
{
if (reportID == Data->ReportID)
{
if (Data->IsButtonData)
{
numUsages = Data->ButtonData.MaxUsageLength;
Data->Status = HidP_GetUsages (ReportType,
Data->UsagePage,
0, // All collections
Data->ButtonData.Usages,
&numUsages,
Ppd,
ReportBuffer,
ReportBufferLength);
for (Index = 0, nextUsage = 0; Index < numUsages;
Index++)
{
if (Data -> ButtonData.UsageMin <= Data ->
ButtonData.Usages[Index] &&
Data -> ButtonData.Usages[Index] <= Data ->
ButtonData.UsageMax)
{
Data -> ButtonData.Usages[nextUsage++] = Data
-> ButtonData.Usages[Index];
}
}
if (nextUsage < Data -> ButtonData.MaxUsageLength)
{
Data->ButtonData.Usages[nextUsage] = 0;
}
}
Data -> IsDataSet = TRUE;
}
}
Data--;
USAGE curUsageList[maxPreviousUsages] = {0};
USAGE breakUsageList[maxPreviousUsages] = {0};
USAGE makeUsageList[maxPreviousUsages] = {0};
memset(curUsageList, 0, sizeof(curUsageList));
for (i = 0; i < numUsages; i++)
{
curUsageList[i] = Data->ButtonData.Usages[i];
}
HidP_UsageListDifference(prevUsageList, curUsageList, breakUsageList,
makeUsageList, maxUsageLen);
if (makeUsageList[0] != 0)
{
int context;
ULONG tstatus = HidP_TranslateUsagesToI8042ScanCodes(makeUsageList,
maxUsageLen,
HidP_Keyboard_Make,
&modState,
InsertScanCode,
&context);
if (tstatus = HIDP_STATUS_I8042_TRANS_UNKNOWN)
{
int haha = 1;
}
}
memcpy(prevUsageList, curUsageList, maxUsageLen * sizeof(USAGE));
Data++;
return (TRUE);
} Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89687
Accessing scsi read/write buffer in storport
I am writing a storport miniport and my device supports scatter gather
DMA. In my PORT_CONFIGURATION_INFORMATION structure I will be setting
the MapBuffers variable to STOR_MAP_NO_BUFFERS.
There are certain error conditions for which my device requires the
driver to "help out" and this requires mapping the Srb->Buffer into
kernel address space so the driver can access it. In iSCSI there was a
function called iSCSIPortGetOriginalMdl(Srb) that could get me to the
MDL. Once I have the MDL I can map the buffer to system address space.
For storport, there is no equivalent function so how can I get to the
MDL from the Srb?
thanks
David Tag: How to find LowerDeviceObject in DDK MSVAD Audio Sample?? Tag: 89685
I use MSVAD to develop my own usb audio stream driver. When I want to
CallUSBD, I must have LowerDeviceObject to pass down the IRP. How to
find the LowerDeviceObject??