Vendor ID and Device ID for unrelated device

Hi,

I once again turn to the NT gurus for help. My requirement is this - I need
to be able to determine which particular videocard has been installed in
the system (there are two possibilities for our configuration) and then
load the required software based on the videocard.

From what I found out so far, a combination of IoGetDeviceInterfaces () to
get the device object and then IRP_MN_QUERY_ID to get the Device Id and
Vendor Id would get me the necessary information. Would that be correct or
is there any other way to do it?

I would appreciate any help that I get.

Thanks in advance,

Sheela.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Assuming that this is a PCI type device, or equivalent, the PCI information
is available when your driver processes the PnP IRP_MN_START_DEVICE. Vendor
ID and Device ID should be found in
IO_STACK_LOCATION->Parameters.StartDevice.

Gary G. Little
Sr. Staff Engineer
Broadband Storage, LLC
xxxxx@broadstor.com
xxxxx@delphieng.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

if the device is a PCI device read the PCI configuration space and
from there you have the device ID…!

-----Original Message-----
From: xxxxx@radisys.com [mailto:xxxxx@radisys.com]
Sent: Monday, February 05, 2001 8:57 AM
To: NT Developers Interest List
Subject: [ntdev] Vendor ID and Device ID for unrelated device

Hi,

I once again turn to the NT gurus for help. My requirement is
this - I need
to be able to determine which particular videocard has been
installed in
the system (there are two possibilities for our configuration)
and then
load the required software based on the videocard.

From what I found out so far, a combination of
IoGetDeviceInterfaces () to
get the device object and then IRP_MN_QUERY_ID to get the
Device Id and
Vendor Id would get me the necessary information. Would that
be correct or
is there any other way to do it?

I would appreciate any help that I get.

Thanks in advance,

Sheela.


You are currently subscribed to ntdev as: xxxxx@skystream.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thank you for your reply. However, there are already drivers existing for
both the flavors of video cards and I will be writing another software only
driver to determine which one of those video cards are installed on the
system. This is on W2k, so I probably need something similar to
HalGetBusData ().

Thanks,
Sheela.

On 02/05/01, “Gary Little ” wrote:
> Assuming that this is a PCI type device, or equivalent, the PCI information
> is available when your driver processes the PnP IRP_MN_START_DEVICE. Vendor
> ID and Device ID should be found in
> IO_STACK_LOCATION->Parameters.StartDevice.
>
> Gary G. Little
> Sr. Staff Engineer
> Broadband Storage, LLC
> xxxxx@broadstor.com
> xxxxx@delphieng.com
>
> —
> You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I assumed you were on W2k. Remember, HalGetBusData is obsolete and supported
only for NT4 legacy drivers.

Have you considered using the GUIDs for the lower drivers? Each of those
other drivers should have a unique GUID, and I would assume that those GUIDs
are published and available to your driver. Simply get an interface and the
one that returns is the one that is there.

Gary G. Little
Sr. Staff Engineer
Broadband Storage, LLC
xxxxx@broadstor.com
xxxxx@delphieng.com

-----Original Message-----
From: xxxxx@radisys.com [mailto:xxxxx@radisys.com]
Sent: Monday, February 05, 2001 12:20 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Vendor ID and Device ID for unrelated device

Thank you for your reply. However, there are already drivers existing for
both the flavors of video cards and I will be writing another software only
driver to determine which one of those video cards are installed on the
system. This is on W2k, so I probably need something similar to
HalGetBusData ().

Thanks,
Sheela.

On 02/05/01, “Gary Little ” wrote:
> Assuming that this is a PCI type device, or equivalent, the PCI
information
> is available when your driver processes the PnP IRP_MN_START_DEVICE.
Vendor
> ID and Device ID should be found in
> IO_STACK_LOCATION->Parameters.StartDevice.
>
> Gary G. Little
> Sr. Staff Engineer
> Broadband Storage, LLC
> xxxxx@broadstor.com
> xxxxx@delphieng.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@delphieng.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@delphieng.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thank you for your reply. I hadn’t thought about GUIDs (still in NT 4.0
land!) and will use that.

Sheela.

On 02/05/01, “Gary Little ” wrote:
> I assumed you were on W2k. Remember, HalGetBusData is obsolete and supported
> only for NT4 legacy drivers.
>
> Have you considered using the GUIDs for the lower drivers? Each of those
> other drivers should have a unique GUID, and I would assume that those GUIDs
> are published and available to your driver. Simply get an interface and the
> one that returns is the one that is there.
>
> Gary G. Little
> Sr. Staff Engineer
> Broadband Storage, LLC
> xxxxx@broadstor.com
> xxxxx@delphieng.com
>
>
> -----Original Message-----
> From: xxxxx@radisys.com [mailto:xxxxx@radisys.com]
> Sent: Monday, February 05, 2001 12:20 PM
> To: NT Developers Interest List
> Subject: [ntdev] RE: Vendor ID and Device ID for unrelated device
>
>
> Thank you for your reply. However, there are already drivers existing for
> both the flavors of video cards and I will be writing another software only
> driver to determine which one of those video cards are installed on the
> system. This is on W2k, so I probably need something similar to
> HalGetBusData ().
>
> Thanks,
> Sheela.
>
>
> On 02/05/01, “Gary Little ” wrote:
> > Assuming that this is a PCI type device, or equivalent, the PCI
> information
> > is available when your driver processes the PnP IRP_MN_START_DEVICE.
> Vendor
> > ID and Device ID should be found in
> > IO_STACK_LOCATION->Parameters.StartDevice.
> >
> > Gary G. Little
> > Sr. Staff Engineer
> > Broadband Storage, LLC
> > xxxxx@broadstor.com
> > xxxxx@delphieng.com
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@delphieng.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: xxxxx@delphieng.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> Assuming that this is a PCI type device, or equivalent, the PCI
information

is available when your driver processes the PnP IRP_MN_START_DEVICE.
Vendor
ID and Device ID should be found in
IO_STACK_LOCATION->Parameters.StartDevice.

Sorry.

struct {
PCM_RESOURCE_LIST AllocatedResources;
PCM_RESOURCE_LIST AllocatedResourcesTranslated;
} StartDevice;

Where you have seen the PCI IDs here?

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Frankly, you’re right … Vendor and device IDs are not available there. I
cheat and run the hardware ID I get back after I register the GUID in
AddDevice. Not happy with that but the best I can find right now. There are
a few more IRP_MN_Xxxx calls that have potential but I haven’t had the time
to try them.

I read your post and was thinking StartDevice …

Gary G. Little
Sr. Staff Engineer
Broadband Storage, LLC
xxxxx@broadstor.com
xxxxx@delphieng.com

-----Original Message-----
From: Maxim S. Shatskih [mailto:xxxxx@storagecraft.com]
Sent: Tuesday, February 06, 2001 3:08 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Vendor ID and Device ID for unrelated device

> Assuming that this is a PCI type device, or equivalent, the PCI
information
> is available when your driver processes the PnP IRP_MN_START_DEVICE.
Vendor
> ID and Device ID should be found in
> IO_STACK_LOCATION->Parameters.StartDevice.

Sorry.

struct {
PCM_RESOURCE_LIST AllocatedResources;
PCM_RESOURCE_LIST AllocatedResourcesTranslated;
} StartDevice;

Where you have seen the PCI IDs here?

Max


You are currently subscribed to ntdev as: xxxxx@delphieng.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi,

Another possible method is IRP_MN_READ_CONFIG.

Allocate your own IRP with Major function IRP_MJ_PNP and minor function
IRP_MN_READ_CONFIG fill ReadWriteConfig structure in the iostack location
and send it down to the lower driver.

Look IRP_MN_READ_CONFIG in 2000DDk for detailed information

Rgds

Shanavas.K.S
Software Engineer
Nest India

-----Original Message-----
From: Kiran Mandava [mailto:xxxxx@skystream.com]
Sent: Tuesday, February 06, 2001 3:42 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Vendor ID and Device ID for unrelated device

if the device is a PCI device read the PCI configuration space and
from there you have the device ID…!

-----Original Message-----
From: xxxxx@radisys.com [mailto:xxxxx@radisys.com]
Sent: Monday, February 05, 2001 8:57 AM
To: NT Developers Interest List
Subject: [ntdev] Vendor ID and Device ID for unrelated device

Hi,

I once again turn to the NT gurus for help. My requirement is
this - I need
to be able to determine which particular videocard has been
installed in
the system (there are two possibilities for our configuration)
and then
load the required software based on the videocard.

From what I found out so far, a combination of
IoGetDeviceInterfaces () to
get the device object and then IRP_MN_QUERY_ID to get the
Device Id and
Vendor Id would get me the necessary information. Would that
be correct or
is there any other way to do it?

I would appreciate any help that I get.

Thanks in advance,

Sheela.


You are currently subscribed to ntdev as: xxxxx@skystream.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@nestec.net
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com