SHCreateLibrary function (shobjidl_core.h)
Creates an IShellLibrary object.
Syntax
HRESULT SHCreateLibrary(
[in] REFIID riid,
[out] void **ppv
);
Parameters
[in] riid
Type: REFIID
The IID for IShellLibrary. (See usage remarks.)
[out] ppv
Type: void**
Receives a new 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 example:#include "shobjidl.h"
#include "objbase.h" // Defines the IID_PPV_ARGS macro.
...
IShellLibrary *pIShellLib;
SHCreateLibrary(IID_PPV_ARGS(&pIShellLib));
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 7 [desktop apps only] |
Minimum supported server | Windows Server 2008 R2 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |