IStream_Size function

Retrieves the size, in bytes, of a specified stream.

Syntax

LWSTDAPI IStream_Size(
  IStream        *pstm,
  ULARGE_INTEGER *pui
);

Parameters

pstm

Type: IStream*

A pointer to the IStream interface of the stream whose size is to be determined.

pui

Type: ULARGE_INTEGER*

A pointer to a ULARGE_INTEGER structure to receive the size of the stream.

Return Value

Type: HRESULT

Returns S_OK on success or a COM failure code otherwise. See IStream::Stat for further discussion of possible error codes.

Remarks

This function gets the size of the stream by calling the specified stream object's IStream::Stat method. It then copies the value of the cbSize member of the STATSTG structure returned by IStream::Stat to the ULARGE_INTEGER structure pointed to by pui. If the function fails, the contents of the ULARGE_INTEGER structure are undefined.

Requirements

   
Minimum supported client Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server Windows 2000 Server, Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlwapi.h
DLL Shlwapi.dll (version 5.0 or later)