The IDirectInputDevice::Unacquire method releases access to the device.
HRESULT Unacquire();
The return value is DI_OK is the device was unacquired, or DI_NOEFFECT if the device was not in an acquired state to begin with.
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.