The information in this article applies to:
SUMMARYAsync.exe is a sample that demonstrates how to notify a user-mode application that a certain event it has been waiting for has occurred. This type of operation is typically performed when the application needs to be notified of a hardware interrupt. MORE INFORMATIONThe following file is available for download from the Microsoft
Download Center. Click the file name below to download the file: Async.exeRelease Date: Sep-16-1999 For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. The Async.exe driver consists of two pieces, a kernel-mode driver and a user-mode application. You could use your own user-mode application with this driver, however the one supplied demonstrates the preferred method. In the kernel-mode driver, an interrupt is simulated by using an IoTimer routine to maintain a time-out count. When this count has been reached, the routine completes the IOCTL request from the user-mode application that asked to be notified of this event. In the meantime, the driver is free to process other requests. The user-mode application is a multi-threaded application. The first thread is responsible for sending down an IOCTL_HOLD_REQUEST. This IOCTL will, when handled by the kernel-mode driver, cause the IRP to be held in the driver until the IoTimer routine releases the IRP. The second thread sends down an IOCTL_DO_NOTHING, which does nothing except return every 1000 ms. When installing the driver, you should create a subkey named parameters under the master key for the driver. In this key, you should have three DWORD values DebugValue, DelayValue, and BreakOnEntry. If BreakOnEntry is set to value not equal to zero (0), it will execute a hardcoded breakpoint in DriverEntry. If DebugValue is greater than or equal to one, it will print out a verbose level of DbgPrint statements, otherwise it will print out statements only on errors, DriverEntry, and the unload routine. DelayValue will indicate how many seconds should go by before the IOCTL_HOLD_REQUEST IRP should be completed. Generally speaking, this value should be five or greater. The default value if not specified is five. Additional query words:
Keywords : kbcode kbfile kbsample kbDDK kbDSupport |
Last Reviewed: December 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |