Re: How to get PCI Slot Number in W2K ??

Miniport_Initialize(
OUT PNDIS_STATUS OpenErrorStatus,
OUT PUINT SelectedMediumIndex,
IN PNDIS_MEDIUM MediumArray,
IN UINT MediumArraySize,
IN NDIS_HANDLE MiniportAdapterHandle,
IN NDIS_HANDLE ConfigurationHandle
)
{
NDIS_STRING RegStrSlotNumber = NDIS_STRING_CONST(“SlotNumber”);

NdisOpenConfiguration(
&Status,
&ConfigHandle,
ConfigurationHandle
);

NdisReadConfiguration(
&Status,
&ConfigValue,
ConfigHandle,
&RegStrSlotNumber, NdisParameterInteger);

}
Best Regards

Kevin Liang
Accton Technology Corporation
Shanghai R&D Division

“Gopikrishna Prabhakar
Yadappanavar” To: “NT Developers Interest List”
<gopikrishna.yadappanavar>
wipro.com> cc:
Sent by: Subject: [ntdev] How to get PCI Slot Number
xxxxx@lists.os in W2K ??
r.com

03/19/2001 02:11 PM
Please respond to “NT
Developers Interest List”

Hi gurus,

Is there any way I get to know the PCI slot number in W2K ?
I am writing a miniport driver for ethernet card and need to know the PCI
slot number on which the ethernet card is placed??

Thanx
Gopikrishna


You are currently subscribed to ntdev as: xxxxx@accton-sh.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</gopikrishna.yadappanavar>

> From: xxxxx@accton-sh.com

Miniport_Initialize(
OUT PNDIS_STATUS OpenErrorStatus,
OUT PUINT SelectedMediumIndex,
IN PNDIS_MEDIUM MediumArray,
IN UINT MediumArraySize,
IN NDIS_HANDLE MiniportAdapterHandle,
IN NDIS_HANDLE ConfigurationHandle
)
{
NDIS_STRING RegStrSlotNumber = NDIS_STRING_CONST(“SlotNumber”);

NdisOpenConfiguration(
&Status,
&ConfigHandle,
ConfigurationHandle
);

NdisReadConfiguration(
&Status,
&ConfigValue,
ConfigHandle,
&RegStrSlotNumber, NdisParameterInteger);

}

Thanks, Kevin. I was guessing it must be something like this, but I
couldn’t find the key documented anywhere. How did you find out about
the “SlotNumber” key? Is it documented somewhere, or did you have
to grope through the registry? Are there any other “standard” keys?


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

This returns a -1 from the registry key in win2k.
Apparently in PnP systems it does not return the slot number of the PCI
device.
It only seems to work in NT ( non PnP)

Ramit.
----- Original Message -----
From: “J. J. Farrell”
To: “NT Developers Interest List”
Sent: Tuesday, March 20, 2001 8:19 AM
Subject: [ntdev] Re: How to get PCI Slot Number in W2K ??

> > From: xxxxx@accton-sh.com
> >
> > Miniport_Initialize(
> > OUT PNDIS_STATUS OpenErrorStatus,
> > OUT PUINT SelectedMediumIndex,
> > IN PNDIS_MEDIUM MediumArray,
> > IN UINT MediumArraySize,
> > IN NDIS_HANDLE MiniportAdapterHandle,
> > IN NDIS_HANDLE ConfigurationHandle
> > )
> > {
> > NDIS_STRING RegStrSlotNumber = NDIS_STRING_CONST(“SlotNumber”);
> > …
> > NdisOpenConfiguration(
> > &Status,
> > &ConfigHandle,
> > ConfigurationHandle
> > );
> >
> > NdisReadConfiguration(
> > &Status,
> > &ConfigValue,
> > ConfigHandle,
> > &RegStrSlotNumber, NdisParameterInteger);
> > …
> > }
>
> Thanks, Kevin. I was guessing it must be something like this, but I
> couldn’t find the key documented anywhere. How did you find out about
> the “SlotNumber” key? Is it documented somewhere, or did you have
> to grope through the registry? Are there any other “standard” keys?
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@wipro.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,

Thank you all for trying to help me out …

As Kevin Liang said, I need to get Slot Number within “NDIS rules”. I was
looking for some NDIS call giving SlotNumber. and I guess there isn’t any
call for that :frowning:

As of using NdisReadConfiguration with “SlotNumber” it gives -1 instead of
slot number (Thanx to Pnp Manager !!!)

Thanx
Gopikrishna

----- Original Message -----
From: J. J. Farrell
To: NT Developers Interest List
Sent: Tuesday, March 20, 2001 8:19 AM
Subject: [ntdev] Re: How to get PCI Slot Number in W2K ??

> > From: xxxxx@accton-sh.com
> >
> > Miniport_Initialize(
> > OUT PNDIS_STATUS OpenErrorStatus,
> > OUT PUINT SelectedMediumIndex,
> > IN PNDIS_MEDIUM MediumArray,
> > IN UINT MediumArraySize,
> > IN NDIS_HANDLE MiniportAdapterHandle,
> > IN NDIS_HANDLE ConfigurationHandle
> > )
> > {
> > NDIS_STRING RegStrSlotNumber = NDIS_STRING_CONST(“SlotNumber”);
> > …
> > NdisOpenConfiguration(
> > &Status,
> > &ConfigHandle,
> > ConfigurationHandle
> > );
> >
> > NdisReadConfiguration(
> > &Status,
> > &ConfigValue,
> > ConfigHandle,
> > &RegStrSlotNumber, NdisParameterInteger);
> > …
> > }
>
> Thanks, Kevin. I was guessing it must be something like this, but I
> couldn’t find the key documented anywhere. How did you find out about
> the “SlotNumber” key? Is it documented somewhere, or did you have
> to grope through the registry? Are there any other “standard” keys?
>
>
> —
> You are currently subscribed to ntdev as:
xxxxx@wipro.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,
My solution in previous mail is referenced from W2K DDK Intel E100BEX
Sample.

In W2K DDK NDIS Sample for INTEL ETHEREXPRESS PRO/100B™ AND
ETHEREXPRESS PRO/100+™, there are following comment in PCI.C:

//-----------------------------------------------------------------------------
// Procedure: FindPciDevice50Scan
//
// Description: This routine finds an adapter for the driver to load on
// The critical piece to understanding this routine is that
// the System will not let us read any information from PCI
// space from any slot but the one that the System thinks
// we should be using. The configuration manager rules this
// land… The Slot number used by this routine is just a
// placeholder, it could be zero even.
//…
//
// NOTE: due to NT 5’s Plug and Play configuration manager
// this routine will never return more than one device.
//

Best Regards

Kevin Liang
Accton Technology Corporation
Shanghai R&D Division

“Gopikrishna Prabhakar
Yadappanavar” To: “NT Developers Interest List”
<gopikrishna.yadappanavar>
wipro.com> cc:
Sent by: Subject: [ntdev] Re: How to get PCI Slot
xxxxx@lists.os Number in W2K ??
r.com

2001/03/20 12:55 PM
Please respond to “NT
Developers Interest List”

Hi,

Thank you all for trying to help me out …

As Kevin Liang said, I need to get Slot Number within “NDIS rules”. I was
looking for some NDIS call giving SlotNumber. and I guess there isn’t any
call for that :frowning:

As of using NdisReadConfiguration with “SlotNumber” it gives -1 instead of
slot number (Thanx to Pnp Manager !!!)

Thanx
Gopikrishna

----- Original Message -----
From: J. J. Farrell
To: NT Developers Interest List
Sent: Tuesday, March 20, 2001 8:19 AM
Subject: [ntdev] Re: How to get PCI Slot Number in W2K ??

> > From: xxxxx@accton-sh.com
> >
> > Miniport_Initialize(
> > OUT PNDIS_STATUS OpenErrorStatus,
> > OUT PUINT SelectedMediumIndex,
> > IN PNDIS_MEDIUM MediumArray,
> > IN UINT MediumArraySize,
> > IN NDIS_HANDLE MiniportAdapterHandle,
> > IN NDIS_HANDLE ConfigurationHandle
> > )
> > {
> > NDIS_STRING RegStrSlotNumber = NDIS_STRING_CONST(“SlotNumber”);
> > …
> > NdisOpenConfiguration(
> > &Status,
> > &ConfigHandle,
> > ConfigurationHandle
> > );
> >
> > NdisReadConfiguration(
> > &Status,
> > &ConfigValue,
> > ConfigHandle,
> > &RegStrSlotNumber, NdisParameterInteger);
> > …
> > }
>
> Thanks, Kevin. I was guessing it must be something like this, but I
> couldn’t find the key documented anywhere. How did you find out about
> the “SlotNumber” key? Is it documented somewhere, or did you have
> to grope through the registry? Are there any other “standard” keys?
>
>
> —
> You are currently subscribed to ntdev as:
xxxxx@wipro.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: xxxxx@accton-sh.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</gopikrishna.yadappanavar>

Using NdisMGetDeviceProperty() you can get the information you need to
implement the method described in
http://support.microsoft.com/support/kb/articles/Q253/2/32.ASP.

Pierre

On 03/20/01, “xxxxx@accton-sh.com” wrote:

Hi,
My solution in previous mail is referenced from W2K DDK Intel E100BEX
Sample.

In W2K DDK NDIS Sample for INTEL ETHEREXPRESS PRO/100B™ AND
ETHEREXPRESS PRO/100+™, there are following comment in PCI.C:

//-----------------------------------------------------------------------------
// Procedure: FindPciDevice50Scan
//
// Description: This routine finds an adapter for the driver to load on
// The critical piece to understanding this routine is that
// the System will not let us read any information from PCI
// space from any slot but the one that the System thinks
// we should be using. The configuration manager rules this
// land… The Slot number used by this routine is just a
// placeholder, it could be zero even.
//…
//
// NOTE: due to NT 5’s Plug and Play configuration manager
// this routine will never return more than one device.
//

Best Regards

Kevin Liang
Accton Technology Corporation
Shanghai R&D Division

“Gopikrishna Prabhakar
Yadappanavar” To: “NT Developers Interest List”
<gopikrishna.yadappanavar>
> wipro.com> cc:
> Sent by: Subject: [ntdev] Re: How to get PCI Slot
> xxxxx@lists.os Number in W2K ??
> r.com
>
>
> 2001/03/20 12:55 PM
> Please respond to “NT
> Developers Interest List”
>
>
>
>
>
> Hi,
>
> Thank you all for trying to help me out …
>
> As Kevin Liang said, I need to get Slot Number within “NDIS rules”. I was
> looking for some NDIS call giving SlotNumber. and I guess there isn’t any
> call for that :frowning:
>
> As of using NdisReadConfiguration with “SlotNumber” it gives -1 instead of
> slot number (Thanx to Pnp Manager !!!)
>
> Thanx
> Gopikrishna
>
>
> ----- Original Message -----
> From: J. J. Farrell
> To: NT Developers Interest List
> Sent: Tuesday, March 20, 2001 8:19 AM
> Subject: [ntdev] Re: How to get PCI Slot Number in W2K ??
>
>
> > > From: xxxxx@accton-sh.com
> > >
> > > Miniport_Initialize(
> > > OUT PNDIS_STATUS OpenErrorStatus,
> > > OUT PUINT SelectedMediumIndex,
> > > IN PNDIS_MEDIUM MediumArray,
> > > IN UINT MediumArraySize,
> > > IN NDIS_HANDLE MiniportAdapterHandle,
> > > IN NDIS_HANDLE ConfigurationHandle
> > > )
> > > {
> > > NDIS_STRING RegStrSlotNumber = NDIS_STRING_CONST(“SlotNumber”);
> > > …
> > > NdisOpenConfiguration(
> > > &Status,
> > > &ConfigHandle,
> > > ConfigurationHandle
> > > );
> > >
> > > NdisReadConfiguration(
> > > &Status,
> > > &ConfigValue,
> > > ConfigHandle,
> > > &RegStrSlotNumber, NdisParameterInteger);
> > > …
> > > }
> >
> > Thanks, Kevin. I was guessing it must be something like this, but I
> > couldn’t find the key documented anywhere. How did you find out about
> > the “SlotNumber” key? Is it documented somewhere, or did you have
> > to grope through the registry? Are there any other “standard” keys?
> >
> >
> > —
> > You are currently subscribed to ntdev as:
> xxxxx@wipro.com
> > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@accton-sh.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</gopikrishna.yadappanavar>

Andrew S. Grove
OR
Andrew Grover

Intel’s co-founder and chairman

Best Regards

Kevin Liang

“Grover, Andrew”
com>
Sent by: cc:
xxxxx@lis Subject: [ntdev] RE: How to get PCI Slot
ts.osr.com Number in W2K ??

2001/03/21 09:14 AM
Please respond to “NT
Developers Interest
List”

> From: Gopikrishna Prabhakar Yadappanavar
> Is there any way I get to know the PCI slot number in W2K ?
> I am writing a miniport driver for ethernet card and need to
> know the PCI
> slot number on which the ethernet card is placed??

Why do you need to know this?

Regards – Andy


You are currently subscribed to ntdev as: xxxxx@accton-sh.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