RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
WebDisp.TLocateFileServiceFindStreamEvent Type

TLocateFileServiceFindStreamEvent is the type for event handlers that provide access to a requested file.

Pascal
TLocateFileServiceFindStreamEvent = procedure (ASender: TObject; AComponent: TComponent; const AFileName: string; var AFoundStream: TStream; var AOwned: Boolean; var AHandled: Boolean) of object;
C++
(ASender: TObject; AComponent: TComponent; const AFileName: string; var AFoundStream: TStream; var AOwned: Boolean; var AHandled: Boolean) ( TLocateFileServiceFindStreamEvent)();

ASender is the TCustomLocateFileService descendant that is asked to locate a file. 

AComponent is the component that uses or is otherwise associated with the file. For example, this can be a content producer component that uses a template file. 

AFileName is the name of the file to locate. This is the name that the WebSnap application uses to refer to the desired file. Typically, it is the name of a Web page. 

AFoundStream returns a stream object from which the WebSnap application can read the contents of the requested file. 

AOwned indicates whether the caller should free AFoundStream after reading the file contents. When AOwned returns true, the caller should free the stream object. When AOwned returns false, the caller should not free the stream object. 

AHandled returns true if the event handler supplies a stream as the value of AFoundStream. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!