1
//Copyright (c) Microsoft Corporation. All rights reserved.
4
using System.Collections.Generic;
5
using Microsoft.WindowsAPICodePack.Shell.PropertySystem;
6
using MS.WindowsAPICodePack.Internal;
8
namespace Microsoft.WindowsAPICodePack.Shell
10
internal class ShellItemArray : IShellItemArray
12
List<IShellItem> shellItemsList = new List<IShellItem>();
14
internal ShellItemArray(IShellItem[] shellItems)
16
shellItemsList.AddRange(shellItems);
19
#region IShellItemArray Members
21
public HResult BindToHandler(IntPtr pbc, ref Guid rbhid, ref Guid riid, out IntPtr ppvOut)
23
throw new NotSupportedException();
26
public HResult GetPropertyStore(int Flags, ref Guid riid, out IntPtr ppv)
28
throw new NotSupportedException();
31
public HResult GetPropertyDescriptionList(ref PropertyKey keyType, ref Guid riid, out IntPtr ppv)
33
throw new NotSupportedException();
36
public HResult GetAttributes(ShellNativeMethods.ShellItemAttributeOptions dwAttribFlags, ShellNativeMethods.ShellFileGetAttributesOptions sfgaoMask, out ShellNativeMethods.ShellFileGetAttributesOptions psfgaoAttribs)
38
throw new NotSupportedException();
41
public HResult GetCount(out uint pdwNumItems)
43
pdwNumItems = (uint)shellItemsList.Count;
47
public HResult GetItemAt(uint dwIndex, out IShellItem ppsi)
49
int index = (int)dwIndex;
51
if (index < shellItemsList.Count)
53
ppsi = shellItemsList[index];
63
public HResult EnumItems(out IntPtr ppenumShellItems)
65
throw new NotSupportedException();