110,568
社区成员
发帖
与我相关
我的任务
分享
public string GetMediaTimeLen(string path){
try{
Shell32.Shell shell = new Shell32.ShellClass();
//Path
Shell32.Folder folder = shell.NameSpace(path.Substring(0, path.LastIndexOf("\\")));
//Name
Shell32.FolderItem folderitem = folder.ParseName(path.Substring(path.LastIndexOf("\\") + 1));
if (Environment.OSVersion.Version.Major >= 6){
return folder.GetDetailsOf(folderitem, 27);
}
else{
return folder.GetDetailsOf(folderitem, 21);
}
}
catch{
return null;
}
}
有没有别的方法啊??????