Function Reference


_StreamRead

Reads data from a stream using IStream::Read.

_StreamRead(ByRef $oStream, $iSize, ByRef $pMemory, ByRef $iReadSize)

Parameters

$oStream IStream COM object.
$iSize Number of bytes to read.
$pMemory [out] Pointer to the allocated read buffer.
$iReadSize [out] Number of bytes actually read.

Return Value

Success: 1
Failure: 0, sets @error to:
1 - Invalid stream object.
2 - Failed to allocate memory.
3 - COM error (HRESULT in @extended).

Remarks

Caller must free $pMemory using _WinAPI_FreeMemory.

Related

_StreamWrite, _WinAPI_GetBufferData