jimcj
驱动牛犊
驱动牛犊
  • 注册日期2001-10-23
  • 最后登录2005-01-13
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:969回复:1

The API programmer complains that my DLL ocupy too much cpu time while waiting for data received fr

楼主#
更多 发布于:2002-01-07 18:25
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
lu0
lu0
论坛版主
论坛版主
  • 注册日期2001-06-10
  • 最后登录2016-04-05
  • 粉丝2
  • 关注0
  • 积分-6311分
  • 威望21111点
  • 贡献值0点
  • 好评度7点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-01-14 13:21
MESSAGE LOOP and Sleep, SleepEx, WaitForXXXObject are the way to release the CPU. It\'s depend on your implementation.
Regards, Lu Lin Webmaster of Inside Programming http://www.lu0s1.com
游客

返回顶部