Syntax 1 For OLE stream objects – PB Docs 126

Syntax 1 For OLE stream objects

Description

Moves the read/write pointer to the specified position
in an OLE stream object. The pointer is the position in the stream
at which the next read or write begins.

Controls

OLEStream objects

Syntax

Argument

Description

olestream

The name of an OLE stream variable that
has been opened.

position

A long whose value is the position relative
to origin to which you want to move the read/write
pointer.

origin (optional)

The value of the SeekType enumerated
datatype specifying where you want to start the seek. Values are:

  • FromBeginning! – (Default)
    At the beginning of the file

  • FromCurrent! – At the current position

  • FromEnd! – At the end of the file

Return Values

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

  • -1 Stream is not open

  • -2 Seek error

  • -9 Other error

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

Examples

This example writes additional data to an OLE stream.
First, it 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. Seek positions
the read/write pointer at the end of the stream so that
the contents of the instance blob variable lb_info is
written at the end.

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

See Also


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