Microsoft DirectX 9.0


The QueryId method retrieves an identifier for the pin.


    LPWSTR *Id



Pointer to a variable that receives a string containing the pin identifier.

Return Value

Returns an HRESULT value. Possible values include those shown in the following table.

Value Description
S_OK Success.
E_OUTOFMEMORY Insufficient memory.
E_POINTER NULL pointer argument.
VFW_E_NOT_FOUND Pin was not found on the filter.


This method implements the IPin::QueryId method. To construct an identifier string, the pin calls the CSource::FindPinNumber method with itself as the parameter. The FindPinNumber method returns the pin number, indexed from zero. QueryId increments the return value by one and converts the result to a string. For example, the first pin becomes "1"; the second pin becomes "2"; and so forth.

If this method returns VFW_E_NOT_FOUND, it indicates that the filter's array of pins is invalid, presumably caused by a bug in the filter.

See Also