Hi, Tim!
Thank you you so much! You helped me a lot! Now I will test a driver.
And one more thing: After installing my driver on "fresh" Windows it's
selected as default by system. Is there a way to prevent this?
2016-03-07 21:53 GMT+02:00 Tim Roberts <timr@xxxxxxxxx>:
Олег Герасимчук wrote:
Thanks Tim, I thought about it. I am new in driver development.
And what synchronization technique I must use? CopyFrom and CopyTo may
call in any IRQL.
In a virtual driver, that's clearly not the case. There is no hardware,
so there aren't any interrupts. Thus, you can never be called higher
than DISPATCH_LEVEL. You should be able to use a KSPIN_LOCK.
Your current code has a couple of extra copies that can be eliminated.
You always copy any leftover data back to the beginning of the buffer.
It would take a little more code, but you can eliminate that extra copy
by making this a circular buffer, where the data wraps around the end.
Although you should probably make the code work before you worry about
optimizing it.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
******************
WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/