Partager via


GetMediaParameterName

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method retrieves the name of the specified parameter for an indexed Advanced Stream Redirector (ASX) entry.

Compatibility: Windows Media Player

Syntax

sRetVal = MediaPlayer.GetMediaParameterName( 
    lEntryNum, 
    lParamNum 
)

Parameters

  • lEntryNum
    [in] Long value specifying the index number of an ENTRY element in the ASX file.
  • lParamNum
    [in] Long value specifying the index number of a PARAM element within the specified ENTRY element.

Return Value

Returns a String value representing the NAME attribute of the specified PARAM element.

This method returns a null value if lEntryNum is outside the range of the EntryCount property, or if no PARAM element numbered lParamNum exists within the specified ENTRY element.

Remarks

The PARAM element allows you to place additional information into an ASX file, which the Windows Media Player control can then access through scripting. For example, you could insert the names of the producers of each media file inside the ASX file and display them in HTML somewhere near the Windows Media Player window.

Use this method to determine the names of the PARAM elements within an ASX ENTRY element. You can then call the GetMediaParameter method to determine the value associated with each name.

The first ENTRY element in an ASX file has an lEntryNum index number of 1. Index number 0 is reserved for child elements of the ASX tag, which applies to information valid for the entire show.

An example ASX file might look like the following.

<ASX VERSION="3.0">
  <TITLE>The Title of the Show<TITLE>
  <ENTRY>
    <REF HREF="YourMediaFilename.asf" />
    <TITLE>The Title of the Track</TITLE>
    <PARAM NAME="Producer" VALUE="Jane D.">
</ENTRY>
</ASX>

To retrieve the name of the first PARAM element, call the method as shown below.

MediaPlayer.GetMediaParameterName( 1, 1 );

This method call would return the string Producer.

Requirements

Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Windows Media Player Methods
GetMediaParameter
EntryCount

Concepts

Compatibility Modes