Click or drag to resize

ShellDataObjectFormatSetHGlobalFormat Method (Object, String, IntPtr, Int32, DVASPECT, Boolean)

Sets a format to an IDataObject using a HGLOBAL object.

Namespace:  callback.ShellBoost.Core
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static int SetHGlobalFormat(
	Object dataObject,
	string format,
	IntPtr hGlobal,
	int index = -1,
	DVASPECT aspect = DVASPECT.DVASPECT_CONTENT,
	bool throwOnError = true
)

Parameters

dataObject
Type: SystemObject
The data object.
format
Type: SystemString
The format.
hGlobal
Type: SystemIntPtr
The data. It must be an HGLOBAL handle.
index (Optional)
Type: SystemInt32
The FORMATETC index.
aspect (Optional)
Type: System.Runtime.InteropServices.ComTypesDVASPECT
The aspect.
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