BASS.NET API for the Un4seen BASS Audio LibraryBassTagsBASS_TAG_GetFromFile Method (String)BASS.NET API for the Un4seen BASS Audio Library
Retrieves the requested tags/headers from a file, if they are available.

Namespace: Un4seen.Bass.AddOn.Tags
Assembly: Bass.Net (in Bass.Net.dll) Version:

public static TAG_INFO BASS_TAG_GetFromFile(
	string file


Type: SystemString
The fully qualified name of the file stream to get the TAG information from.

Return Value

Returns a new TAG_INFO instance if successful. If TAGs could be retrieved successfully is returned.

NotSupportedExceptionInvalid/Unsupported tag version detected.
FormatExceptionInvalid syncsafe integer found in tag data.

Note: This method uses the BASS plug-in system and such supports all formats which are supported by BASS or any of its add-ons. So make sure to load all needed add-ons via BASS_PluginLoad(String).

This method first evaluates the file name extension. If using with a ".wma" or ".wmv" file and you are using the WMA DRM version, the WMA tags are received immediately. For all other file types an internal stream handle is created by using the plug-in system and calling BASS_StreamCreateFile(String, Int64, Int64, BASSFlag). If successful, the TAG_INFO is returned via BASS_TAG_GetFromFile(String) (see overload list). All members of the TAG_INFO structure will be updated. However, some files and tag structures might not support all members. This overload


Getting TAGs from a file directly:
Dim tagInfo As TAG_INFO = BassTags.BASS_TAG_GetFromFile(fileName)
If Not (tagInfo Is Nothing) Then
  ' display the tags...
End If
TAG_INFO tagInfo = BassTags.BASS_TAG_GetFromFile(fileName);
if ( tagInfo != null )
  // display the tags...
See Also