Click or drag to resize

ShellDataObjectFormatSetCFSTR_FILECONTENTS Method

Sets the CFSTR_FILEDESCRIPTOR and CFSTR_FILECONTENTS formats to an IDataObject. This method may not work completely with data object classes that don't fully implement the native COM IDataObject interface, such as Winforms or WPF ones. If you want to add multiple contents, use the ShellBoost data object created using ShellDataObject.CreateDataObject().

Namespace:  callback.ShellBoost.Core
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static int SetCFSTR_FILECONTENTS(
	Object dataObject,
	IEnumerable<FileStreamDescriptor> files,
	bool realizeStreams = false,
	bool throwOnError = true
)

Parameters

dataObject
Type: SystemObject
The data object.
files
Type: System.Collections.GenericIEnumerableFileStreamDescriptor
The files and stream descriptors.
realizeStreams (Optional)
Type: SystemBoolean
if set to true streams are transformed into byte arrays before being put in the data object.
throwOnError (Optional)
Type: SystemBoolean
if set to true errors may be throw in case of Windows Shell errors.

Return Value

Type: Int32
0 or an error code.
Exceptions
ExceptionCondition
ArgumentNullExceptiondataObject is null.
See Also