阅读:1655回复:6
一个关于VxD与Win32应用程序之间通讯的问题
我知道VxD与应用程序之间可以异步通讯。但我想实现以下功能怎么实现阿?
Test(...) { ... returnValue = 给应用程序发信息然后返回值; if (returnValue) { .... }else{ .... } ... } |
|
最新喜欢:![]() |
沙发#
发布于:2001-12-06 21:33
为什么没人回答~???
没人知道吗?? |
|
板凳#
发布于:2001-12-07 23:44
in VXD, use Shell_postmessage( ) to pass message to ring3 APP, but this func isn\'t synchronization, so that, you can\'t use following instruction :
return_val = Shell_postMessage(....); // wrong If you want to get the return value from APP, in App, use DeviceIOcontrol to pass you value to VXD, otherwise, you may use shared-event between vxd and App, only under this condition, you can keep vxd and APP synchronized. |
|
地板#
发布于:2001-12-08 11:36
你可能需要使用VMM服务_SHELL_POSTMESSAGE给应用程序发消息.
|
|
地下室#
发布于:2001-12-08 23:59
sorry, 我没写清楚,我的意思是想进行同步通讯,不知道有没有办法?
|
|
5楼#
发布于:2001-12-12 16:33
first, define a BOOL in vxd :
BOOL Returned=FALSE; ... second, in vxd: ... Returned=FALSE; Shell_postMessage(hwnd,msgID,wparam,lparam); while (!Returned) ; .... third, in app: OnMsgID(wparam,lparam) { ..... BOOL ProcessOK = true; deviceiocontrol(hdevice, XXXXX,&ProcessOK, .....) } third, in Vxd : w32DeviceIoControl(...) { switch(IoCtrlCode) { .... case XXXXXX : Returned = TRUE; break; } } you can Waiting an event to be in signal after Vxd processed the DeviceIoControl routine and signal the notification event. haha, too complex. |
|
6楼#
发布于:2001-12-12 20:05
gxzbme 兄用Shell_postMessage(hwnd,msgID,wparam,lparam);
不过依靠 全局变量来加锁,不很安全, 而且同时只能支持一个操作。 最好把我们的方案综合一下, 就漂亮了 |
|
|