阅读:968回复:1
The API programmer complains that my DLL ocupy too much cpu time while waiting for data received fr
Dear All,
I\'m writing a DLL source code and I met a problem. I\'d like to ask your help. I\'m writing DLL instead of a driver for the usb low speed hid device. The API programmer complains that my DLL ocupy too much cpu time while waiting for data received from usb device or sent data out. I\'m using the VC++ for dll writing. Do you have any idea of how to realease or give control back to the SYSTEM while waiting for data, and take back the control when necessary? Many thanks to your help. Best regrards, Jim |
|
沙发#
发布于:2002-01-14 13:21
MESSAGE LOOP and Sleep, SleepEx, WaitForXXXObject are the way to release the CPU. It\'s depend on your implementation.
|
|
|