ShellUtilitiesSetViewStatePropertyBagValue Method (IntPtr, String, String, Object, SHGVSPB, Boolean) |
Retrieves a property bag in which the view state information for a folder can be stored and subsequently retrieved and write a value by its name to it.
The user's settings are kept for the next time the user visits the folder.
Note this method requires a STA thread to work.
Namespace:
ShellBoost.Core.Utilities
Assembly:
ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax public static int SetViewStatePropertyBagValue(
IntPtr pidl,
string bagName,
string valueName,
Object value,
SHGVSPB flags = SHGVSPB.SHGVSPB_NONE,
bool throwOnError = true
)
Parameters
- pidl
- Type: SystemIntPtr
A PIDL of the folder for which you are requesting properties. This parameter must be Zero if the SHGVSPB_ALLFOLDERS flag is passed. - bagName
- Type: SystemString
The name of the requested property bag. - valueName
- Type: SystemString
The name of the value to get. - value
- Type: SystemObject
The value. - flags (Optional)
- Type: ShellBoost.Core.WindowsShellSHGVSPB
Options that specify how the bag must be retrieved. - throwOnError (Optional)
- Type: SystemBoolean
if set to true errors may be throw in case of Windows Shell errors.
Return Value
Type:
Int32
An error code or 0.
Exceptions See Also