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).
HRESULT Poll()
If the method succeeds, the return value is DI_OK.
If the method fails, the return value may be one of the following error values:
DIERR_INPUTLOST |
DIERR_NOTACQUIRED |
DIERR_NOTINITIALIZED |
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.
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.