Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.58 KB

TPJIStreamWrapper-Stat.md

File metadata and controls

42 lines (27 loc) · 1.58 KB

Stat method

Project: Stream Extension Classes

Unit: PJIStreams

Class: TPJIStreamWrapper

Applies to: ~>3.0

function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult;
  virtual; stdcall;

Description

Stat retrieves a STATSTG structure that provides information about the wrapped stream.

Parameters:

  • statstg -- Receives the required TStatStg (STATSTG) record.
  • grfStatFlag -- Specifies which members of the TStatStg record are not to contain information. Possible values are:
    • STATFLAG_DEFAULT: Omits the stream name from the record.
    • STATFLAG_NORMAL: Includes the stream name in the record. In this case the name should be freed by the caller using the task allocator.

Returns:

  • S_OK on success.
  • E_UNEXPECTED if an exception occurs
  • STG_E_INVALIDFLAG if grfStatFlag is not valid
  • STG_E_INVALIDPOINTER if statstg is not a valid pointer.

Remarks

Only the following fields of TStatStg are supported:

  • dwType: Set to STGTY_STREAM.
  • cbSize: Set to the size of the underlying stream.
  • pwcsName: Set to the name of the stream. This is made up of wrapper class name followed by name of wrapped class in parentheses. This field is only set if the grfStatFlag parameter is set to STATFLAG_NORMAL. When set, the value must be freed using the task allocator.

Other fields are set to zero.