32#define NONAMELESSUNION
69 IStream_AddRef(iface);
110 if (
This->parentStorage)
112 This->parentStorage = 0;
136 ULONG bytesReadBuffer;
139 TRACE(
"(%p, %p, %d, %p)\n",
140 iface, pv,
cb, pcbRead);
142 if (!
This->parentStorage)
144 WARN(
"storage reverted\n");
153 pcbRead = &bytesReadBuffer;
157 This->currentPosition,
167 This->currentPosition.QuadPart += *pcbRead;
195 TRACE(
"(%p, %p, %d, %p)\n",
196 iface, pv,
cb, pcbWritten);
214 if (!
This->parentStorage)
216 WARN(
"storage reverted\n");
234 TRACE(
"<-- S_OK, written 0\n");
240 This->currentPosition,
248 This->currentPosition.QuadPart += *pcbWritten;
253 TRACE(
"<-- %08x, written %u\n",
res, *pcbWritten);
277 TRACE(
"(%p, %d, %d, %p)\n",
278 iface, dlibMove.
u.LowPart, dwOrigin, plibNewPosition);
284 if (!
This->parentStorage)
286 WARN(
"storage reverted\n");
295 if (plibNewPosition == 0)
297 plibNewPosition = &newPosition;
306 case STREAM_SEEK_SET:
307 plibNewPosition->
u.HighPart = 0;
308 plibNewPosition->
u.LowPart = 0;
310 case STREAM_SEEK_CUR:
311 *plibNewPosition =
This->currentPosition;
313 case STREAM_SEEK_END:
316 *plibNewPosition = currentEntry.
size;
319 WARN(
"invalid dwOrigin %d\n", dwOrigin);
328 This->currentPosition = *plibNewPosition;
348 TRACE(
"(%p, %d)\n", iface, libNewSize.
u.LowPart);
350 if(!
This->parentStorage)
352 WARN(
"storage reverted\n");
359 if (libNewSize.
u.HighPart != 0)
361 WARN(
"invalid value for libNewSize.u.HighPart %d\n", libNewSize.
u.HighPart);
370 WARN(
"access denied\n");
403 TRACE(
"(%p, %p, %d, %p, %p)\n",
404 iface, pstm,
cb.u.LowPart, pcbRead, pcbWritten);
410 if (!
This->parentStorage)
412 WARN(
"storage reverted\n");
422 while (
cb.QuadPart > 0 )
424 if (
cb.QuadPart >=
sizeof(tmpBuffer) )
425 copySize =
sizeof(tmpBuffer);
427 copySize =
cb.u.LowPart;
429 IStream_Read(iface, tmpBuffer, copySize, &bytesRead);
431 totalBytesRead.
QuadPart += bytesRead;
433 IStream_Write(pstm, tmpBuffer, bytesRead, &
bytesWritten);
443 WARN(
"medium full\n");
447 if (bytesRead!=copySize)
450 cb.QuadPart -= bytesRead;
469 DWORD grfCommitFlags)
473 if (!
This->parentStorage)
475 WARN(
"storage reverted\n");
504 if (!
This->parentStorage)
506 WARN(
"storage reverted\n");
510 FIXME(
"not implemented!\n");
522 if (!
This->parentStorage)
524 WARN(
"storage reverted\n");
528 FIXME(
"not implemented!\n");
550 TRACE(
"%p %p %d\n",
This, pstatstg, grfStatFlag);
556 if (!
This->parentStorage)
558 WARN(
"storage reverted\n");
576 pstatstg->grfMode =
This->grfMode;
580 pstatstg->cbSize =
This->currentPosition;
585 WARN(
"failed to read entry\n");
615 if (!
This->parentStorage)
627 IStream_AddRef(*ppstm);
631 return IStream_Seek(*ppstm, seek_pos, STREAM_SEEK_SET,
NULL);
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define HeapFree(x, y, z)
static sub_stream_t * impl_from_IStream(IStream *iface)
void StorageBaseImpl_RemoveStream(StorageBaseImpl *stg, StgStreamImpl *strm)
void StorageUtl_CopyDirEntryToSTATSTG(StorageBaseImpl *storage, STATSTG *destination, const DirEntry *source, int statFlags)
void StorageBaseImpl_AddStream(StorageBaseImpl *stg, StgStreamImpl *strm)
GLenum GLsizei GLuint GLint * bytesWritten
static HMODULE MODULEINFO DWORD cb
#define IsEqualIID(riid1, riid2)
StgStreamImpl * StgStreamImpl_Construct(StorageBaseImpl *parentStorage, DWORD grfMode, DirRef dirEntry)
static HRESULT WINAPI StgStreamImpl_QueryInterface(IStream *iface, REFIID riid, void **ppvObject)
static HRESULT WINAPI StgStreamImpl_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
static HRESULT WINAPI StgStreamImpl_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static ULONG WINAPI StgStreamImpl_Release(IStream *iface)
static HRESULT WINAPI StgStreamImpl_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
static HRESULT WINAPI StgStreamImpl_Commit(IStream *iface, DWORD grfCommitFlags)
static HRESULT WINAPI StgStreamImpl_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
static HRESULT WINAPI StgStreamImpl_Revert(IStream *iface)
static HRESULT WINAPI StgStreamImpl_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
static HRESULT WINAPI StgStreamImpl_Write(IStream *iface, const void *pv, ULONG cb, ULONG *pcbWritten)
static const IStreamVtbl StgStreamVtbl
static HRESULT WINAPI StgStreamImpl_Clone(IStream *iface, IStream **ppstm)
static HRESULT WINAPI StgStreamImpl_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
static ULONG WINAPI StgStreamImpl_AddRef(IStream *iface)
static HRESULT WINAPI StgStreamImpl_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
static HRESULT StorageBaseImpl_StreamSetSize(StorageBaseImpl *This, DirRef index, ULARGE_INTEGER newsize)
static HRESULT StorageBaseImpl_StreamReadAt(StorageBaseImpl *This, DirRef index, ULARGE_INTEGER offset, ULONG size, void *buffer, ULONG *bytesRead)
static HRESULT StorageBaseImpl_StreamWriteAt(StorageBaseImpl *This, DirRef index, ULARGE_INTEGER offset, ULONG size, const void *buffer, ULONG *bytesWritten)
#define STGM_ACCESS_MODE(stgm)
static HRESULT StorageBaseImpl_Flush(StorageBaseImpl *This)
static HRESULT StorageBaseImpl_ReadDirEntry(StorageBaseImpl *This, DirRef index, DirEntry *data)
StorageBaseImpl * parentStorage
ULARGE_INTEGER currentPosition
struct _ULARGE_INTEGER::@4142 u
struct _LARGE_INTEGER::@2304 u
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define STG_E_INVALIDPOINTER
#define STG_E_ACCESSDENIED
#define STG_E_INVALIDFUNCTION
#define STG_E_INSUFFICIENTMEMORY