I don't know how your dataBuf is defined, but this line looks suspicious:
PerIoData->dataBuf.buf[dwTransfered]=NULL;

if your dataBuf is of size 10, and dwTransfered is also 10, then you are addressing dataBuf[10] which is non-existent, i. e. you are writing behind your memory. This might cause a problem.