/// <summary>
        /// Return all folders in a Library
        /// <remarks>This method requires a write access to the library to be able to reflect a folder move or delete change</remarks>
        /// </summary>
        /// <returns>A list of folders</returns>
        public IList <string> GetFolders()
        {
            IShellItemArray itemArray;

            Guid shellItemArrayGuid = new Guid(Microsoft.SDK.Samples.VistaBridge.Interop.IIDGuid.IShellItemArray);

            try
            {
                _shellLibrary.GetFolders(Windows7.DesktopIntegration.Interop.SafeNativeMethods.LIBRARYFOLDERFILTER.LFF_ALLITEMS, ref shellItemArrayGuid, out itemArray);
            }
            catch
            {
                return(new List <string>());
            }

            uint count;

            itemArray.GetCount(out count);

            List <string> result = new List <string>((int)count);

            for (uint i = 0; i < count; ++i)
            {
                string     filePath;
                IShellItem shellItem;
                itemArray.GetItemAt(i, out shellItem);

                try
                {
                    IShellItem resolvedShellItem;
                    Guid       shellItemGuid = new Guid(Microsoft.SDK.Samples.VistaBridge.Interop.IIDGuid.IShellItem);
                    _shellLibrary.ResolveFolder(shellItem, 1000, ref shellItemGuid, out resolvedShellItem);
                    resolvedShellItem.GetDisplayName(Microsoft.SDK.Samples.VistaBridge.Interop.SafeNativeMethods.SIGDN.SIGDN_FILESYSPATH, out filePath);
                    Marshal.ReleaseComObject(resolvedShellItem);
                }
                catch
                {
                    //If we can't resolve the folder, we will return the original shell item
                    shellItem.GetDisplayName(Microsoft.SDK.Samples.VistaBridge.Interop.SafeNativeMethods.SIGDN.SIGDN_FILESYSPATH, out filePath);
                }

                Marshal.ReleaseComObject(shellItem);
                result.Add(filePath);
            }
            Marshal.ReleaseComObject(itemArray);

            return(result);
        }