阅读:1709回复:7
有关Streaming Minidriver(给分!)
(wdm win2k videocapture)
对于Streaming Minidriver有没有device对象呀,srb和irp间有什么关系,还有,srb难道只能由系统向minidriver发送吗,应用程序能不能象发送DeviceIoControl的irp一样向流设备发送irp或srb呢? |
|
沙发#
发布于:2002-01-30 11:45
Sure, streaming minidriver has its DeviceObject, which is created by the port driver which is not accessible by your minidriver.
SRB is just a converted structure for IRP which isolate you from gerneral Window driver model conceptions.SRB has a pointer to IRP, but you should not use it. You can use DeviceIoControl send IRP to the driver, remember it\'s not SRB, the port driver will convert the IRP to SRB and pass the request to your driver. Now that you select to develop a minidriver (streaming, storage, NDIS), you should follow the rules by M$, that is never all any API not belong to the respective port/miniport driver architecture. |
|
|
板凳#
发布于:2002-01-30 19:24
非常感谢你的回答!只是还有些不明白:
既然device object不是我创建的,那么我怎么拿到它的handle呢, 或者怎么知道它的guid呢? 还有,如果不通过srb访问irp,那我收到srb后怎样知道irp的control code呢? 有没有这方面的宝典可以读一读呀? 谢了! -- gung -- |
|
地板#
发布于:2002-01-31 01:43
You should not access the DeviceObject (indeed you don\'t need that), you just need care the DeviceExtension allocated by system for you. You specify the size of the DeviceExtension before calling StreamClassRegisterMinidriver(Yes, there is a trick with which you can access the DeviceObject, but you break the rule if you do that)
Note that the DeviceExtension here is not DeviceObject->DeviceExtension. DeviceObject and DeviceObject->DeviceExtension are maintained by the port driver which are tranpsrent to your minidriver. System converted IRP to SRB for you, you should parse SRB to know what you should do instead of check IRP for that. SRB contains everything you need to know to complete the request. System will create a symbol link for you, you can find that by WinObj. Your application can open that and communicate with your driver. Last, when you are programming a minidriver, foget all your knowledge about KMD, WDM. |
|
|
地下室#
发布于:2002-01-31 06:35
No score, no more answer to this question.
|
|
|
5楼#
发布于:2002-01-31 16:01
不要着急呀,给分后这个话题就不能继续拉!
[编辑 - 1/31/02 作者: gung] 欢迎大家re我,在我知道可用分有啥用之前,我会很大方的! :) [编辑 - 1/31/02 作者: gung] |
|
6楼#
发布于:2002-02-01 04:07
Thanks, you are really generous, I am in top 10 now, heihei.
|
|
|
7楼#
发布于:2005-03-16 16:01
gz
|
|