?/TD>
Microsoft DirectX 9.0

IDirectInputDevice8::Poll Method


Retrieves data from polled objects on a Microsoft?DirectInput?device. If the device does not require polling, calling this method has no effect. If a device that requires polling is not polled periodically, no new data is 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).

Syntax

HRESULT Poll(VOID);

Return Value

If the method succeeds, the return value is DI_OK, or DI_NOEFFECT if the device does not require polling.

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

DIERR_INPUTLOSTAccess to the input device has been lost. It must be reacquired.
DIERR_NOTACQUIREDThe operation cannot be performed unless the device is acquired.
DIERR_NOTINITIALIZEDThe object has not been initialized.


Remarks

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

See Also

Polling and Event Notification


© 2002 Microsoft Corporation. All rights reserved.