Type TBufferRequestEvent


Declaration

TBufferRequestEvent = procedure(Sender: TObject; const SRC: string;

var Buffer: PChar; var BuffSize: LongInt) of Object;

Description

The TBufferRequestEvent type is the type for the OnBufferRequest event. This event allows a handler to respond with an HTML document in buffer form when a request is made for a new document. The parameters are:

SRCA string identifying the document requested. This string will usually be taken from a SRC= attribute.

BufferThe buffer containing the HTML text supplied by the event handler.

BuffSizeThe size of the buffer. A terminating null is not required.

The following points are important in writing the event handler:

TFrameViewer will not change or free the buffer.

In general, you must respond with a valid Buffer. If Nil is returned for the Buffer parameter, TFrameViewer will attempt to load the file identified by SRC. However, this is unreliable unless SRC contains a filename with the full path.

Only one of the event handlers in the group, OnBufferRequest, OnFileRequest, OnStreamRequest, and OnStringsRequest, may be active at the same time.

See also:

OnFileRequest Event

OnStreamRequest Event

OnStringsRequest Event