IPin::QueryDirection method

The QueryDirection method gets the direction of the pin (input or output).

Syntax


HRESULT QueryDirection(
  [out] PIN_DIRECTION *pPinDir
);

Parameters

pPinDir [out]

Receives a member of the PIN_DIRECTION enumerated type.

Return value

Returns an HRESULT value. Possible values include the following.

Return codeDescription
S_OK

Success.

E_POINTER

NULL pointer argument.

 

Examples

The following example tests whether a pin matches the specified pin direction.


// Query whether a pin has a specified direction (input / output)
HRESULT IsPinDirection(IPin *pPin, PIN_DIRECTION dir, BOOL *pResult)
{
    PIN_DIRECTION pinDir;
    HRESULT hr = pPin->QueryDirection(&pinDir);
    if (SUCCEEDED(hr))
    {
        *pResult = (pinDir == dir);
    }
    return hr;
}


Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

Error and Success Codes
IPin Interface

 

 

Show: