阅读:2389回复:14
驱动程序中的那些专有名词哪里可以有资料找?
在驱动程序中,常常都可看到PWDM_DEVICE_EXTENSION、IoRegisterDeviceInterface等等专有名词或函数,对于初学者来说,要知道它们是什么意思,是比较困难的,有没有象vc有msdn似的的参考资料?
|
|
沙发#
发布于:2002-11-06 10:30
ddk文档里有吧
|
|
|
板凳#
发布于:2002-11-06 10:40
ddk文档里有吧 哪里有ddk的文档下载? |
|
地板#
发布于:2002-11-06 10:45
哦,我知道了,在安装ddk的目录里有ddk的帮助文档,里面看查,可是好像不全,比如PWDM_DEVICE_EXTENSION就没有。谢谢版竹!
|
|
地下室#
发布于:2002-11-06 10:52
那个PWDM是前缀吧!?!?!?
查不到可以试试查DS的帮助。 再不行看源程序里有没有声明,好多都是程序里定义的。 其实我也很弱:D |
|
|
5楼#
发布于:2002-11-06 11:18
那个PWDM是前缀吧!?!?!? 应该不是前缀,因为不加它也没有。 DS帮助是指什么? 不是自定义的,我都有查过,没有! |
|
6楼#
发布于:2002-11-06 11:21
DriverStdio!
|
|
7楼#
发布于:2002-11-06 11:23
DriverStudio!
|
|
8楼#
发布于:2002-11-06 11:30
可惜我没装!
|
|
9楼#
发布于:2002-11-06 11:40
那位好人帮我看看在ds中能否找到?PIO_STACK_LOCATION、PWDM_DEVICE_EXTENSION
|
|
10楼#
发布于:2002-11-06 11:49
好好查查DDK的帮助吧!这是里面查到的!加P你就懂了吧! :)
PWDM_DEVICE_EXTENSION我也没查到! IO_STACK_LOCATION typedef struct _IO_STACK_LOCATION { UCHAR MajorFunction; UCHAR MinorFunction; UCHAR Flags; UCHAR Control; // // The following parameters depend on the IRP_MJ_XXX that is set // in MajorFunction. This declaration shows examples for IRP_MJ_READ, // IRP_MJ_WRITE, and IRP_MJ_DEVICE_CONTROL or, possibly, // IRP_MJ_INTERNAL_DEVICE_CONTROL requests, as well as for IRP_MJ_SCSI, // which is equivalent to IRP_MJ_INTERNAL_DEVICE_CONTROL. // For other IRP_MJ_XXX, see the structure definition. // union { . . struct { ULONG Length; ULONG Key; LARGE_INTEGER ByteOffset; } Read; struct { ULONG Length; ULONG Key; LARGE_INTEGER ByteOffset; } Write; . . struct { ULONG OutputBufferLength; ULONG InputBufferLength; ULONG IoControlCode; // IOCTL_XXX PVOID Type3InputBuffer; } DeviceIoControl; . . struct { struct _SCSI_REQUEST_BLOCK *Srb; } Scsi; . . } Parameters; PDEVICE_OBJECT DeviceObject; PFILE_OBJECT FileObject; . . } IO_STACK_LOCATION, *PIO_STACK_LOCATION; Each I/O stack location in a given IRP has some common members and some request-type-specific members. The following summarizes the general structure of every stack location. Members MajorFunction Is the IRP_MJ_XXX telling the driver what I/O operation is requested. MinorFunction Is a subfunction code for MajorFunction. The PnP Manager, the Power Manager, file system drivers, and SCSI class drivers set this member for some requests. Flags Is set with request-type-specific values and used almost exclusively by file system drivers. However, removable-media device drivers check whether this member is set with SL_OVERRIDE_VERIFY_VOLUME for read requests to determine whether to continue the read operation even if the device object\'s Flags is set with DO_VERIFY_VOLUME. Intermediate drivers layered over a removable-media device driver must copy this member into the I/O stack location of the next-lower driver in all incoming IRP_MJ_READ requests. Control Drivers can check this member to determine whether it is set with SL_PENDING_RETURNED. Drivers have read-only access to this member. Parameters.Xxx Depends on the value of MajorFunction. For more detailed information about which IRP_MJ_XXX different types of drivers must handle, and for the Parameters.Xxx for each IRP_MJ_XXX, see IRP Function Codes and IOCTLs of this manual. DeviceObject Is a pointer to the driver-created device object representing the target physical, logical, or virtual device for which this driver is to handle the IRP. FileObject Is a pointer to the file object, if any, associated with DeviceObject. Include wdm.h or ntddk.h Comments Every higher-level driver is responsible for setting up the I/O stack location for the next-lower driver in each IRP. In some cases, a higher-level driver layered over a mass-storage device driver is responsible for splitting up large transfer requests for the underlying device driver. In particular, SCSI class drivers must check the Parameters.Read.Length and Parameters.Write.Length, determine whether the size of the requested transfer exceeds the underlying HBA\'s transfer capabilities, and, if so, split the Length of the original request into a sequence of partial transfers to satisfy the original IRP. A higher-level driver\'s call to IoCallDriver sets up the DeviceObject pointer to the next-lower-level driver\'s target device object in the I/O stack location of the lower driver. The I/O Manager passes each higher-level driver\'s IoCompletion routine a pointer to its own DeviceObject when or if the IoCompletion routine is called on completion of the IRP. If a higher-level driver allocates IRPs to make requests of its own, its IoCompletion routine is passed a NULL DeviceObject pointer if that driver neither allocates a stack location for itself nor sets up the DeviceObject pointer in its own stack location of the newly allocated IRP. See Also IoCallDriver, IoGetCurrentIrpStackLocation, IoGetNextIrpStackLocation, IoSetCompletionRoutine, IoSetNextIrpStackLocation, IO_STATUS_BLOCK, IRP Built on Wednesday, June 28, 2000 |
|
|
11楼#
发布于:2002-11-06 11:58
为什么PWDM_DEVICE_EXTENSION查不到呢?
[编辑 - 11/6/02 by fzzzf] |
|
12楼#
发布于:2002-11-07 22:05
?
|
|
13楼#
发布于:2002-11-07 22:06
有无中文文档?
哪里有? |
|
14楼#
发布于:2002-11-07 22:07
help?
|
|