Microsoft DirectX 9.0

IDirectInputDevice8::GetObjectInfo Method

Retrieves information about a device object, such as a button or axis.


HRESULT GetObjectInfo(      

    LPDIDEVICEOBJECTINSTANCE pdidoi,     DWORD dwObj,     DWORD dwHow );


Address of a DIDEVICEOBJECTINSTANCE structure to be filled with information about the object. The structure's dwSize member must be initialized before this method is called.
Value that identifies the object whose information is to be retrieved. The value set for this parameter depends on the value specified in the dwHow parameter.
Value that specifies how the dwObj parameter should be interpreted. The dwHow value can be one of the following:
The dwObj parameter is the offset into the current data format of the object whose information is being accessed.
The dwObj parameter is the object type/instance identifier. This identifier is returned in the dwType member of the DIDEVICEOBJECTINSTANCE structure returned from a previous call to the IDirectInputDevice8::EnumObjects method.
The dwObj parameter contains the HID Usage Page and Usage values of the object, combined by the DIMAKEUSAGEDWORD macro.

Return Value

If the method succeeds, the return value is DI_OK.

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

DIERR_INVALIDPARAMAn invalid parameter was passed to the returning function, or the object was not in a state that permitted the function to be called. This value is equal to the E_INVALIDARG standard Component Object Model (COM) return value.
DIERR_NOTINITIALIZEDThe object has not been initialized.
DIERR_OBJECTNOTFOUNDThe requested object does not exist.
E_POINTERAn invalid pointer, usually NULL, was passed as a parameter.


For compatibility with Microsoft?DirectX?3, it is also valid to pass a DIDEVICEOBJECTINSTANCE_DX3 structure with the dwSize member initialized to sizeof(DIDEVICEOBJECTINSTANCE_DX3).

© 2002 Microsoft Corporation. All rights reserved.