设备驱动程序通知应用程序的几种方法毕业论文外文翻译.doc
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《设备驱动程序通知应用程序的几种方法毕业论文外文翻译.doc》由会员分享,可在线阅读,更多相关《设备驱动程序通知应用程序的几种方法毕业论文外文翻译.doc(8页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、数学专业英语论文 The device driver notifies the application of several methodsPapers Category:Computer Papers - Computer Application Papers Post Time:2013-2-6 9:48:00 In the current popular Windows operating system, device drivers is the lowest level of manipulation of hardware software interface. To share
2、the device driver design process experience, given the device driver notifies the application of the five kinds of ways, each method specifically described the principle and implementation process, hoping to give the designer of the device driver to provide some help. Operating system in order to en
3、sure peace and stability, and application portability, Windows operating system does not allow applications direct access to the systems hardware resources, but must resort to the appropriate device driver. Device drivers can directly manipulate the hardware, if applications and device drivers to ac
4、hieve a two-way communication between, also reached the underlying hardware device application control purposes. Communication between them, including two aspects Abstract: On the one hand is the application sent to the device driver data; hand is the device driver sends a message to the application
5、. The former to achieve more easily through CreateFile () function to obtain a handle to the device driver, you can use the Win32 functions such as DeviceIoControl (), ReadFile () or WriteFile (), etc. to achieve application and device driver communication. Implementation of the latter than the form
6、er complex and the article describes the situation in this respect less. This does not mean that it is not important, on the contrary, it is in some applications play an important function. Device drivers complete the data collection work, the need to immediately notify the application so that the a
7、pplication can be promptly removed and the data is processed. In cases like these, and so forth. In view of the device driver notifies the application of the importance, I combined some experience, it was summarized summarized five methods Abstract: asynchronous procedure call (APC), event mode (VxD
8、), messaging, asynchronous I / O modes and event mode (WDM). Below were the principles of this in several ways, and given of some of the source code. An asynchronous procedure call (APC) Win32 applications using CreateFile () function to dynamically load the device driver, and then define a callback
9、 function backFunc (), and the address of the callback function% 26amp; backFunc () as a parameter, through DeviceIoControl () sent to the device driver. Device drivers to get the address of a callback function, it will save it in a global variable (eg callback), the simultaneous calls Get_Cur_Threa
10、d_Handle () function to get its application thread handle, and the handle is stored in a global variable (eg appthread ) in. When conditions are ripe, the device driver calls _VWIN32_QueueUserApc () function to send messages to the Win32 application. This function takes three arguments Abstract: The
11、 first parameter is the address of the callback function (already registered); second parameter is passed to the callback message; third parameter to the callers thread handle (already registered). Win32 application receives a message, the automatic callback function (actually called by the device d
12、river). Callback function of the input parameters are populated by the device driver, the callback function here is mainly to handle the message. 2 Event mode (VxD) First, Win32 applications to create an event handler, called Ring3 handle. Because the virtual device driver using events Ring0 handle,
13、 so you need to create Ring0 handle. Using LoadLibrary () function to load the dynamic link library undisclosed Kernel32.dll, get dynamic link library handle. Then, call GetProcAddress (), find the function OpenVxDHandle () in the dynamic link library location. Then, OpenVxDHandle () function will R
14、ing3 event handlers into Ring0 event handler. Win32 applications using CreateFile () function to load the device driver. If the load is successful, call the DeviceIoControl () function will be passed to the event handler Ring0 VxD; while waiting for the signal to create a worker thread becomes signa
15、led state itself can shop and other things. When conditions are ripe, VxD set Ring0 event to signaled state (called _VWIN32_SetWin32Event () function), which corresponds to Ring3 immediately trigger event to signaled state. Once Ring3 event handler for the signaled state, Win32 applications worker t
16、hread on this news be handled accordingly. 3 message mode Win32 application calls CreateFile () function to dynamically load the virtual device driver. Loaded successfully, by calling DeviceIoControl () function handles the form sent to VxD, VxD use this handle to form a message. When the conditions
17、 are met, VxD calls SHELL_PostMessage () function to send messages to Win32 applications. To make use of this function successfully, you must use # define to customize a message, and even so it is defined in the application; also used in the message loop ON_MESSAGE () to define the message processin
18、g function corresponding to the message so that the message is generated , can call the message handler. SHELL_PostMessage () functions first argument for Win32 window handle, the second parameter is the message ID number, and the third, four parameters are sent to the message processing function pa
19、rameters, fifth, six parameters for the callback function and pass to its parameters. Win32 application receives a message, the message is processed. 4 asynchronous I / O mode Win32 application first calls the CreateFile () function to load the device driver. Before calling this function, the penult
20、imate two parameter is set to FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, saying that he can file overlapped I / O operations. When the device driver file is successfully created, create an initial state is no signal, you need to manually reset the event, and will pass this event type is OVERLAPPE
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 设备驱动程序通知应用程序的几种方法 毕业论文外文翻译 设备 驱动程序 通知 应用程序 方法 毕业论文 外文 翻译
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内