我想将ReleaseDateYear保存到wma文件。
WMPLib.WindowsMediaPlayerClass wmp = new WMPLib.WindowsMediaPlayerClass();
WMPLib.IWMPMedia media = wmp.newMedia(targetSongpath);
global::music.mediainfo info = new global::music.mediainfo();
string Year = media.getItemInfo("Year");//value is empty
string ReleaseDateYearMonth = media.getItemInfo("ReleaseDateYearMonth");//1989/01/02 0:01:00
string AcquisitionTimeYearMonth = media.getItemInfo("AcquisitionTimeYearMonth");//value is empty
string ReleaseDateYear= media.getItemInfo("ReleaseDateYear");//32510
DateTime date = DateTime.FromOADate(Double.Parse(ReleaseDateYear));//1989/01/02
string AcquisitionTimeYear = media.getItemInfo("AcquisitionTimeYear");//value is empty
try {
media.setItemInfo("ReleaseDateYearMonth", "1989/04/16");
media.setItemInfo("ReleaseDateYear", "1989/04/16");
}
catch (Exception exception) {
string error = exception.Message;
}
代码结束正常。 但是不能设置。 如何将日期时间设置为wma文件?干杯