packages/Windows API Code Pack 1.1/source/WindowsAPICodePack/Shell/KnownFolders/KnownFolderHelper.cs
/// <summary>
/// Returns a known folder given a globally unique identifier.
/// </summary>
/// <param name="knownFolderId">A GUID for the requested known folder.</param>
/// <returns>A known folder representing the specified name. Returns null if Known Folder is not found or could not be created.</returns>
Returns a known folder given a globally unique identifier.
Returns a known folder given a globally unique identifier .
internal static IKnownFolder FromKnownFolderIdInternal(Guid knownFolderId)
        {
            IKnownFolderNative knownFolderNative;
            IKnownFolderManager knownFolderManager = (IKnownFolderManager)new KnownFolderManagerClass();
            HResult hr = knownFolderManager.GetFolder(knownFolderId, out knownFolderNative);
            return (hr == HResult.Ok) ? GetKnownFolder(knownFolderNative) : null;
        }
internal static IKnownFolder FromKnownFolderIdInternal ( Guid knownFolderId ) { IKnownFolderNative knownFolderNative ; IKnownFolderManager knownFolderManager = ( IKnownFolderManager ) new KnownFolderManagerClass ( ) ; HResult hr = knownFolderManager . GetFolder ( knownFolderId , out knownFolderNative ) ; return ( hr == HResult . Ok ) ? GetKnownFolder ( knownFolderNative ) : null ; }
Returns a known folder given a globally unique identifier.
Returns a known folder given a globally unique identifier .
A known folder representing the specified name. Returns null if Known Folder is not found or could not be created.
A known folder representing the specified name . Returns null if Known Folder is not found or could not be created .
knownFolderId
Guid
A GUID for the requested known folder.
A GUID for the requested known folder .