2

I'm writing a driver that needs synchronization with vertical blank interrupt to send some data down the USB pipe.

In user-mode there are Direct X functions available for this like IDXGIOutput::WaitForVBlank and few older ones. I am not able to use them from kernel. I found another interface in Windows 8 SDK: D3DKMTWaitForVerticalBlankEvent which even has a kernel header (the header is in /km/ folder of the SDK), but it requires gdi32.lib which a user-mode library and linking with it cripples the driver.

Is there any way I can wait or get a notification about vertical blank occurence (without polling)?

4

2 回答 2

1

您可以使用命名事件。

  • 在您的驱动程序中创建一个命名事件和一个内核线程以在执行实际工作之前等待该事件。
  • 在用户模式助手应用程序/服务中打开命名事件并创建一个线程来调用 IDXGIOutput::WaitForVBlank 然后立即设置命名事件。

当然,我想你很久以前就解决了这个问题并继续前进......

于 2013-03-12T21:36:02.683 回答
1

是否可以接受驱动程序的用户模式部分?您可以在用户模式下拥有一个等待 VBI 的辅助进程,并让该进程以某种方式触发您的 KM 驱动程序。

于 2012-06-25T14:06:14.990 回答