SHCreateLibrary function

Creates an IShellLibrary object.

Syntax


HRESULT SHCreateLibrary(
  _In_   REFIID riid,
  _Out_  void **ppv
);

Parameters

riid [in]

Type: REFIID

The IID for IShellLibrary. (See usage remarks.)

ppv [out]

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

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Shobjidl.h

See also

IShellLibrary

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.