Length – PB Docs 2018

Length

PowerScript function

Description

Reports the length in bytes of an open OLE stream.

Len function

To get the length of a string or blob, use the Len function.

Applies to

OLEStream objects

Syntax

Argument

Description

olestream

The name of an OLE stream variable that has been
opened

sizevar

A long variable in which Length will store the size
of olestream

Return value

Integer.

Returns 0 if it succeeds and one of the following negative values if
an error occurs:

-1 — Stream is not open

-9 — Other error

If any argument’s value is null, Length returns null.

Examples

This example opens an OLE object in the file MYSTUFF.OLE and assigns
it to the OLEStorage object stg_stuff. Then it opens the stream called
info in stg_stuff and assigns it to the stream object olestr_info.
Finally, it finds out the stream’s length and stores the value in the
variable info_len.

The example does not check the function’s return values for success,
but you should be sure to check the return values in your code:

See also

Open

Read

Seek

Write


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x