Bus Filter driver


NTSTATUS DispatchPnp(IN PDEVICE_OBJECT fido, IN PIRP Irp )
{
NTSTATUS status;
PIO_STACK_LOCATION stack = IoGetCurrentIrpStackLocation(Irp);
PDEVICE_RELATIONS rel;

if(stack->MinorFunction==IRP_MN_QUERY_DEVICE_RELATIONS)
{
if(stack->Parameters.QueryDeviceRelations.Type==BusRelations)
{
rel = (PDEVICE_RELATIONS)Irp->IoStatus.Information;
if(rel->Count > 0)
{
for(i=0; iCount; i++)
{

IoCreateDevice( … , &newDevice );
IoAttachDeviceToDeviceStack( newDevice, rel->Objects[i] );

}
}
}
}

IoSkipCurrentIrpStackLocation(Irp);
status = IoCallDriver(pdx->LowerDeviceObject,Irp);
IoReleaseRemoveLock(&pdx->RemoveLock,Irp);

return status;
}

Is this right methods?
Where the bus filter driver, FilterDO attach to each PDO.

I registered it to SCSIAdapter class as upper filters.
rel->Count always 0.

I check it after IoCallDriver, rel->Count also 0.

thanks…


Áõ±Ç Á¤º¸ °¡Àå ºü¸£°í ÆíÇÏ°Ô º¸½Ç ¼ö ÀÖ½À´Ï´Ù. MSN Áõ±Ç/ÅõÀÚ
http://www.msn.co.kr/stock/

You want to check on completion, not dispatch.

=====================
Mark Roddy
Windows .NET/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Son Won-jang
Sent: Thursday, January 27, 2005 4:22 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Bus Filter driver



NTSTATUS DispatchPnp(IN PDEVICE_OBJECT fido, IN PIRP Irp ) {
NTSTATUS status;
PIO_STACK_LOCATION stack = IoGetCurrentIrpStackLocation(Irp);
PDEVICE_RELATIONS rel;

if(stack->MinorFunction==IRP_MN_QUERY_DEVICE_RELATIONS)
{
if(stack->Parameters.QueryDeviceRelations.Type==BusRelations)
{
rel = (PDEVICE_RELATIONS)Irp->IoStatus.Information;
if(rel->Count > 0)
{
for(i=0; iCount; i++)
{

IoCreateDevice( … , &newDevice );
IoAttachDeviceToDeviceStack( newDevice, rel->Objects[i] );

}
}
}
}

IoSkipCurrentIrpStackLocation(Irp);
status = IoCallDriver(pdx->LowerDeviceObject,Irp);
IoReleaseRemoveLock(&pdx->RemoveLock,Irp);

return status;
}


Is this right methods?
Where the bus filter driver, FilterDO attach to each PDO.

I registered it to SCSIAdapter class as upper filters.
rel->Count always 0.

I check it after IoCallDriver, rel->Count also 0.

thanks…


증권 정보 가장 빠르고 편하게 보실 수 있습니다. MSN 증권/투자
http://www.msn.co.kr/stock/


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com

You also need to keep track of the PDOs you already attached to and only attach to them once.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Mark Roddy
Sent: Thursday, January 27, 2005 4:23 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Bus Filter driver

You want to check on completion, not dispatch.

=====================
Mark Roddy
Windows .NET/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Son Won-jang
Sent: Thursday, January 27, 2005 4:22 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Bus Filter driver



NTSTATUS DispatchPnp(IN PDEVICE_OBJECT fido, IN PIRP Irp ) {
NTSTATUS status;
PIO_STACK_LOCATION stack = IoGetCurrentIrpStackLocation(Irp);
PDEVICE_RELATIONS rel;

if(stack->MinorFunction==IRP_MN_QUERY_DEVICE_RELATIONS)
{
if(stack->Parameters.QueryDeviceRelations.Type==BusRelations)
{
rel = (PDEVICE_RELATIONS)Irp->IoStatus.Information;
if(rel->Count > 0)
{
for(i=0; iCount; i++)
{

IoCreateDevice( … , &newDevice );
IoAttachDeviceToDeviceStack( newDevice, rel->Objects[i] );

}
}
}
}

IoSkipCurrentIrpStackLocation(Irp);
status = IoCallDriver(pdx->LowerDeviceObject,Irp);
IoReleaseRemoveLock(&pdx->RemoveLock,Irp);

return status;
}


Is this right methods?
Where the bus filter driver, FilterDO attach to each PDO.

I registered it to SCSIAdapter class as upper filters.
rel->Count always 0.

I check it after IoCallDriver, rel->Count also 0.

thanks…


증권 정보 가장 빠르고 편하게 보실 수 있습니다. MSN 증권/투자
http://www.msn.co.kr/stock/


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com