IDirect3DDevice::GetPickRecords

The IDirect3DDevice::GetPickRecords method retrieves the pick records for a device.

HRESULT GetPickRecords(
  LPDWORD lpCount,              
  LPD3DPICKRECORD lpD3DPickRec  
);
 

Parameters

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.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value is an error.

Remarks

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.

This method returns an unsorted list of pick records. Your application is responsible for sorting the records, if needed.

QuickInfo

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in d3d.h.
  Import Library: Use ddraw.lib.