Hi,
Can I use IoGetDeviceObjectPointer() in my filter driver layer below the Disk.sys driver
to get the PDO of the IDE controller enumerated by PCI.sys. I failed at my try and the
following is my code
UNICODE_STRING nameString;
WCHAR stringBuffer[128];
PFILE_OBJECT fileObject;
PDEVICE_OBJECT rawDeviceObject;
nameString.Buffer = stringBuffer;
nameString.MaximumLength = 128*2;
RtlInitUnicodeString(&nameString, L"\Device\NTPNP_PCI0003");
status = IoGetDeviceObjectPointer(
&nameString,
FILE_READ_ATTRIBUTES,
&fileObject,
&rawDeviceObject );
Or could anyone tell me is it possible to get any device object’s pointer?
Does it have any restriction?
Thanks and Best Regards …
David Wang
What error did you get ? Are you sure that the name you pass is something that does not change from boot to boot ?
–
Nar Ganapathy
Windows Core OS group
This posting is provided “AS IS” with no warranties, and confers no rights.
“???(David Wang)” wrote in message news:xxxxx@ntdev…
Hi,
Can I use IoGetDeviceObjectPointer() in my filter driver layer below the Disk.sys driver
to get the PDO of the IDE controller enumerated by PCI.sys. I failed at my try and the
following is my code
UNICODE_STRING nameString;
WCHAR stringBuffer[128];
PFILE_OBJECT fileObject;
PDEVICE_OBJECT rawDeviceObject;
nameString.Buffer = stringBuffer;
nameString.MaximumLength = 128*2;
RtlInitUnicodeString(&nameString, L"\Device\NTPNP_PCI0003");
status = IoGetDeviceObjectPointer(
&nameString,
FILE_READ_ATTRIBUTES,
&fileObject,
&rawDeviceObject );
Or could anyone tell me is it possible to get any device object’s pointer?
Does it have any restriction?
Thanks and Best Regards …
David Wang
the driver has to support IRP_MJ_CREATE. It’s entirely possible that
PCI doesn’t.
what are you trying to do with the PDO of the IDE controller?
-p
-----Original Message-----
From: xxxxx@sis.com.tw [mailto:xxxxx@sis.com.tw]
Sent: Friday, October 25, 2002 4:44 AM
To: NT Developers Interest List
Subject: [ntdev] IoGetDeviceObjectPointer()… failed!!
Hi,
Can I use IoGetDeviceObjectPointer() in my filter driver layer below the
Disk.sys driver
to get the PDO of the IDE controller enumerated by PCI.sys. I failed at
my try and the
following is my code
UNICODE_STRING nameString;
WCHAR stringBuffer[128];
PFILE_OBJECT fileObject;
PDEVICE_OBJECT rawDeviceObject;
nameString.Buffer = stringBuffer;
nameString.MaximumLength = 128*2;
RtlInitUnicodeString(&nameString, L"\Device\NTPNP_PCI0003");
status = IoGetDeviceObjectPointer(
&nameString,
FILE_READ_ATTRIBUTES,
&fileObject,
&rawDeviceObject );
Or could anyone tell me is it possible to get any device object’s
pointer?
Does it have any restriction?
Thanks and Best Regards …
David Wang
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to %%email.unsub%%
Hi:
I do this for accessing the south bridge configuration.
I have to write values to the south bridge and retrieve it back to
identify the
hardware type. Our hardware designer made the stupid design. But I can not
use cf8/cfc or HAL function to access . The Intel P4-3.06G processor has two
logical built-in processors. Using cf8/cfc method will get the wrong value
and
using HalGet/SetBusData… function will fail at WHQL testing…
So I have to get the PDO of the south bridge, build an IRP with minor
function
IRP_MN_QUERY_INTERFACE to get the help from the bus interface.
BUS_INTERFACE_STANDARD.
I succeed an expriment using bus interface standard on VGA driver to get
the all
devices’ configuration space. VGA driver is a filter driver layer above PDO
enumerated
by pci.sys. The driver architecture of IDE is controller minidriver and
there is no
PDO. So I try to use IoGetDeviceObjectPointer() to get the PDO of IDE
controller
in order to send an IRP…
I am new to driver development, any correct / suggests are welcome…
Best Regards
David Wang
----- Original Message -----
From: “Peter Wieland”
To: “NT Developers Interest List”
Sent: Saturday, October 26, 2002 12:21 AM
Subject: [ntdev] RE: IoGetDeviceObjectPointer()… failed!!
the driver has to support IRP_MJ_CREATE. It’s entirely possible that
PCI doesn’t.
what are you trying to do with the PDO of the IDE controller?
-p
-----Original Message-----
From: xxxxx@sis.com.tw [mailto:xxxxx@sis.com.tw]
Sent: Friday, October 25, 2002 4:44 AM
To: NT Developers Interest List
Subject: [ntdev] IoGetDeviceObjectPointer()… failed!!
Hi,
Can I use IoGetDeviceObjectPointer() in my filter driver layer below the
Disk.sys driver
to get the PDO of the IDE controller enumerated by PCI.sys. I failed at
my try and the
following is my code
UNICODE_STRING nameString;
WCHAR stringBuffer[128];
PFILE_OBJECT fileObject;
PDEVICE_OBJECT rawDeviceObject;
nameString.Buffer = stringBuffer;
nameString.MaximumLength = 128*2;
RtlInitUnicodeString(&nameString, L"\Device\NTPNP_PCI0003");
status = IoGetDeviceObjectPointer(
&nameString,
FILE_READ_ATTRIBUTES,
&fileObject,
&rawDeviceObject );
Or could anyone tell me is it possible to get any device object’s
pointer?
Does it have any restriction?
Thanks and Best Regards …
David Wang
—
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to %%email.unsub%%
—
You are currently subscribed to ntdev as: xxxxx@sis.com.tw
To unsubscribe send a blank email to %%email.unsub%%
If you have a legitimate need (unusual device or platform,) then your
solution lies somewhere in the ‘pci bus driver pdo filter’ space.
===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032
-----Original Message-----
From: “å®éŠ˜(David Wang)”
To: “NT Developers Interest List”
Date: Mon, 28 Oct 2002 20:43:32 +0800
Subject: [ntdev] RE: IoGetDeviceObjectPointer()… failed!!
> Hi:
>
> I do this for accessing the south bridge configuration.
>
> I have to write values to the south bridge and retrieve it back to
> identify the
> hardware type. Our hardware designer made the stupid design. But I can
> not
> use cf8/cfc or HAL function to access . The Intel P4-3.06G processor
> has two
> logical built-in processors. Using cf8/cfc method will get the wrong
> value
> and
> using HalGet/SetBusData… function will fail at WHQL testing…
>
> So I have to get the PDO of the south bridge, build an IRP with
> minor
> function
> IRP_MN_QUERY_INTERFACE to get the help from the bus interface.
> BUS_INTERFACE_STANDARD.
>
> I succeed an expriment using bus interface standard on VGA driver
> to get
> the all
> devices’ configuration space. VGA driver is a filter driver layer above
> PDO
> enumerated
> by pci.sys. The driver architecture of IDE is controller minidriver and
> there is no
> PDO. So I try to use IoGetDeviceObjectPointer() to get the PDO of IDE
> controller
> in order to send an IRP…
>
> I am new to driver development, any correct / suggests are welcome…
>
> Best Regards
>
> David Wang
>
>
> ----- Original Message -----
> From: “Peter Wieland”
> To: “NT Developers Interest List”
> Sent: Saturday, October 26, 2002 12:21 AM
> Subject: [ntdev] RE: IoGetDeviceObjectPointer()… failed!!
>
>
> the driver has to support IRP_MJ_CREATE. It’s entirely possible that
> PCI doesn’t.
>
> what are you trying to do with the PDO of the IDE controller?
>
> -p
> -----Original Message-----
> From: xxxxx@sis.com.tw [mailto:xxxxx@sis.com.tw]
> Sent: Friday, October 25, 2002 4:44 AM
> To: NT Developers Interest List
> Subject: [ntdev] IoGetDeviceObjectPointer()… failed!!
>
>
> Hi,
> Can I use IoGetDeviceObjectPointer() in my filter driver layer below
> the
> Disk.sys driver
> to get the PDO of the IDE controller enumerated by PCI.sys. I failed at
> my try and the
> following is my code
>
> UNICODE_STRING nameString;
> WCHAR stringBuffer[128];
> PFILE_OBJECT fileObject;
> PDEVICE_OBJECT rawDeviceObject;
>
> nameString.Buffer = stringBuffer;
> nameString.MaximumLength = 128*2;
>
> RtlInitUnicodeString(&nameString, L"\Device\NTPNP_PCI0003");
> status = IoGetDeviceObjectPointer(
> &nameString,
> FILE_READ_ATTRIBUTES,
> &fileObject,
> &rawDeviceObject );
>
> Or could anyone tell me is it possible to get any device object’s
> pointer?
> Does it have any restriction?
>
> Thanks and Best Regards …
>
> David Wang
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@microsoft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@sis.com.tw
> To unsubscribe send a blank email to %%email.unsub%%
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to %%email.unsub%%