hi,
I have to write a driver for our multiport serial card.
I saw in
http://groups.google.com.tw/groups?hl=zh-TW&lr=&ie=UTF-8&oe=UTF-8&threadm=8q
8nq1%24lb7%241%40nnrp1.deja.com&rnum=2&prev=/groups%3Fq%3DIRP_MN_QUERY_RESOU
RCE_REQUIREMENTS%26hl%3Dzh-TW%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D8q8
nq1%2524lb7%25241%2540nnrp1.deja.com%26rnum%3D2
said that to solve such problem, one should write a filter driver modify
the IRP_MN_START_DEVICE
resource list before sending the IRP down.
My question is could I modify the resource list at bus driver instead of
filter driver?
If could, how to do?
My code is:
Bus_PDO_PnP
{
switch (IrpStack->MinorFunction) {
…
case IRP_MN_START_DEVICE:
status=Bus_PDO_Start_Device(DeviceData, Irp);
}
}
NTSTATUS
Bus_PDO_Start_Device(
IN PPDO_DEVICE_DATA DeviceData,
IN PIRP Irp )
{
pResourceList = ExAllocatePoolWithTag ( PagedPool, resourceListSize,
BUSENUM_POOL_TAG );
…
pIrpStack->Parameters.StartDevice.AllocatedResources =
pResourceList;
pIrpStack->Parameters.StartDevice.AllocatedResourcesTranslated =
pResourceListTranslated;
return STATUS_SUCCESS;
}
But the com port function driver seems still doesn’t got the resource
list.
Thanks.
Liang Ming-Chung