irp

Windows NDIS Driver: Concurrent Read/Write on a single device (IRP_MJ_READ/WRITE)

做~自己de王妃 提交于 2019-12-01 12:59:34
问题 Starting with the ndisprot sample from Microsoft I try to write a NDIS protocol driver. From User space I try to read and write to the device simultaneous (out of two threads). Since I don't receive any packets, the ReadFile system call blocks. I'm not able to complete a WriteFile system call in this state. CHAR NdisProtDevice[] = "\\\\.\\\\NDISprot"; CHAR * pNdisProtDevice = &NdisProtDevice[0]; this.iHandle = CreateFile(pNdisProtDevice, GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_EXISTING, FILE