ShellDataObjectFormatSetHGlobalFormat Method (Object, String, String, Encoding, Int32, DVASPECT, Boolean) |
Sets a format to an IDataObject using a string.
Namespace:
ShellBoost.Core
Assembly:
ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax public static int SetHGlobalFormat(
Object dataObject,
string format,
string text,
Encoding encoding = null,
int index = -1,
DVASPECT aspect = DVASPECT.DVASPECT_CONTENT,
bool throwOnError = true
)
Parameters
- dataObject
- Type: SystemObject
The data object. - format
- Type: SystemString
The format. - text
- Type: SystemString
The text. - encoding (Optional)
- Type: System.TextEncoding
The encoding to use to transform the string into bytes. - 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 See Also