SHLoadLibraryFromParsingName function
Creates and loads an IShellLibrary object for a specified path.
Syntax
HRESULT SHLoadLibraryFromParsingName(
_In_ PCWSTR pszParsingName,
_In_ DWORD grfMode,
_In_ REFIID riid,
_Out_ void **ppv
);
Parameters
- pszParsingName [in]
-
Type: PCWSTR
The path for which to load 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
A reference to the IID of the interface to retrieve through ppv, typically IID_IShellLibrary.
- ppv [out]
-
Type: void**
When this method returns successfully, contains the interface pointer requested in riid. This is typically IShellLibrary.
Return value
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
We recommend that you use the IID_PPV_ARGS macro, defined in Objbase.h, to package the riid and ppv parameters. This macro provides the correct IID based on the interface pointed to by the value in ppv, which eliminates the possibility of a coding error in riid that could lead to unexpected results.
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 |
|
See also
- IShellLibrary
- IShellLibrary::LoadLibraryFromItem
- IShellLibrary::LoadLibraryFromKnownFolder
- SHCreateLibrary
- SHLoadLibraryFromItem
- SHLoadLibraryFromKnownFolder