阅读:5692回复:11
请教关于mirror driver的问题
诸位大虾,我在看DDK中的mirror例子,在用添加新硬件的方式将mirror driver 安装后,想要启动ddmlapp.exe。可是这个软件需要输入参数,我没有看到这两个参数的作用,另外我对这个ddmlapp.exe程序的作用不是很清除。DDK中说它是 user-mode service程序,是不是我在应用程序中也要把它相关的代码加入进去以控制mirror driver的动态加载和卸载呢?
谢谢 |
|
最新喜欢:![]() |
沙发#
发布于:2007-04-15 11:26
按说明编译mirror.dll, mirror.sys后拷贝到相应目录,然后运行mirror.ini, 再添加注册表,再编译ddmlapp运行,为什么提示"no 'micriosoft mirror driver' found"后退出阿?
|
|
板凳#
发布于:2004-05-25 23:12
我和你有同感,奇怪的事在第一次安装好的时候是可以中断DRVCOPYBITS的,可重新启动后就再也断不了了
|
|
|
地板#
发布于:2004-05-25 22:28
wowocock、及诸位大侠,我一直没有能够用SoftICE跟踪mirror driver的工作流程,后来我运行drivermonitor来看其DebugPrint的输出,结果发现只有DriverEnable、DrvEnableSurface等几个初始化的函数被调用,而其中的功能函数如DrvCopyBit则一个也没有被调用,是不是DDK中的nirror driver还没有实现基本的功能调用啊?
晕~~~~~~~~ |
|
地下室#
发布于:2004-05-24 08:58
我也测试过,很奇怪,有时候可以中断,有时候却不行,有QQ的话讨论一下,我的是37803144
|
|
|
5楼#
发布于:2004-05-23 21:09
呵呵,自己再顶一下。调试驱动程序一定要用sys文件调试嘛?我直接用DLl文件进行调试可以吗
|
|
6楼#
发布于:2004-05-23 20:38
wowocock大侠以及楼上的大侠,我正在试着用SoftIce来跟踪Mirror的工作流程。我首先用添加新硬件的方式将mirror驱动装上,然后启动SoftIce,load mirror.dll,用bpx命令将DrvEnablePDEV、DrvEnableSurface、DrvCopyBits、DrvBitBlt、DrvTextOut等几个函数加上断点,退出SoftIce。运行ddmlapp.exe程序,可是没有任何反应,为什么断点进不去呀,呜呜。在线等
|
|
7楼#
发布于:2004-05-23 20:32
我要做的是获取当前屏幕动态变化区域,然后交给另外一个模块进行AVI编码,然后向网上广播
|
|
8楼#
发布于:2004-05-23 19:11
呵呵,谢谢二楼的回答。你说的对,这个文件我已经看了好几遍了,只是想再向高手确认一下。您是否可以明确的告诉我,ddmlapp实现的部分代码就是我将要开发的应用端软件的框架?另外在driver中有没有一个单独的函数可以获取当前屏幕变化区域?Driver中hook了Gdi的几个基本函数,是不是要在每个函数被调用时都要通知应用软件告知其当前屏幕变化的区域?谢谢。 是的,你需要自己完成通知 顺便问一下,你使用mirror来开发什么产品? |
|
|
9楼#
发布于:2004-05-21 23:00
不清楚,你自己最好调试看看,DDK里的MIRROR功能很有限,用来开发,恐怕还差很远。。。。。
|
|
|
10楼#
发布于:2004-05-21 21:20
呵呵,谢谢二楼的回答。你说的对,这个文件我已经看了好几遍了,只是想再向高手确认一下。您是否可以明确的告诉我,ddmlapp实现的部分代码就是我将要开发的应用端软件的框架?另外在driver中有没有一个单独的函数可以获取当前屏幕变化区域?Driver中hook了Gdi的几个基本函数,是不是要在每个函数被调用时都要通知应用软件告知其当前屏幕变化的区域?谢谢。
|
|
11楼#
发布于:2004-05-21 09:47
APP里面的README不是已经说的很清楚了??
To install: 1. Copy mirror.dll to %winnt%\\system32, mirror.sys to %winnt%\\system32\\drivers 2. These are added during .inf file installation: Sets registry values (where \'#\' is a number): HKLM\\System\\CurrentControlSet\\Services\\mirror device#\\Device Description \"Microsoft Mirror Driver\" (SZ) device#\\Installed Display Drivers \"mirror\" (MULTI_SZ) device#\\MirrorDriver 0x1 (DWORD) device#\\xxx possibly other keys enum\\xxx keys for enumerating devices 3. When invoking the mirrored driver on a mirrored device: To change the settings for your mirrored device, you must know the \'\\\\.\\DISPLAY#\' name associated with your mirrored display. In the case of multiple instances, \'#\' will be a different number. This can be found by iterating through the available display devices using EnumDisplayDevices(). For reference/testing only, this information can be found under the following key: HKLM\\Hardware\\DeviceMap\\Video To attach the mirrored device to the desktop pdev list, you must add a registry value \'Attach.ToDesktop\' = 0x1. Subsequent ChangeDisplaySettings() will then dynamically load the mirrored display driver for use. HKLM\\SYSTEM\\CurrentControlSet\\Hardware Profiles\\Current\\System\\CurrentControlSet\\ Services\\mirror [where \'mirror\' is short name of mirrored surface] device#\\Attach.ToDesktop 0x1 (DWORD) To disable the attachment, set \'Attach.ToDesktop\' to 0x0. Otherwise your driver will invoked again at boot up time. There are also other Default.Settings values saved under this key, use ChangeDisplaySettings() with dwFlags=CDS_UPDATEREGISTRY to properly save them. To create a DC, device managed bitmap, etc. using the mirrored surface, use the ordinary GDI APIs. To create the DC specify, use the following: HDC hdc = CreateDC(\"DISPLAY\", // driver name deviceName, // example \'mirror\' device name NULL, NULL); See DDK sample for a working demonstration. Minimum requirements for barebones mirrored display driver: DrvEnableDriver [exported] DrvEnablePDEV DrvCompletePDEV DrvDisablePDEV DrvEnableSurface DrvDisableSurface DrvBitBlt DrvCopyBits DrvCreateDeviceBitmap DrvDeleteDeviceBitmap DrvTextOut Minimum requirements for barebones mirrored miniport driver: DriverEntry [exported] HwFindAdapter HwInitialize HwStartIO Since there is no physical display device associated with a mirrored surface, these routines can return positive results. |
|
|