//IShellItem nativeShellItem;

        internal static FileSystemKnownFolder Create(IKnownFolderNative kf)
        {
            Debug.Assert(kf != null);
            var _knownFolderNative = kf;
            IShellItem _nativeShellItem;

            // Set the native shell item
            // and set it on the base class (ShellObject)

            Guid guid = new Guid(InterfaceGuids.IShellItem);
            _knownFolderNative.GetShellItem(0, ref guid, out _nativeShellItem);

            var FS = new FileSystemKnownFolder(_nativeShellItem);
            FS.knownFolderNative = _knownFolderNative;

            return FS;
        }
        /// <summary>
        /// Given a native KnownFolder (IKnownFolderNative), create the right type of
        /// IKnownFolder object (FileSystemKnownFolder or NonFileSystemKnownFolder)
        /// </summary>
        /// <param name="knownFolderNative">Native Known Folder</param>
        /// <returns></returns>
        private static IKnownFolder GetKnownFolder(IKnownFolderNative knownFolderNative)
        {
            Debug.Assert(knownFolderNative != null, "Native IKnownFolder should not be null.");

            // Get the native IShellItem2 from the native IKnownFolder
            IShellItem shellItem;
            Guid       guid = new Guid(InterfaceGuids.IShellItem);
            HResult    hr   = knownFolderNative.GetShellItem(0, ref guid, out shellItem);

            if (hr != HResult.S_OK)
            {
                return(null);
            }

            bool isFileSystem = false;

            // If we have a valid IShellItem, try to get the FileSystem attribute.
            if (shellItem != null)
            {
                SFGAO sfgao =
                    shellItem.GetAttributes(SFGAO.FILESYSTEM);

                // Is this item a FileSystem item?
                isFileSystem = (sfgao & SFGAO.FILESYSTEM) != 0;
            }

            // If it's FileSystem, create a FileSystemKnownFolder, else NonFileSystemKnownFolder
            if (isFileSystem)
            {
                FileSystemKnownFolder kf = new FileSystemKnownFolder(knownFolderNative);
                return(kf);
            }

            NonFileSystemKnownFolder knownFsFolder = new NonFileSystemKnownFolder(knownFolderNative);

            return(knownFsFolder);
        }