Creates a new instance of the default Shell folder view object.
Syntax
HRESULT SHCreateShellFolderView(
const SFV_CREATE *pcsfv,
IShellView **ppsv
);
Parameters
- pcsfv
-
[in] Pointer to a SFV_CREATE structure that describes the particulars used in creating this instance of the Shell folder view object.
- ppsv
-
[out] When this function returns successfully, contains an interface pointer to the new IShellView object. On failure, this value is NULL.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
SHCreateShellFolderView is recommended over SHCreateShellFolderViewEx because of the greater flexibility of its elements to participate in various scenarios, provide new functionality to the view, and interact with other objects.
When dealing with several instances of IShellView, you might want to verify which is the default Shell folder view object. To do so, call QueryInterface on the object using the IID_CDefView IID. This call succeeds only when made on the default Shell folder view object.
Function Information
| Minimum DLL Version | shell32.dll version 5.0 or later |
|---|
| Custom Implementation | No |
|---|
| Header | shlobj.h |
|---|
| Import library | shell32.lib |
|---|
| Minimum operating systems |
Windows 2000 |
|---|
See Also