Dear All

How could I assign my defined DeviceExtension to an AVStream device object?
PS : I use KsInitializeDriver to initialize my AVStream driver
Does AVStream assign a default DeviceExtension

Best Regards
Edward

Re: AVStream : how to assign my device extension? by Igor

Igor
Tue Jun 01 03:49:23 CDT 2004

> How could I assign my defined DeviceExtension to an AVStream device
object?
You shouldn't set DeviceExtension field of DEVICE_OBJECT; this field is used
to
store pointer to CKsDevice object; instead define your own
AVStrMiniDeviceAdd
routine (KSDEVICE_DISPATCH.Add), and initialize Context field of KSDEVICE;

> Does AVStream assign a default DeviceExtension?
Yes, if you mean DEVICE_OBJECT.DeviceExtension; this is a pointer to
CKSDevice object which contains KSDEVICE structure.
No, if you are talking about KSDEVICE.Context (initially zero).




Re: AVStream : how to assign my device extension? by anonymous

anonymous
Tue Jun 01 20:11:04 CDT 2004

Hi

I check the pointer of KSDEVICE.FunctionalDeviceObject .DeviceExtension field and found it is not equal to the pointer of KSDEVICE structure. So what's wrong

Best Regards
Edward

Re: AVStream : how to assign my device extension? by Igor

Igor
Wed Jun 02 03:40:23 CDT 2004

As I've said KSDEVICE.FunctionalDeviceObject .DeviceExtension
points to CKsDevice object (KSDEVICE structure is a field of this object).

"Edward Hsu" <anonymous@discussions.microsoft.com> wrote in message
news:E876E29E-6FF5-4506-B508-EB5EAA05FEC3@microsoft.com...
> Hi,
>
> I check the pointer of KSDEVICE.FunctionalDeviceObject
.DeviceExtension field and found it is not equal to the pointer of KSDEVICE
structure. So what's wrong?
>
> Best Regards,
> Edward



Re: AVStream : how to assign my device extension? by Igor

Igor
Wed Jun 02 03:54:24 CDT 2004

According to debug information:

class CKsDevice : public CBaseUnknown,
public IIndirectedUnknown
{
CKsDevice(IUnknown* ){ /*... */}
private:
// ...
KSDEVICE m_KsDevice; // offset:0x68
};