Hello all,
Specific Question:
I have written a AV Stream Class (WDM)Mindiver and I dont
know how restrict it to habdle only One device object. and if in future
if i want to implement it for multiple device object.. how should i
do.?

General Queries:

1) How should driver handle multiple Device Object, I mean
what is generally done to keep track of Device Object
2) In case of Multiple device Object, how driver Identifies
IRPs for respective Device Objects.
3) How can multiple aaplications can use same driver and
same device for its use.Is it possible?


Please help me to find out answers of above queries, It would be
great help..
Thanks in Advance.
Darshan

Re: Queries About Multiple Device Objects...Please Help... by darshan

darshan
Sun Oct 15 23:24:59 CDT 2006

Hello all,
I request u all to help me out..
Thanks a lot,
Darshan

darshan.tapdia@gmail.com wrote:
> Hello all,
> Specific Question:
> I have written a AV Stream Class (WDM)Mindiver and I dont
> know how restrict it to habdle only One device object. and if in future
> if i want to implement it for multiple device object.. how should i
> do.?
>
> General Queries:
>
> 1) How should driver handle multiple Device Object, I mean
> what is generally done to keep track of Device Object
> 2) In case of Multiple device Object, how driver Identifies
> IRPs for respective Device Objects.
> 3) How can multiple aaplications can use same driver and
> same device for its use.Is it possible?
>
>
> Please help me to find out answers of above queries, It would be
> great help..
> Thanks in Advance.
> Darshan


Re: Queries About Multiple Device Objects...Please Help... by Max

Max
Tue Oct 24 18:07:13 CDT 2006

Could be too late, but I'll try anyway.
See inline below.

<darshan.tapdia@gmail.com> wrote in message
news:1160972699.106332.298470@b28g2000cwb.googlegroups.com...
> Hello all,
> I request u all to help me out..
> Thanks a lot,
> Darshan
>
> darshan.tapdia@gmail.com wrote:
>> Hello all,
>> Specific Question:
>> I have written a AV Stream Class (WDM)Mindiver and I dont
>> know how restrict it to habdle only One device object. and if in future
>> if i want to implement it for multiple device object.. how should i
>> do.?

You want to handle only one device at a time? Sounds strange, but in case
you do want to do this just create a global refcount and increment it in
KSDEVICE::Create. Check it if it is > 1 and fail the call.


>> General Queries:
>>
>> 1) How should driver handle multiple Device Object, I mean
>> what is generally done to keep track of Device Object

Generally speaking device objects have extensions and all data pertinent to
the device instance should be kept there.


>> 2) In case of Multiple device Object, how driver Identifies
>> IRPs for respective Device Objects.

Filter = KsGetFilterFromIrp(Irp) followed by KsGetDevice(Filter) or
Pin = KsGetPinFromIrp(Irp) followed by Filter = KsGetFilter(Pin) followed by
KsGetDevice(Filter)


>> 3) How can multiple aaplications can use same driver and
>> same device for its use.Is it possible?

Yes, it is possible and you don't have to do anything special. For AVStream
device the default framework in the user mode is DirectShow. Your app(s)
just create a graph and add the filter for your device in there. In your
driver you will have to manage resource conflicts and your app should be
able to manage failures from the driver.

-- Max.



>>
>>
>> Please help me to find out answers of above queries, It would be
>> great help..
>> Thanks in Advance.
>> Darshan
>