Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SHLoadLibraryFromItem function

Creates and loads an IShellLibrary object from a specified library definition file.

Syntax


HRESULT SHLoadLibraryFromItem(
  _In_  IShellItem *psiLibrary,
  _In_  DWORD      grfMode,
  _In_  REFIID     riid,
  _Out_ void       **ppv
);

Parameters

psiLibrary [in]

Type: IShellItem*

An IShellItem object for the library definition file to load.

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 usage remarks.)

ppv [out]

Type: void**

Receives the loaded IShellLibrary object. (See usage remarks.)

Return value

Type: HRESULT

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

Remarks

Usage

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

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

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
SHLoadLibraryFromKnownFolder
SHLoadLibraryFromParsingName
SHGetItemFromObject
SHCreateItemWithParent
IShellItem

 

 

Community Additions

ADD
Show:
© 2015 Microsoft