fengyu_1907
驱动牛犊
驱动牛犊
  • 注册日期2003-04-16
  • 最后登录2008-06-05
  • 粉丝0
  • 关注0
  • 积分137分
  • 威望15点
  • 贡献值0点
  • 好评度13点
  • 原创分0分
  • 专家分0分
阅读:1337回复:6

上层程序怎么与核心程序同步?

楼主#
更多 发布于:2004-02-26 16:10
k.vxd 向 u.exe 发送数据data后等待,由 u.exe 处理后通知 k.vxd 可以继续执行。k.vxd 中的 Event 如何与 u.exe中的 Event 沟通?

最新喜欢:

bakerjbakerj
arthurtu
驱动巨牛
驱动巨牛
  • 注册日期2001-11-08
  • 最后登录2020-12-19
  • 粉丝0
  • 关注0
  • 积分26分
  • 威望161点
  • 贡献值0点
  • 好评度35点
  • 原创分0分
  • 专家分0分
  • 社区居民
沙发#
发布于:2004-02-26 20:31
VWIN32_WaitSingleObject
DWORD __cdecl VWIN32_WaitSingleObject(
   HANDLE hEvent,
   DWORD TimeOut,
   BOOL bAlertable
);

This function only returns when the specified object is in the signaled state or when the time-out interval elapses.

Parameters
 hEvent
VxD handle which can be waited on. A VxD handle is a ring 0 event handle created by the function OpenVxDHandle().

 TimeOut
The time-out interval, in milliseconds. The function returns if the interval elapses, even if the object's state is nonsignaled. If zero, the function tests the object's state and returns immediately. If -1, the function's time-out interval never elapses.

 bAlertable
Flag that indicates if this is an alertable wait. Specifies whether the function returns when the system queues an I/O completion routine for execution by the calling thread. If TRUE, the function returns and the completion routine is executed. If FALSE, the function does not return, and the completion routine is not executed.
A completion routine is queued, but is not executed. The thread must run at ring 3 for this to happen. A completion routine is queued for execution when the ReadFileEx() or WriteFileEx() function in which it was specified has been completed. The wait function returns and the completion routine is executed only if this flag is TRUE, and the calling thread is the thread that initiated the read or write operation.

Returns
For information about the return value, see the Win32 ring 3 function WaitForSingleObject() in the Microsoft Win32 Software Development Kit (SDK).

Comments
This service can only be called when the current VM is the system VM.
fengyu_1907
驱动牛犊
驱动牛犊
  • 注册日期2003-04-16
  • 最后登录2008-06-05
  • 粉丝0
  • 关注0
  • 积分137分
  • 威望15点
  • 贡献值0点
  • 好评度13点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2004-02-27 10:11
在Exe端能用SetEvent(hVxD)等Event服务来操作VxD中的事件吗?大哥给出几行VxD和Exe代码吧,不胜感激。
fengyu_1907
驱动牛犊
驱动牛犊
  • 注册日期2003-04-16
  • 最后登录2008-06-05
  • 粉丝0
  • 关注0
  • 积分137分
  • 威望15点
  • 贡献值0点
  • 好评度13点
  • 原创分0分
  • 专家分0分
地板#
发布于:2004-02-27 10:26
我只在 VWIN32.H 和 MSDN 及 98DDK 中找到_VWIN32_WaitSingleObject()的申明及相关文档。VWIN32_WaitSingleObject()是不是笔误??
fengyu_1907
驱动牛犊
驱动牛犊
  • 注册日期2003-04-16
  • 最后登录2008-06-05
  • 粉丝0
  • 关注0
  • 积分137分
  • 威望15点
  • 贡献值0点
  • 好评度13点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2004-02-27 11:24
_VWIN32_PulseWin32Event

_VWIN32_ResetWin32Event

_VWIN32_SetWin32Event

_VWIN32_WaitMultipleObjects

_VWIN32_WaitSingleObject

以上服务仅仅是在 ring0 对 ring3 的 Event 进行操作。小弟说的情况正好相反,ring0传出Event,由ring3决定Event的状态。怪小弟没说清楚,特此重申
maguofeng
驱动牛犊
驱动牛犊
  • 注册日期2002-07-29
  • 最后登录2015-08-13
  • 粉丝0
  • 关注0
  • 积分90分
  • 威望40点
  • 贡献值0点
  • 好评度8点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2004-02-27 20:08
应该用命名事件吧!
arthurtu
驱动巨牛
驱动巨牛
  • 注册日期2001-11-08
  • 最后登录2020-12-19
  • 粉丝0
  • 关注0
  • 积分26分
  • 威望161点
  • 贡献值0点
  • 好评度35点
  • 原创分0分
  • 专家分0分
  • 社区居民
6楼#
发布于:2004-02-27 20:21
ring3创建event,用OpenVxDHandle打开,传给ring0
这个event谁都可以决定它的状态
游客

返回顶部