载入中
自定义HTML载入中... loading
IDirectInputDevice2::Poll [原创 2008-04-22 12:19:19]  删除... 
字体变小 字体变大

IDirectInputDevice2::Poll


The IDirectInputDevice2::Poll method retrieves data from polled objects on a DirectInput device. If the device does not require polling, then calling this method has no effect. If a device that requires polling is not polled periodically, no new data will be received from the device. Calling this method causes DirectInput to update the device state, generate input events (if buffered data is enabled), and set notification events (if notification is enabled).

IDirectInputDevice2::Poll从DirectInput设备上的轮询(轮流查询)对象接收数据.如果设备不需要轮询,那么对此方法的调用没有效果.如果需要轮询的设备进行非周期性地轮询,那么从设备中接收不到新的数据.对这个方法的调用将使DirectInput更新设备状态,产生输入事件(如果缓存数据激活),设置通知事件(如果通知激活).

HRESULT Poll()
Return Values

返回值
If the method succeeds, the return value is DI_OK.

如果调用成功,返回DI_OK.

If the method fails, the return value may be one of the following error values:

如果调用失败,将返回下列错误值中的某一个:

DIERR_INPUTLOST
DIERR_NOTACQUIRED 
DIERR_NOTINITIALIZED 


Remarks

注:
Before a device data can be polled, the data format must be set by using the IDirectInputDevice::SetDataFormat method, and the device must be acquired by using the IDirectInputDevice::Acquire method.

在一个设备数据轮询前,要用IDirectInputDevice::SetDataFormat方法设置数据格式,用IDirectInputDevice::Acquire方法获取设备.

QuickInfo
  Windows NT: Use version 5.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in dinput.h.
  Import Library: Use dinput.lib.

See Also
Polling and Events

 

分类: DirectX
票数:
什么是“我顶”?
点击数:    评论数:
本文章引用通告地址(TrackBack Ping URL)为:
本文章尚未被引用。
发表评论
大 名:
(不填写则显示为匿名者)
网 址:
(您的网址,可以不填)
标 题:
内 容:
请根据下图中的字符输入验证码:
(您的评论将有可能审核后才能发表)
和讯个人门户 v1.0 | 和讯部落 | 客服中心