阅读:1868回复:3
困扰了整整一天的问题,请各位大大帮帮忙!(等了3天了,有人会么?)
各位大大,小弟新人,今天因为这个问题困扰了一个了,请各位大大帮帮忙!
驱动程序中明明已经调用了 IoCompleteRequest(Irp, IO_NO_INCREMENT); 为什么在应用程序中还是等不到信号?? ----------------------------------应用程序中-------------------------------------- OVERLAPPED DeviceIoOverlapped; ......... DeviceIoOverlapped.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); ......... DriverHandle = CreateFile("\\\\.\\wall", GENERIC_READ|GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); ........ if (!DeviceIoControl(DriverHandle, (DWORD)IOCTL_OSR_SETSHAREMEM, 0, 0, &ShareBuffer, sizeof(ShareBuffer), &index, &DeviceIoOverlapped) ) { if(WaitForSingleObject(DeviceIoOverlapped.hEvent,10000)==WAIT_TIMEOUT){ printf("time out\n"); //为什么总返回time out?? }else{ printf("success....!!\n"); } .............. ----------------------------------应用程序中-------------------------------------- |
|
沙发#
发布于:2010-04-05 09:49
才10秒嘛,要死等
|
|
|
板凳#
发布于:2010-04-05 10:40
|
|
地板#
发布于:2010-04-06 10:01
没有人能解答么?
|
|