Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Retrieves the version number of the pin.
virtual long GetPinVersion( );
Return Values
By default, returns the value of m_PinVersion. If overridden, this member function should return the pin version number.
Remarks
Returns the current version of the filter that matches the version used to initialize the pin. The enumerator calling this member function performs the matching.
A filter provides an enumerator to gain access to the input and output pins it keeps. Each time a pin enumerator's method is called, the pin enumerator calls the CBaseFilter::GetPinVersionmember function to ensure that the base filter's version matches the version with which the pin enumerator was initialized.
A filter class can override CBaseFilter::GetPinVersionif there is a need to increment the version by changing the available pins dynamically. Or, it can more easily call IncrementPinVersion.
GetPinVersiondoes not lock the filter because the enumerators are designed to be separate objects. The derived class's GetPinVersionwill likely have to do some specialized locking with the part of the object responsible for creating and deleting pins.