Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FifteenWindows/OS Functions (continued)

ClipboardGetFormatSize Function

Overview

The ClipboardGetFormatSize function retrieves the size of the data for a specific clipboard format.

Syntax/Parameters

Syntax

int = ClipboardGetFormatSize ( [handle hClipboard], dword format | string code );

Parameters

hClipboard

An optional handle specifying an open Clipboard Object. If a handle is not specified, or specified as NULL_HANDLE, the default clipboard is open. If a Clipboard Object is open, it is automatically selected, and, if no object is open, a new object is opened and then closed upon completion of the function.

format   code

A dword as a clipboard format code or a string representation of a format name or code. See the list of types and codes defined in Section 15.5 Clipboard Functions.

Return Value

Returns an int containing the size of the clipboard object in bytes or -1 on failure. Use the GetLastError function to retrieve the application code or a formatted error code.

Remarks

Getting the size of a clipboard item results in the item being rendered. Most applications will render clipboard data during a copy or cut operation but some, like MS Word, do not. As a result, the operation may take time to complete if the copied data is large or overly complex.

Not all clipboard format types return conventional data. As such, some formats may return 0 bytes without an error.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic