IDirect3DDevice::GetPickRecords

HRESULT GetPickRecords(LPDWORD lpCount,

LPD3DPICKRECORD lpD3DPickRec);

Retrieves the pick records for a device.

·Returns D3D_OK if successful or an error otherwise.

lpCount

Address of a variable that contains the number of D3DPICKRECORD structures to retrieve.

lpD3DPickRec

Address that will contain an array of D3DPICKRECORD structures when the method returns.

An application typically calls this method twice. In the first call, the second parameter is set to NULL, and the first parameter retrieves a count of all relevant D3DPICKRECORD structures. The application then allocates sufficient memory for those structures and calls the method again, specifying the newly allocated memory for the second parameter.