Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

SHGetSetFolderCustomSettings function

[SHGetSetFolderCustomSettings is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Sets or retrieves custom folder settings. This function reads from and writes to Desktop.ini.

Syntax


HRESULT SHGetSetFolderCustomSettings(
  _Inout_  LPSHFOLDERCUSTOMSETTINGS pfcs,
  _In_     PCTSTR pszPath,
  DWORD dwReadWrite
);

Parameters

pfcs [in, out]

Type: LPSHFOLDERCUSTOMSETTINGS

A pointer to a SHFOLDERCUSTOMSETTINGS structure that provides or receives the custom folder settings.

pszPath [in]

Type: PCTSTR

A pointer to a null-terminated Unicode string that contains the path to the folder. The length of pszPath must be MAX_PATH or less, including the terminating null character.

dwReadWrite

Type: DWORD

A flag that controls the action of the function. It may be one of the following values.

FCS_READ (0x00000001)

Retrieve the custom folder settings in pfcs.

FCS_FORCEWRITE (0x00000002)

Use pfcs to set the custom folder's settings regardless of whether the values are already present.

FCS_WRITE (FCS_READ | FCS_FORCEWRITE)

Use pfcs to set the custom folder's settings if the values are not already present.

Return value

Type: HRESULT

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

Remarks

Only Unicode strings are supported.

Windows Server 2003 and Windows XP:  SHGetSetFolderCustomSettings supports both ANSI and Unicode strings.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows XP with SP2

End of server support

Windows Server 2003

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 6.0 or later)

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.