次の方法で共有


IWMPStringCollection2::getAttributeCountByType method

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The getAttributeCountByType method returns the number of attributes associated with the specified string collection index, attribute name, and language.

Syntax

public System.Int32 getAttributeCountByType(
  System.Int32 lCollectionIndex,
  System.String bstrType,
  System.String bstrLanguage
);

Public Function getAttributeCountByType( _
  ByVal lCollectionIndex As System.Int32, _
  ByVal bstrType As System.String, _
  ByVal bstrLanguage As System.String _
) As System.Int32
Implements IWMPStringCollection2.getAttributeCountByType

Parameters

lCollectionIndex [in]

The System.Int32 specifying the zero-based index of the string collection item from which to get the attribute.

bstrType [in]

The System.String that is the name of the attribute.

bstrLanguage [in]

The System.String that is the name of the language. If the value is set to null or to a zero-length string (""), the current locale string is used. Otherwise, the value must be a valid RFC 1766 language string such as "en-us".

Return value

The System.Int32 that is the count.

Remarks

This method is used to discover the number of attributes corresponding to a particular attribute name for a given StringCollection item. Index numbers can then be passed to the fourth parameter of the getItemInfoByType method.

To use this method, read access to the library is required. For more information, see Library Access.

Requirements

Requirement Value
Version
Windows Media Player 11.
Namespace
WMPLib
Assembly
Interop.WMPLib.dll (Interop.WMPLib.dll.dll)

See also

IWMPStringCollection2 Interface (VB and C#)

IWMPStringCollection2.getItemInfoByType (VB and C#)