Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

SHLoadLibraryFromKnownFolder function

Creates and loads an IShellLibrary object for a specified known folder ID.

Syntax


HRESULT SHLoadLibraryFromKnownFolder(
  _In_   REFKNOWNFOLDERID kfidLibrary,
  _In_   DWORD grfMode,
  _In_   REFIID riid,
  _Out_  void **ppv
);

Parameters

kfidLibrary [in]

Type: REFKNOWNFOLDERID

The KNOWNFOLDERID value that identifies the known folder to load into the IShellLibrary object.

grfMode [in]

Type: DWORD

One or more storage medium flags that specify access and sharing modes for the library object. Commonly specified flags are STGM_READ or STGM_READWRITE. For more information, see STGM.

riid [in]

Type: REFIID

The IID for IShellLibrary. (See Remarks for more information.)

ppv [out]

Type: void**

When this function returns successfully, receives the loaded IShellLibrary object. (See Remarks for more information.)

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This is an inline helper function that wraps the IShellLibrary::LoadLibraryFromKnownFolder method.

Usage

The IID_PPV_ARGS macro is generally used to generate the riid and ppv parameters for this function. For an example, see SHCreateLibrary.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Shobjidl.h

See also

IShellLibrary
IShellLibrary::LoadLibraryFromItem
IShellLibrary::LoadLibraryFromKnownFolder
SHCreateLibrary
SHLoadLibraryFromItem
SHLoadLibraryFromParsingName
Known Folders Sample

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.