阅读:790回复:0
很奇怪啊,关于发送事件消息50分
我在应用层通过Deviceioctl发送消息给驱动,该代码如下
ULONG nwrite; hEvent=CreateEvent(NULL,FALSE,FALSE,NULL); if (!DeviceIoControl(hDevice, SY_IOCTL_EVENT1 , &hEvent, sizeof(hEvent), NULL, 0, &nwrite, NULL) ) { printf(\"Error %d in SY_IOCTL_EVENT1 call\\n\",GetLastError()); CloseHandle(hEvent); CloseHandle(hDevice); exit(1); } else { printf(\"succeed send event news\\n\"); } 程序运行时,Error xxx in SY_IOCTL_EVENT1 call,说明不能成功调用SY_IOCTL_EVENT1的处理函数,但在驱动里,该函数确被成功调用,状态显示成功。 这是什么原因? |
|
|