Shell32在windows8.1及其windows10中获取视频帧宽度
在windows7下我使用下面的代码获取视频的帧高度和宽度
Shell32.ShellClass sh = new Shell32.ShellClass();
Shell32.Folder dir = sh.NameSpace(Path.GetDirectoryName(path));
Shell32.FolderItem item = dir.ParseName(Path.GetFileName(path));
string videoWidth=dir.GetDetailsOf(item, 285);
string videoHeight=dir.GetDetailsOf(item, 283);
或者
Dictionary<string, string> dic = new Dictionary<string, string>();
int i = 0;
while (true)
{
//获取属性名称
string key = dir.GetDetailsOf(null, i);
if (string.IsNullOrEmpty(key))
{
//当无属性可取时,退出循环
break;
}
//获取属性值
string value = dir.GetDetailsOf(item, i);
dic.Add(key, value);
DeveloperLogger.Debug(i + "__" + key + "___" + value);
i++;
}
以上两种都在windows7下都可以获取到视频的帧宽度和帧高度,但在Windows8.1和Windows10中就无法获取了?
请问在Windows8.1和Windows10应该怎样获取?