ReactOS  0.4.14-dev-98-gb0d4763
stream.c File Reference
#include "wine/debug.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "objbase.h"
#include "shlwapi.h"
#include "wincodecs_private.h"
Include dependency graph for stream.c:

Go to the source code of this file.

Classes

struct  StreamOnMemory
 
struct  StreamOnFileHandle
 
struct  StreamOnStreamRange
 
struct  IWICStreamImpl
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct StreamOnMemory StreamOnMemory
 
typedef struct StreamOnFileHandle StreamOnFileHandle
 
typedef struct StreamOnStreamRange StreamOnStreamRange
 
typedef struct IWICStreamImpl IWICStreamImpl
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wincodecs)
 
static StreamOnMemoryStreamOnMemory_from_IStream (IStream *iface)
 
static HRESULT WINAPI StreamOnMemory_QueryInterface (IStream *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI StreamOnMemory_AddRef (IStream *iface)
 
static ULONG WINAPI StreamOnMemory_Release (IStream *iface)
 
static HRESULT WINAPI StreamOnMemory_Read (IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
 
static HRESULT WINAPI StreamOnMemory_Write (IStream *iface, void const *pv, ULONG cb, ULONG *pcbWritten)
 
static HRESULT WINAPI StreamOnMemory_Seek (IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
static HRESULT WINAPI StreamOnMemory_SetSize (IStream *iface, ULARGE_INTEGER libNewSize)
 
static HRESULT WINAPI StreamOnMemory_CopyTo (IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
 
static HRESULT WINAPI StreamOnMemory_Commit (IStream *iface, DWORD grfCommitFlags)
 
static HRESULT WINAPI StreamOnMemory_Revert (IStream *iface)
 
static HRESULT WINAPI StreamOnMemory_LockRegion (IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI StreamOnMemory_UnlockRegion (IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI StreamOnMemory_Stat (IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
 
static HRESULT WINAPI StreamOnMemory_Clone (IStream *iface, IStream **ppstm)
 
static StreamOnFileHandleStreamOnFileHandle_from_IStream (IStream *iface)
 
static HRESULT WINAPI StreamOnFileHandle_QueryInterface (IStream *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI StreamOnFileHandle_AddRef (IStream *iface)
 
static ULONG WINAPI StreamOnFileHandle_Release (IStream *iface)
 
static HRESULT WINAPI StreamOnFileHandle_Read (IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
 
static HRESULT WINAPI StreamOnFileHandle_Write (IStream *iface, void const *pv, ULONG cb, ULONG *pcbWritten)
 
static HRESULT WINAPI StreamOnFileHandle_Seek (IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
static HRESULT WINAPI StreamOnFileHandle_SetSize (IStream *iface, ULARGE_INTEGER libNewSize)
 
static HRESULT WINAPI StreamOnFileHandle_CopyTo (IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
 
static HRESULT WINAPI StreamOnFileHandle_Commit (IStream *iface, DWORD grfCommitFlags)
 
static HRESULT WINAPI StreamOnFileHandle_Revert (IStream *iface)
 
static HRESULT WINAPI StreamOnFileHandle_LockRegion (IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI StreamOnFileHandle_UnlockRegion (IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI StreamOnFileHandle_Stat (IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
 
static HRESULT WINAPI StreamOnFileHandle_Clone (IStream *iface, IStream **ppstm)
 
static StreamOnStreamRangeStreamOnStreamRange_from_IStream (IStream *iface)
 
static HRESULT WINAPI StreamOnStreamRange_QueryInterface (IStream *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI StreamOnStreamRange_AddRef (IStream *iface)
 
static ULONG WINAPI StreamOnStreamRange_Release (IStream *iface)
 
static HRESULT WINAPI StreamOnStreamRange_Read (IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
 
static HRESULT WINAPI StreamOnStreamRange_Write (IStream *iface, void const *pv, ULONG cb, ULONG *pcbWritten)
 
static HRESULT WINAPI StreamOnStreamRange_Seek (IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
static HRESULT WINAPI StreamOnStreamRange_SetSize (IStream *iface, ULARGE_INTEGER libNewSize)
 
static HRESULT WINAPI StreamOnStreamRange_CopyTo (IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
 
static HRESULT WINAPI StreamOnStreamRange_Commit (IStream *iface, DWORD grfCommitFlags)
 
static HRESULT WINAPI StreamOnStreamRange_Revert (IStream *iface)
 
static HRESULT WINAPI StreamOnStreamRange_LockRegion (IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI StreamOnStreamRange_UnlockRegion (IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI StreamOnStreamRange_Stat (IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
 
static HRESULT WINAPI StreamOnStreamRange_Clone (IStream *iface, IStream **ppstm)
 
static IWICStreamImplimpl_from_IWICStream (IWICStream *iface)
 
static HRESULT WINAPI IWICStreamImpl_QueryInterface (IWICStream *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI IWICStreamImpl_AddRef (IWICStream *iface)
 
static ULONG WINAPI IWICStreamImpl_Release (IWICStream *iface)
 
static HRESULT WINAPI IWICStreamImpl_Read (IWICStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
 
static HRESULT WINAPI IWICStreamImpl_Write (IWICStream *iface, void const *pv, ULONG cb, ULONG *pcbWritten)
 
static HRESULT WINAPI IWICStreamImpl_Seek (IWICStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
static HRESULT WINAPI IWICStreamImpl_SetSize (IWICStream *iface, ULARGE_INTEGER libNewSize)
 
static HRESULT WINAPI IWICStreamImpl_CopyTo (IWICStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
 
static HRESULT WINAPI IWICStreamImpl_Commit (IWICStream *iface, DWORD grfCommitFlags)
 
static HRESULT WINAPI IWICStreamImpl_Revert (IWICStream *iface)
 
static HRESULT WINAPI IWICStreamImpl_LockRegion (IWICStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI IWICStreamImpl_UnlockRegion (IWICStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
 
static HRESULT WINAPI IWICStreamImpl_Stat (IWICStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
 
static HRESULT WINAPI IWICStreamImpl_Clone (IWICStream *iface, IStream **ppstm)
 
static HRESULT WINAPI IWICStreamImpl_InitializeFromIStream (IWICStream *iface, IStream *stream)
 
static HRESULT WINAPI IWICStreamImpl_InitializeFromFilename (IWICStream *iface, LPCWSTR wzFileName, DWORD dwDesiredAccess)
 
static HRESULT WINAPI IWICStreamImpl_InitializeFromMemory (IWICStream *iface, BYTE *pbBuffer, DWORD cbBufferSize)
 
static HRESULT map_file (HANDLE file, HANDLE *map, void **mem, LARGE_INTEGER *size)
 
HRESULT stream_initialize_from_filehandle (IWICStream *iface, HANDLE file)
 
static HRESULT WINAPI IWICStreamImpl_InitializeFromIStreamRegion (IWICStream *iface, IStream *pIStream, ULARGE_INTEGER ulOffset, ULARGE_INTEGER ulMaxSize)
 
HRESULT StreamImpl_Create (IWICStream **stream)
 

Variables

static const IStreamVtbl StreamOnMemory_Vtbl
 
static const IStreamVtbl StreamOnFileHandle_Vtbl
 
static const IStreamVtbl StreamOnStreamRange_Vtbl
 
static const IWICStreamVtbl WICStream_Vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file stream.c.

Typedef Documentation

◆ IWICStreamImpl

◆ StreamOnFileHandle

◆ StreamOnMemory

◆ StreamOnStreamRange

Function Documentation

◆ impl_from_IWICStream()

◆ IWICStreamImpl_AddRef()

static ULONG WINAPI IWICStreamImpl_AddRef ( IWICStream iface)
static

Definition at line 779 of file stream.c.

780 {
783 
784  TRACE("(%p) refcount=%u\n", iface, ref);
785 
786  return ref;
787 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ IWICStreamImpl_Clone()

static HRESULT WINAPI IWICStreamImpl_Clone ( IWICStream iface,
IStream **  ppstm 
)
static

Definition at line 905 of file stream.c.

907 {
909  TRACE("(%p, %p)\n", This, ppstm);
910 
911  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
912  return IStream_Clone(This->pStream, ppstm);
913 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
#define TRACE(s)
Definition: solgame.cpp:4

◆ IWICStreamImpl_Commit()

static HRESULT WINAPI IWICStreamImpl_Commit ( IWICStream iface,
DWORD  grfCommitFlags 
)
static

Definition at line 854 of file stream.c.

856 {
858  TRACE("(%p, %#x)\n", This, grfCommitFlags);
859 
860  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
861  return IStream_Commit(This->pStream, grfCommitFlags);
862 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
#define TRACE(s)
Definition: solgame.cpp:4

◆ IWICStreamImpl_CopyTo()

static HRESULT WINAPI IWICStreamImpl_CopyTo ( IWICStream iface,
IStream pstm,
ULARGE_INTEGER  cb,
ULARGE_INTEGER pcbRead,
ULARGE_INTEGER pcbWritten 
)
static

Definition at line 844 of file stream.c.

846 {
848  TRACE("(%p, %p, %s, %p, %p)\n", This, pstm, wine_dbgstr_longlong(cb.QuadPart), pcbRead, pcbWritten);
849 
850  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
851  return IStream_CopyTo(This->pStream, pstm, cb, pcbRead, pcbWritten);
852 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ IWICStreamImpl_InitializeFromFilename()

static HRESULT WINAPI IWICStreamImpl_InitializeFromFilename ( IWICStream iface,
LPCWSTR  wzFileName,
DWORD  dwDesiredAccess 
)
static

Definition at line 937 of file stream.c.

939 {
941  HRESULT hr;
942  DWORD dwMode;
943  IStream *stream;
944 
945  TRACE("(%p, %s, %u)\n", iface, debugstr_w(wzFileName), dwDesiredAccess);
946 
947  if (This->pStream) return WINCODEC_ERR_WRONGSTATE;
948 
949  if(dwDesiredAccess & GENERIC_WRITE)
951  else if(dwDesiredAccess & GENERIC_READ)
953  else
954  return E_INVALIDARG;
955 
956  hr = SHCreateStreamOnFileW(wzFileName, dwMode, &stream);
957 
958  if (SUCCEEDED(hr))
959  {
960  if (InterlockedCompareExchangePointer((void**)&This->pStream, stream, NULL))
961  {
962  /* Some other thread set the stream first. */
963  IStream_Release(stream);
965  }
966  }
967 
968  return hr;
969 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
HRESULT hr
Definition: shlfolder.c:183
#define STGM_FAILIFTHERE
Definition: objbase.h:927
#define STGM_CREATE
Definition: objbase.h:925
#define GENERIC_WRITE
Definition: nt_native.h:90
#define debugstr_w
Definition: kernel32.h:32
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define STGM_WRITE
Definition: objbase.h:917
#define STGM_READ
Definition: objbase.h:916
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: parse.h:22
GLuint GLuint stream
Definition: glext.h:7522
#define GENERIC_READ
Definition: compat.h:124
#define WINCODEC_ERR_WRONGSTATE
Definition: winerror.h:3273
HRESULT WINAPI SHCreateStreamOnFileW(LPCWSTR lpszPath, DWORD dwMode, IStream **lppStream)
Definition: istream.c:484
#define STGM_SHARE_DENY_WRITE
Definition: objbase.h:921
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ IWICStreamImpl_InitializeFromIStream()

static HRESULT WINAPI IWICStreamImpl_InitializeFromIStream ( IWICStream iface,
IStream stream 
)
static

Definition at line 915 of file stream.c.

916 {
918  HRESULT hr = S_OK;
919 
920  TRACE("(%p, %p)\n", iface, stream);
921 
922  if (!stream) return E_INVALIDARG;
923  if (This->pStream) return WINCODEC_ERR_WRONGSTATE;
924 
925  IStream_AddRef(stream);
926 
927  if (InterlockedCompareExchangePointer((void **)&This->pStream, stream, NULL))
928  {
929  /* Some other thread set the stream first. */
930  IStream_Release(stream);
932  }
933 
934  return hr;
935 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
HRESULT hr
Definition: shlfolder.c:183
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
Definition: parse.h:22
#define WINCODEC_ERR_WRONGSTATE
Definition: winerror.h:3273
#define S_OK
Definition: intsafe.h:59

◆ IWICStreamImpl_InitializeFromIStreamRegion()

static HRESULT WINAPI IWICStreamImpl_InitializeFromIStreamRegion ( IWICStream iface,
IStream pIStream,
ULARGE_INTEGER  ulOffset,
ULARGE_INTEGER  ulMaxSize 
)
static

Definition at line 1088 of file stream.c.

1090 {
1092  StreamOnStreamRange *pObject;
1093 
1094  TRACE("(%p,%p,%s,%s)\n", iface, pIStream, wine_dbgstr_longlong(ulOffset.QuadPart),
1095  wine_dbgstr_longlong(ulMaxSize.QuadPart));
1096 
1097  if (!pIStream) return E_INVALIDARG;
1098  if (This->pStream) return WINCODEC_ERR_WRONGSTATE;
1099 
1100  pObject = HeapAlloc(GetProcessHeap(), 0, sizeof(StreamOnStreamRange));
1101  if (!pObject) return E_OUTOFMEMORY;
1102 
1103  pObject->IStream_iface.lpVtbl = &StreamOnStreamRange_Vtbl;
1104  pObject->ref = 1;
1105  IStream_AddRef(pIStream);
1106  pObject->stream = pIStream;
1107  pObject->pos.QuadPart = 0;
1108  pObject->offset = ulOffset;
1109  pObject->max_size = ulMaxSize;
1110  InitializeCriticalSection(&pObject->lock);
1111  pObject->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": StreamOnStreamRange.lock");
1112 
1113  if (InterlockedCompareExchangePointer((void**)&This->pStream, pObject, NULL))
1114  {
1115  /* Some other thread set the stream first. */
1116  IStream_Release(&pObject->IStream_iface);
1117  return WINCODEC_ERR_WRONGSTATE;
1118  }
1119 
1120  return S_OK;
1121 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define DWORD_PTR
Definition: treelist.c:76
ULARGE_INTEGER max_size
Definition: stream.c:453
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define E_INVALIDARG
Definition: ddrawi.h:101
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
IStream * stream
Definition: stream.c:450
static const IStreamVtbl StreamOnStreamRange_Vtbl
Definition: stream.c:718
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:866
IStream IStream_iface
Definition: stream.c:447
ULARGE_INTEGER pos
Definition: stream.c:451
#define WINCODEC_ERR_WRONGSTATE
Definition: winerror.h:3273
#define S_OK
Definition: intsafe.h:59
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
CRITICAL_SECTION lock
Definition: stream.c:455
ULARGE_INTEGER offset
Definition: stream.c:452
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:859

◆ IWICStreamImpl_InitializeFromMemory()

static HRESULT WINAPI IWICStreamImpl_InitializeFromMemory ( IWICStream iface,
BYTE pbBuffer,
DWORD  cbBufferSize 
)
static

Definition at line 987 of file stream.c.

989 {
991  StreamOnMemory *pObject;
992  TRACE("(%p, %p, %u)\n", iface, pbBuffer, cbBufferSize);
993 
994  if (!pbBuffer) return E_INVALIDARG;
995  if (This->pStream) return WINCODEC_ERR_WRONGSTATE;
996 
997  pObject = HeapAlloc(GetProcessHeap(), 0, sizeof(StreamOnMemory));
998  if (!pObject) return E_OUTOFMEMORY;
999 
1000  pObject->IStream_iface.lpVtbl = &StreamOnMemory_Vtbl;
1001  pObject->ref = 1;
1002  pObject->pbMemory = pbBuffer;
1003  pObject->dwMemsize = cbBufferSize;
1004  pObject->dwCurPos = 0;
1005  InitializeCriticalSection(&pObject->lock);
1006  pObject->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": StreamOnMemory.lock");
1007 
1008  if (InterlockedCompareExchangePointer((void**)&This->pStream, pObject, NULL))
1009  {
1010  /* Some other thread set the stream first. */
1011  IStream_Release(&pObject->IStream_iface);
1012  return WINCODEC_ERR_WRONGSTATE;
1013  }
1014 
1015  return S_OK;
1016 }
BYTE * pbMemory
Definition: stream.c:41
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define DWORD_PTR
Definition: treelist.c:76
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
#define E_INVALIDARG
Definition: ddrawi.h:101
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static const IStreamVtbl StreamOnMemory_Vtbl
Definition: stream.c:249
#define GetProcessHeap()
Definition: compat.h:395
DWORD dwCurPos
Definition: stream.c:43
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:866
IStream IStream_iface
Definition: stream.c:38
#define WINCODEC_ERR_WRONGSTATE
Definition: winerror.h:3273
#define S_OK
Definition: intsafe.h:59
CRITICAL_SECTION lock
Definition: stream.c:45
DWORD dwMemsize
Definition: stream.c:42
LONG ref
Definition: stream.c:39
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:859

Referenced by stream_initialize_from_filehandle().

◆ IWICStreamImpl_LockRegion()

static HRESULT WINAPI IWICStreamImpl_LockRegion ( IWICStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 873 of file stream.c.

875 {
877  TRACE("(%p, %s, %s, %d)\n", This, wine_dbgstr_longlong(libOffset.QuadPart),
878  wine_dbgstr_longlong(cb.QuadPart), dwLockType);
879 
880  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
881  return IStream_LockRegion(This->pStream, libOffset, cb, dwLockType);
882 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ IWICStreamImpl_QueryInterface()

static HRESULT WINAPI IWICStreamImpl_QueryInterface ( IWICStream iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 757 of file stream.c.

759 {
761  TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
762 
763  if (!ppv) return E_INVALIDARG;
764 
765  if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IStream, iid) ||
766  IsEqualIID(&IID_ISequentialStream, iid) || IsEqualIID(&IID_IWICStream, iid))
767  {
768  *ppv = &This->IWICStream_iface;
769  IUnknown_AddRef((IUnknown*)*ppv);
770  return S_OK;
771  }
772  else
773  {
774  *ppv = NULL;
775  return E_NOINTERFACE;
776  }
777 }
#define E_NOINTERFACE
Definition: winerror.h:2364
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IWICStreamImpl_Read()

static HRESULT WINAPI IWICStreamImpl_Read ( IWICStream iface,
void pv,
ULONG  cb,
ULONG pcbRead 
)
static

Definition at line 803 of file stream.c.

805 {
807  TRACE("(%p, %p, %u, %p)\n", This, pv, cb, pcbRead);
808 
809  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
810  return IStream_Read(This->pStream, pv, cb, pcbRead);
811 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41

◆ IWICStreamImpl_Release()

static ULONG WINAPI IWICStreamImpl_Release ( IWICStream iface)
static

Definition at line 789 of file stream.c.

790 {
793 
794  TRACE("(%p) refcount=%u\n", iface, ref);
795 
796  if (ref == 0) {
797  if (This->pStream) IStream_Release(This->pStream);
799  }
800  return ref;
801 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ IWICStreamImpl_Revert()

static HRESULT WINAPI IWICStreamImpl_Revert ( IWICStream iface)
static

Definition at line 864 of file stream.c.

865 {
867  TRACE("(%p)\n", This);
868 
869  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
870  return IStream_Revert(This->pStream);
871 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
#define TRACE(s)
Definition: solgame.cpp:4

◆ IWICStreamImpl_Seek()

static HRESULT WINAPI IWICStreamImpl_Seek ( IWICStream iface,
LARGE_INTEGER  dlibMove,
DWORD  dwOrigin,
ULARGE_INTEGER plibNewPosition 
)
static

Definition at line 823 of file stream.c.

825 {
827  TRACE("(%p, %s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart),
828  dwOrigin, plibNewPosition);
829 
830  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
831  return IStream_Seek(This->pStream, dlibMove, dwOrigin, plibNewPosition);
832 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
#define TRACE(s)
Definition: solgame.cpp:4
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
LONGLONG QuadPart
Definition: typedefs.h:112

◆ IWICStreamImpl_SetSize()

static HRESULT WINAPI IWICStreamImpl_SetSize ( IWICStream iface,
ULARGE_INTEGER  libNewSize 
)
static

Definition at line 834 of file stream.c.

836 {
838  TRACE("(%p, %s)\n", This, wine_dbgstr_longlong(libNewSize.QuadPart));
839 
840  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
841  return IStream_SetSize(This->pStream, libNewSize);
842 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ IWICStreamImpl_Stat()

static HRESULT WINAPI IWICStreamImpl_Stat ( IWICStream iface,
STATSTG *  pstatstg,
DWORD  grfStatFlag 
)
static

Definition at line 895 of file stream.c.

897 {
899  TRACE("(%p, %p, %#x)\n", This, pstatstg, grfStatFlag);
900 
901  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
902  return IStream_Stat(This->pStream, pstatstg, grfStatFlag);
903 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
#define TRACE(s)
Definition: solgame.cpp:4

◆ IWICStreamImpl_UnlockRegion()

static HRESULT WINAPI IWICStreamImpl_UnlockRegion ( IWICStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 884 of file stream.c.

886 {
888  TRACE("(%p, %s, %s, %d)\n", This, wine_dbgstr_longlong(libOffset.QuadPart),
889  wine_dbgstr_longlong(cb.QuadPart), dwLockType);
890 
891  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
892  return IStream_UnlockRegion(This->pStream, libOffset, cb, dwLockType);
893 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ IWICStreamImpl_Write()

static HRESULT WINAPI IWICStreamImpl_Write ( IWICStream iface,
void const pv,
ULONG  cb,
ULONG pcbWritten 
)
static

Definition at line 813 of file stream.c.

815 {
817  TRACE("(%p, %p, %u, %p)\n", This, pv, cb, pcbWritten);
818 
819  if (!This->pStream) return WINCODEC_ERR_NOTINITIALIZED;
820  return IStream_Write(This->pStream, pv, cb, pcbWritten);
821 }
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
#define WINCODEC_ERR_NOTINITIALIZED
Definition: winerror.h:3277
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41

◆ map_file()

static HRESULT map_file ( HANDLE  file,
HANDLE map,
void **  mem,
LARGE_INTEGER size 
)
static

Definition at line 1018 of file stream.c.

1019 {
1020  *map = NULL;
1022  if (size->u.HighPart)
1023  {
1024  WARN("file too large\n");
1025  return E_FAIL;
1026  }
1027  if (!(*map = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, size->u.LowPart, NULL)))
1028  {
1029  return HRESULT_FROM_WIN32(GetLastError());
1030  }
1031  if (!(*mem = MapViewOfFile(*map, FILE_MAP_READ, 0, 0, size->u.LowPart)))
1032  {
1033  CloseHandle(*map);
1034  return HRESULT_FROM_WIN32(GetLastError());
1035  }
1036  return S_OK;
1037 }
#define CloseHandle
Definition: compat.h:398
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define MapViewOfFile
Definition: compat.h:402
#define WARN(fmt,...)
Definition: debug.h:111
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416
#define FILE_MAP_READ
Definition: compat.h:427
GLsizeiptr size
Definition: glext.h:5919
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:401
Definition: _map.h:44
#define GetFileSizeEx
Definition: compat.h:414
#define S_OK
Definition: intsafe.h:59
#define PAGE_READONLY
Definition: compat.h:127
Definition: mem.c:156
Definition: fci.c:126

Referenced by stream_initialize_from_filehandle().

◆ stream_initialize_from_filehandle()

HRESULT stream_initialize_from_filehandle ( IWICStream iface,
HANDLE  file 
)

Definition at line 1039 of file stream.c.

1040 {
1042  StreamOnFileHandle *pObject;
1043  IWICStream *stream = NULL;
1044  HANDLE map;
1045  void *mem;
1047  HRESULT hr;
1048  TRACE("(%p,%p)\n", iface, file);
1049 
1050  if (This->pStream) return WINCODEC_ERR_WRONGSTATE;
1051 
1052  hr = map_file(file, &map, &mem, &size);
1053  if (FAILED(hr)) return hr;
1054 
1056  if (FAILED(hr)) goto error;
1057 
1059  if (FAILED(hr)) goto error;
1060 
1061  pObject = HeapAlloc(GetProcessHeap(), 0, sizeof(StreamOnFileHandle));
1062  if (!pObject)
1063  {
1064  hr = E_OUTOFMEMORY;
1065  goto error;
1066  }
1067  pObject->IStream_iface.lpVtbl = &StreamOnFileHandle_Vtbl;
1068  pObject->ref = 1;
1069  pObject->map = map;
1070  pObject->mem = mem;
1071  pObject->stream = stream;
1072 
1073  if (InterlockedCompareExchangePointer((void**)&This->pStream, pObject, NULL))
1074  {
1075  /* Some other thread set the stream first. */
1076  IStream_Release(&pObject->IStream_iface);
1077  return WINCODEC_ERR_WRONGSTATE;
1078  }
1079  return S_OK;
1080 
1081 error:
1082  if (stream) IWICStream_Release(stream);
1084  CloseHandle(map);
1085  return hr;
1086 }
#define CloseHandle
Definition: compat.h:398
static IWICStreamImpl * impl_from_IWICStream(IWICStream *iface)
Definition: stream.c:752
HRESULT hr
Definition: shlfolder.c:183
#define error(str)
Definition: mkdosfs.c:1605
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define InterlockedCompareExchangePointer
Definition: interlocked.h:129
smooth NULL
Definition: ftsmooth.c:416
static HRESULT map_file(HANDLE file, HANDLE *map, void **mem, LARGE_INTEGER *size)
Definition: stream.c:1018
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static HRESULT WINAPI IWICStreamImpl_InitializeFromMemory(IWICStream *iface, BYTE *pbBuffer, DWORD cbBufferSize)
Definition: stream.c:987
LONG HRESULT
Definition: typedefs.h:77
IWICStream * stream
Definition: stream.c:280
Definition: _map.h:44
Definition: parse.h:22
GLuint GLuint stream
Definition: glext.h:7522
static const IStreamVtbl StreamOnFileHandle_Vtbl
Definition: stream.c:419
#define WINCODEC_ERR_WRONGSTATE
Definition: winerror.h:3273
#define S_OK
Definition: intsafe.h:59
Definition: mem.c:156
HRESULT StreamImpl_Create(IWICStream **stream)
Definition: stream.c:1150
#define UnmapViewOfFile
Definition: compat.h:403
IStream IStream_iface
Definition: stream.c:275
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum map
Definition: glfuncs.h:262
Definition: fci.c:126

Referenced by ImagingFactory_CreateDecoderFromFileHandle().

◆ StreamImpl_Create()

HRESULT StreamImpl_Create ( IWICStream **  stream)

Definition at line 1150 of file stream.c.

1151 {
1152  IWICStreamImpl *pObject;
1153 
1154  if( !stream ) return E_INVALIDARG;
1155 
1156  pObject = HeapAlloc(GetProcessHeap(), 0, sizeof(IWICStreamImpl));
1157  if( !pObject ) {
1158  *stream = NULL;
1159  return E_OUTOFMEMORY;
1160  }
1161 
1162  pObject->IWICStream_iface.lpVtbl = &WICStream_Vtbl;
1163  pObject->ref = 1;
1164  pObject->pStream = NULL;
1165 
1166  *stream = &pObject->IWICStream_iface;
1167 
1168  return S_OK;
1169 }
IWICStream IWICStream_iface
Definition: stream.c:746
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
IStream * pStream
Definition: stream.c:749
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const IWICStreamVtbl WICStream_Vtbl
Definition: stream.c:1124
Definition: parse.h:22
#define S_OK
Definition: intsafe.h:59

Referenced by IcoDecoder_GetFrame(), ImagingFactory_CreateDecoderFromFileHandle(), ImagingFactory_CreateDecoderFromFilename(), ImagingFactory_CreateStream(), and stream_initialize_from_filehandle().

◆ StreamOnFileHandle_AddRef()

static ULONG WINAPI StreamOnFileHandle_AddRef ( IStream iface)
static

Definition at line 309 of file stream.c.

310 {
313 
314  TRACE("(%p) refcount=%u\n", iface, ref);
315 
316  return ref;
317 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static StreamOnFileHandle * StreamOnFileHandle_from_IStream(IStream *iface)
Definition: stream.c:283
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ StreamOnFileHandle_Clone()

static HRESULT WINAPI StreamOnFileHandle_Clone ( IStream iface,
IStream **  ppstm 
)
static

Definition at line 412 of file stream.c.

414 {
415  TRACE("(%p, %p)\n", iface, ppstm);
416  return E_NOTIMPL;
417 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ StreamOnFileHandle_Commit()

static HRESULT WINAPI StreamOnFileHandle_Commit ( IStream iface,
DWORD  grfCommitFlags 
)
static

Definition at line 374 of file stream.c.

376 {
377  TRACE("(%p, %#x)\n", iface, grfCommitFlags);
378  return E_NOTIMPL;
379 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ StreamOnFileHandle_CopyTo()

static HRESULT WINAPI StreamOnFileHandle_CopyTo ( IStream iface,
IStream pstm,
ULARGE_INTEGER  cb,
ULARGE_INTEGER pcbRead,
ULARGE_INTEGER pcbWritten 
)
static

Definition at line 367 of file stream.c.

369 {
370  TRACE("(%p, %p, %s, %p, %p)\n", iface, pstm, wine_dbgstr_longlong(cb.QuadPart), pcbRead, pcbWritten);
371  return E_NOTIMPL;
372 }
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnFileHandle_from_IStream()

static StreamOnFileHandle* StreamOnFileHandle_from_IStream ( IStream iface)
inlinestatic

Definition at line 283 of file stream.c.

284 {
285  return CONTAINING_RECORD(iface, StreamOnFileHandle, IStream_iface);
286 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by StreamOnFileHandle_AddRef(), StreamOnFileHandle_Read(), StreamOnFileHandle_Release(), StreamOnFileHandle_Seek(), and StreamOnFileHandle_Stat().

◆ StreamOnFileHandle_LockRegion()

static HRESULT WINAPI StreamOnFileHandle_LockRegion ( IStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 387 of file stream.c.

389 {
390  TRACE("(%p, %s, %s, %d)\n", iface, wine_dbgstr_longlong(libOffset.QuadPart),
391  wine_dbgstr_longlong(cb.QuadPart), dwLockType);
392  return E_NOTIMPL;
393 }
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnFileHandle_QueryInterface()

static HRESULT WINAPI StreamOnFileHandle_QueryInterface ( IStream iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 288 of file stream.c.

290 {
291  TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
292 
293  if (!ppv) return E_INVALIDARG;
294 
295  if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IStream, iid) ||
296  IsEqualIID(&IID_ISequentialStream, iid))
297  {
298  *ppv = iface;
299  IUnknown_AddRef((IUnknown*)*ppv);
300  return S_OK;
301  }
302  else
303  {
304  *ppv = NULL;
305  return E_NOINTERFACE;
306  }
307 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ StreamOnFileHandle_Read()

static HRESULT WINAPI StreamOnFileHandle_Read ( IStream iface,
void pv,
ULONG  cb,
ULONG pcbRead 
)
static

Definition at line 335 of file stream.c.

337 {
339  TRACE("(%p, %p, %u, %p)\n", This, pv, cb, pcbRead);
340 
341  return IWICStream_Read(This->stream, pv, cb, pcbRead);
342 }
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
static StreamOnFileHandle * StreamOnFileHandle_from_IStream(IStream *iface)
Definition: stream.c:283

◆ StreamOnFileHandle_Release()

static ULONG WINAPI StreamOnFileHandle_Release ( IStream iface)
static

Definition at line 319 of file stream.c.

320 {
323 
324  TRACE("(%p) refcount=%u\n", iface, ref);
325 
326  if (ref == 0) {
327  IWICStream_Release(This->stream);
328  UnmapViewOfFile(This->mem);
329  CloseHandle(This->map);
331  }
332  return ref;
333 }
#define CloseHandle
Definition: compat.h:398
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
#define InterlockedDecrement
Definition: armddk.h:52
static StreamOnFileHandle * StreamOnFileHandle_from_IStream(IStream *iface)
Definition: stream.c:283
unsigned int ULONG
Definition: retypes.h:1
#define UnmapViewOfFile
Definition: compat.h:403
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ StreamOnFileHandle_Revert()

static HRESULT WINAPI StreamOnFileHandle_Revert ( IStream iface)
static

Definition at line 381 of file stream.c.

382 {
383  TRACE("(%p)\n", iface);
384  return E_NOTIMPL;
385 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ StreamOnFileHandle_Seek()

static HRESULT WINAPI StreamOnFileHandle_Seek ( IStream iface,
LARGE_INTEGER  dlibMove,
DWORD  dwOrigin,
ULARGE_INTEGER plibNewPosition 
)
static

Definition at line 351 of file stream.c.

353 {
355  TRACE("(%p, %s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
356 
357  return IWICStream_Seek(This->stream, dlibMove, dwOrigin, plibNewPosition);
358 }
#define TRACE(s)
Definition: solgame.cpp:4
static StreamOnFileHandle * StreamOnFileHandle_from_IStream(IStream *iface)
Definition: stream.c:283
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
LONGLONG QuadPart
Definition: typedefs.h:112

◆ StreamOnFileHandle_SetSize()

static HRESULT WINAPI StreamOnFileHandle_SetSize ( IStream iface,
ULARGE_INTEGER  libNewSize 
)
static

Definition at line 360 of file stream.c.

362 {
363  TRACE("(%p, %s)\n", iface, wine_dbgstr_longlong(libNewSize.QuadPart));
364  return E_NOTIMPL;
365 }
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnFileHandle_Stat()

static HRESULT WINAPI StreamOnFileHandle_Stat ( IStream iface,
STATSTG *  pstatstg,
DWORD  grfStatFlag 
)
static

Definition at line 403 of file stream.c.

405 {
407  TRACE("(%p, %p, %#x)\n", This, pstatstg, grfStatFlag);
408 
409  return IWICStream_Stat(This->stream, pstatstg, grfStatFlag);
410 }
#define TRACE(s)
Definition: solgame.cpp:4
static StreamOnFileHandle * StreamOnFileHandle_from_IStream(IStream *iface)
Definition: stream.c:283

◆ StreamOnFileHandle_UnlockRegion()

static HRESULT WINAPI StreamOnFileHandle_UnlockRegion ( IStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 395 of file stream.c.

397 {
398  TRACE("(%p, %s, %s, %d)\n", iface, wine_dbgstr_longlong(libOffset.QuadPart),
399  wine_dbgstr_longlong(cb.QuadPart), dwLockType);
400  return E_NOTIMPL;
401 }
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnFileHandle_Write()

static HRESULT WINAPI StreamOnFileHandle_Write ( IStream iface,
void const pv,
ULONG  cb,
ULONG pcbWritten 
)
static

Definition at line 344 of file stream.c.

346 {
347  ERR("(%p, %p, %u, %p)\n", iface, pv, cb, pcbWritten);
349 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define ERROR_ACCESS_DENIED
Definition: compat.h:87
static DWORD cb
Definition: integrity.c:41
#define ERR(fmt,...)
Definition: debug.h:109

◆ StreamOnMemory_AddRef()

static ULONG WINAPI StreamOnMemory_AddRef ( IStream iface)
static

Definition at line 74 of file stream.c.

75 {
78 
79  TRACE("(%p) refcount=%u\n", iface, ref);
80 
81  return ref;
82 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1
static StreamOnMemory * StreamOnMemory_from_IStream(IStream *iface)
Definition: stream.c:48

◆ StreamOnMemory_Clone()

static HRESULT WINAPI StreamOnMemory_Clone ( IStream iface,
IStream **  ppstm 
)
static

Definition at line 241 of file stream.c.

243 {
244  TRACE("(%p, %p)\n", iface, ppstm);
245  return E_NOTIMPL;
246 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ StreamOnMemory_Commit()

static HRESULT WINAPI StreamOnMemory_Commit ( IStream iface,
DWORD  grfCommitFlags 
)
static

Definition at line 193 of file stream.c.

195 {
196  TRACE("(%p, %#x)\n", iface, grfCommitFlags);
197  return E_NOTIMPL;
198 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ StreamOnMemory_CopyTo()

static HRESULT WINAPI StreamOnMemory_CopyTo ( IStream iface,
IStream pstm,
ULARGE_INTEGER  cb,
ULARGE_INTEGER pcbRead,
ULARGE_INTEGER pcbWritten 
)
static

Definition at line 185 of file stream.c.

187 {
188  TRACE("(%p, %p, %s, %p, %p)\n", iface, pstm, wine_dbgstr_longlong(cb.QuadPart), pcbRead, pcbWritten);
189  return E_NOTIMPL;
190 }
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnMemory_from_IStream()

static StreamOnMemory* StreamOnMemory_from_IStream ( IStream iface)
inlinestatic

Definition at line 48 of file stream.c.

49 {
50  return CONTAINING_RECORD(iface, StreamOnMemory, IStream_iface);
51 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by StreamOnMemory_AddRef(), StreamOnMemory_Read(), StreamOnMemory_Release(), StreamOnMemory_Seek(), StreamOnMemory_Stat(), and StreamOnMemory_Write().

◆ StreamOnMemory_LockRegion()

static HRESULT WINAPI StreamOnMemory_LockRegion ( IStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 208 of file stream.c.

210 {
211  TRACE("(%p, %s, %s, %d)\n", iface, wine_dbgstr_longlong(libOffset.QuadPart),
212  wine_dbgstr_longlong(cb.QuadPart), dwLockType);
213  return E_NOTIMPL;
214 }
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnMemory_QueryInterface()

static HRESULT WINAPI StreamOnMemory_QueryInterface ( IStream iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 53 of file stream.c.

55 {
56  TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
57 
58  if (!ppv) return E_INVALIDARG;
59 
60  if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IStream, iid) ||
61  IsEqualIID(&IID_ISequentialStream, iid))
62  {
63  *ppv = iface;
64  IUnknown_AddRef((IUnknown*)*ppv);
65  return S_OK;
66  }
67  else
68  {
69  *ppv = NULL;
70  return E_NOINTERFACE;
71  }
72 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ StreamOnMemory_Read()

static HRESULT WINAPI StreamOnMemory_Read ( IStream iface,
void pv,
ULONG  cb,
ULONG pcbRead 
)
static

Definition at line 99 of file stream.c.

101 {
103  ULONG uBytesRead;
104 
105  TRACE("(%p, %p, %u, %p)\n", This, pv, cb, pcbRead);
106 
107  if (!pv) return E_INVALIDARG;
108 
109  EnterCriticalSection(&This->lock);
110  uBytesRead = min(cb, This->dwMemsize - This->dwCurPos);
111  memmove(pv, This->pbMemory + This->dwCurPos, uBytesRead);
112  This->dwCurPos += uBytesRead;
113  LeaveCriticalSection(&This->lock);
114 
115  if (pcbRead) *pcbRead = uBytesRead;
116 
117  return S_OK;
118 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define S_OK
Definition: intsafe.h:59
#define min(a, b)
Definition: monoChain.cc:55
unsigned int ULONG
Definition: retypes.h:1
static StreamOnMemory * StreamOnMemory_from_IStream(IStream *iface)
Definition: stream.c:48
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ StreamOnMemory_Release()

static ULONG WINAPI StreamOnMemory_Release ( IStream iface)
static

Definition at line 84 of file stream.c.

85 {
88 
89  TRACE("(%p) refcount=%u\n", iface, ref);
90 
91  if (ref == 0) {
92  This->lock.DebugInfo->Spare[0] = 0;
95  }
96  return ref;
97 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
static StreamOnMemory * StreamOnMemory_from_IStream(IStream *iface)
Definition: stream.c:48
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ StreamOnMemory_Revert()

static HRESULT WINAPI StreamOnMemory_Revert ( IStream iface)
static

Definition at line 201 of file stream.c.

202 {
203  TRACE("(%p)\n", iface);
204  return E_NOTIMPL;
205 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ StreamOnMemory_Seek()

static HRESULT WINAPI StreamOnMemory_Seek ( IStream iface,
LARGE_INTEGER  dlibMove,
DWORD  dwOrigin,
ULARGE_INTEGER plibNewPosition 
)
static

Definition at line 145 of file stream.c.

147 {
149  LARGE_INTEGER NewPosition;
150  HRESULT hr=S_OK;
151 
152  TRACE("(%p, %s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
153 
154  EnterCriticalSection(&This->lock);
155  if (dwOrigin == STREAM_SEEK_SET) NewPosition.QuadPart = dlibMove.QuadPart;
156  else if (dwOrigin == STREAM_SEEK_CUR) NewPosition.QuadPart = This->dwCurPos + dlibMove.QuadPart;
157  else if (dwOrigin == STREAM_SEEK_END) NewPosition.QuadPart = This->dwMemsize + dlibMove.QuadPart;
158  else hr = E_INVALIDARG;
159 
160  if (SUCCEEDED(hr)) {
161  if (NewPosition.u.HighPart) hr = HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW);
162  else if (NewPosition.QuadPart > This->dwMemsize) hr = E_INVALIDARG;
163  else if (NewPosition.QuadPart < 0) hr = E_INVALIDARG;
164  }
165 
166  if (SUCCEEDED(hr)) {
167  This->dwCurPos = NewPosition.u.LowPart;
168 
169  if(plibNewPosition) plibNewPosition->QuadPart = This->dwCurPos;
170  }
171  LeaveCriticalSection(&This->lock);
172 
173  return hr;
174 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define E_INVALIDARG
Definition: ddrawi.h:101
struct _LARGE_INTEGER::@2205 u
#define ERROR_ARITHMETIC_OVERFLOW
Definition: winerror.h:351
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
static StreamOnMemory * StreamOnMemory_from_IStream(IStream *iface)
Definition: stream.c:48
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SUCCEEDED(hr)
Definition: intsafe.h:57
LONGLONG QuadPart
Definition: typedefs.h:112

◆ StreamOnMemory_SetSize()

static HRESULT WINAPI StreamOnMemory_SetSize ( IStream iface,
ULARGE_INTEGER  libNewSize 
)
static

Definition at line 177 of file stream.c.

179 {
180  TRACE("(%p, %s)\n", iface, wine_dbgstr_longlong(libNewSize.QuadPart));
181  return E_NOTIMPL;
182 }
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnMemory_Stat()

static HRESULT WINAPI StreamOnMemory_Stat ( IStream iface,
STATSTG *  pstatstg,
DWORD  grfStatFlag 
)
static

Definition at line 225 of file stream.c.

227 {
229  TRACE("(%p, %p, %#x)\n", This, pstatstg, grfStatFlag);
230 
231  if (!pstatstg) return E_INVALIDARG;
232 
233  ZeroMemory(pstatstg, sizeof(STATSTG));
234  pstatstg->type = STGTY_STREAM;
235  pstatstg->cbSize.QuadPart = This->dwMemsize;
236 
237  return S_OK;
238 }
#define ZeroMemory
Definition: winbase.h:1642
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static StreamOnMemory * StreamOnMemory_from_IStream(IStream *iface)
Definition: stream.c:48

◆ StreamOnMemory_UnlockRegion()

static HRESULT WINAPI StreamOnMemory_UnlockRegion ( IStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 217 of file stream.c.

219 {
220  TRACE("(%p, %s, %s, %d)\n", iface, wine_dbgstr_longlong(libOffset.QuadPart),
221  wine_dbgstr_longlong(cb.QuadPart), dwLockType);
222  return E_NOTIMPL;
223 }
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnMemory_Write()

static HRESULT WINAPI StreamOnMemory_Write ( IStream iface,
void const pv,
ULONG  cb,
ULONG pcbWritten 
)
static

Definition at line 120 of file stream.c.

122 {
124  HRESULT hr;
125 
126  TRACE("(%p, %p, %u, %p)\n", This, pv, cb, pcbWritten);
127 
128  if (!pv) return E_INVALIDARG;
129 
130  EnterCriticalSection(&This->lock);
131  if (cb > This->dwMemsize - This->dwCurPos) {
133  }
134  else {
135  memmove(This->pbMemory + This->dwCurPos, pv, cb);
136  This->dwCurPos += cb;
137  hr = S_OK;
138  if (pcbWritten) *pcbWritten = cb;
139  }
140  LeaveCriticalSection(&This->lock);
141 
142  return hr;
143 }
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
HRESULT hr
Definition: shlfolder.c:183
#define STG_E_MEDIUMFULL
Definition: winerror.h:2581
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static DWORD cb
Definition: integrity.c:41
#define S_OK
Definition: intsafe.h:59
static StreamOnMemory * StreamOnMemory_from_IStream(IStream *iface)
Definition: stream.c:48
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ StreamOnStreamRange_AddRef()

static ULONG WINAPI StreamOnStreamRange_AddRef ( IStream iface)
static

Definition at line 484 of file stream.c.

485 {
488 
489  TRACE("(%p) refcount=%u\n", iface, ref);
490 
491  return ref;
492 }
static StreamOnStreamRange * StreamOnStreamRange_from_IStream(IStream *iface)
Definition: stream.c:458
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ StreamOnStreamRange_Clone()

static HRESULT WINAPI StreamOnStreamRange_Clone ( IStream iface,
IStream **  ppstm 
)
static

Definition at line 711 of file stream.c.

713 {
714  TRACE("(%p, %p)\n", iface, ppstm);
715  return E_NOTIMPL;
716 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ StreamOnStreamRange_Commit()

static HRESULT WINAPI StreamOnStreamRange_Commit ( IStream iface,
DWORD  grfCommitFlags 
)
static

Definition at line 655 of file stream.c.

657 {
658  TRACE("(%p, %#x)\n", iface, grfCommitFlags);
659  return E_NOTIMPL;
660 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ StreamOnStreamRange_CopyTo()

static HRESULT WINAPI StreamOnStreamRange_CopyTo ( IStream iface,
IStream pstm,
ULARGE_INTEGER  cb,
ULARGE_INTEGER pcbRead,
ULARGE_INTEGER pcbWritten 
)
static

Definition at line 646 of file stream.c.

648 {
649  TRACE("(%p, %p, %s, %p, %p)\n", iface, pstm, wine_dbgstr_longlong(cb.QuadPart),
650  pcbRead, pcbWritten);
651  return E_NOTIMPL;
652 }
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnStreamRange_from_IStream()

static StreamOnStreamRange* StreamOnStreamRange_from_IStream ( IStream iface)
inlinestatic

Definition at line 458 of file stream.c.

459 {
460  return CONTAINING_RECORD(iface, StreamOnStreamRange, IStream_iface);
461 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by StreamOnStreamRange_AddRef(), StreamOnStreamRange_Read(), StreamOnStreamRange_Release(), StreamOnStreamRange_Seek(), StreamOnStreamRange_Stat(), and StreamOnStreamRange_Write().

◆ StreamOnStreamRange_LockRegion()

static HRESULT WINAPI StreamOnStreamRange_LockRegion ( IStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 670 of file stream.c.

672 {
673  TRACE("(%p, %s, %s, %d)\n", iface, wine_dbgstr_longlong(libOffset.QuadPart),
674  wine_dbgstr_longlong(cb.QuadPart), dwLockType);
675  return E_NOTIMPL;
676 }
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnStreamRange_QueryInterface()

static HRESULT WINAPI StreamOnStreamRange_QueryInterface ( IStream iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 463 of file stream.c.

465 {
466  TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
467 
468  if (!ppv) return E_INVALIDARG;
469 
470  if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IStream, iid) ||
471  IsEqualIID(&IID_ISequentialStream, iid))
472  {
473  *ppv = iface;
474  IUnknown_AddRef((IUnknown*)*ppv);
475  return S_OK;
476  }
477  else
478  {
479  *ppv = NULL;
480  return E_NOINTERFACE;
481  }
482 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ StreamOnStreamRange_Read()

static HRESULT WINAPI StreamOnStreamRange_Read ( IStream iface,
void pv,
ULONG  cb,
ULONG pcbRead 
)
static

Definition at line 510 of file stream.c.

512 {
514  ULONG uBytesRead=0;
515  HRESULT hr;
516  ULARGE_INTEGER OldPosition;
517  LARGE_INTEGER SetPosition;
518 
519  TRACE("(%p, %p, %u, %p)\n", This, pv, cb, pcbRead);
520 
521  if (!pv) return E_INVALIDARG;
522 
523  EnterCriticalSection(&This->lock);
524  SetPosition.QuadPart = 0;
525  hr = IStream_Seek(This->stream, SetPosition, STREAM_SEEK_CUR, &OldPosition);
526  if (SUCCEEDED(hr))
527  {
528  SetPosition.QuadPart = This->pos.QuadPart + This->offset.QuadPart;
529  hr = IStream_Seek(This->stream, SetPosition, STREAM_SEEK_SET, NULL);
530  }
531  if (SUCCEEDED(hr))
532  {
533  if (This->pos.QuadPart + cb > This->max_size.QuadPart)
534  {
535  /* This would read past the end of the stream. */
536  if (This->pos.QuadPart > This->max_size.QuadPart)
537  cb = 0;
538  else
539  cb = This->max_size.QuadPart - This->pos.QuadPart;
540  }
541  hr = IStream_Read(This->stream, pv, cb, &uBytesRead);
542  SetPosition.QuadPart = OldPosition.QuadPart;
543  IStream_Seek(This->stream, SetPosition, STREAM_SEEK_SET, NULL);
544  }
545  if (SUCCEEDED(hr))
546  This->pos.QuadPart += uBytesRead;
547  LeaveCriticalSection(&This->lock);
548 
549  if (SUCCEEDED(hr) && pcbRead) *pcbRead = uBytesRead;
550 
551  return hr;
552 }
HRESULT hr
Definition: shlfolder.c:183
static StreamOnStreamRange * StreamOnStreamRange_from_IStream(IStream *iface)
Definition: stream.c:458
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static DWORD cb
Definition: integrity.c:41
unsigned int ULONG
Definition: retypes.h:1
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SUCCEEDED(hr)
Definition: intsafe.h:57
LONGLONG QuadPart
Definition: typedefs.h:112

◆ StreamOnStreamRange_Release()

static ULONG WINAPI StreamOnStreamRange_Release ( IStream iface)
static

Definition at line 494 of file stream.c.

495 {
498 
499  TRACE("(%p) refcount=%u\n", iface, ref);
500 
501  if (ref == 0) {
502  This->lock.DebugInfo->Spare[0] = 0;
503  DeleteCriticalSection(&This->lock);
504  IStream_Release(This->stream);
506  }
507  return ref;
508 }
static StreamOnStreamRange * StreamOnStreamRange_from_IStream(IStream *iface)
Definition: stream.c:458
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ StreamOnStreamRange_Revert()

static HRESULT WINAPI StreamOnStreamRange_Revert ( IStream iface)
static

Definition at line 663 of file stream.c.

664 {
665  TRACE("(%p)\n", iface);
666  return E_NOTIMPL;
667 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ StreamOnStreamRange_Seek()

static HRESULT WINAPI StreamOnStreamRange_Seek ( IStream iface,
LARGE_INTEGER  dlibMove,
DWORD  dwOrigin,
ULARGE_INTEGER plibNewPosition 
)
static

Definition at line 597 of file stream.c.

599 {
601  ULARGE_INTEGER NewPosition, actual_size;
602  HRESULT hr=S_OK;
603  STATSTG statstg;
604  TRACE("(%p, %s, %d, %p)\n", This, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
605 
606  EnterCriticalSection(&This->lock);
607  actual_size = This->max_size;
608  if (dwOrigin == STREAM_SEEK_SET)
609  NewPosition.QuadPart = dlibMove.QuadPart;
610  else if (dwOrigin == STREAM_SEEK_CUR)
611  NewPosition.QuadPart = This->pos.QuadPart + dlibMove.QuadPart;
612  else if (dwOrigin == STREAM_SEEK_END)
613  {
614  hr = IStream_Stat(This->stream, &statstg, STATFLAG_NONAME);
615  if (SUCCEEDED(hr))
616  {
617  if (This->max_size.QuadPart + This->offset.QuadPart > statstg.cbSize.QuadPart)
618  actual_size.QuadPart = statstg.cbSize.QuadPart - This->offset.QuadPart;
619  NewPosition.QuadPart = dlibMove.QuadPart + actual_size.QuadPart;
620  }
621  }
622  else hr = E_INVALIDARG;
623 
624  if (SUCCEEDED(hr) && (NewPosition.u.HighPart != 0 || NewPosition.QuadPart > actual_size.QuadPart))
626 
627  if (SUCCEEDED(hr)) {
628  This->pos.QuadPart = NewPosition.QuadPart;
629 
630  if(plibNewPosition) plibNewPosition->QuadPart = This->pos.QuadPart;
631  }
632  LeaveCriticalSection(&This->lock);
633 
634  return hr;
635 }
HRESULT hr
Definition: shlfolder.c:183
#define WINCODEC_ERR_VALUEOUTOFRANGE
Definition: winerror.h:3274
static StreamOnStreamRange * StreamOnStreamRange_from_IStream(IStream *iface)
Definition: stream.c:458
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
struct _ULARGE_INTEGER::@3750 u
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SUCCEEDED(hr)
Definition: intsafe.h:57
LONGLONG QuadPart
Definition: typedefs.h:112

◆ StreamOnStreamRange_SetSize()

static HRESULT WINAPI StreamOnStreamRange_SetSize ( IStream iface,
ULARGE_INTEGER  libNewSize 
)
static

Definition at line 638 of file stream.c.

640 {
641  TRACE("(%p, %s)\n", iface, wine_dbgstr_longlong(libNewSize.QuadPart));
642  return E_NOTIMPL;
643 }
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnStreamRange_Stat()

static HRESULT WINAPI StreamOnStreamRange_Stat ( IStream iface,
STATSTG *  pstatstg,
DWORD  grfStatFlag 
)
static

Definition at line 687 of file stream.c.

689 {
691  HRESULT hr;
692  TRACE("(%p, %p, %#x)\n", This, pstatstg, grfStatFlag);
693 
694  if (!pstatstg) return E_INVALIDARG;
695 
696  EnterCriticalSection(&This->lock);
697  hr = IStream_Stat(This->stream, pstatstg, grfStatFlag);
698  if (SUCCEEDED(hr))
699  {
700  pstatstg->cbSize.QuadPart -= This->offset.QuadPart;
701  if (This->max_size.QuadPart < pstatstg->cbSize.QuadPart)
702  pstatstg->cbSize.QuadPart = This->max_size.QuadPart;
703  }
704 
705  LeaveCriticalSection(&This->lock);
706 
707  return hr;
708 }
HRESULT hr
Definition: shlfolder.c:183
static StreamOnStreamRange * StreamOnStreamRange_from_IStream(IStream *iface)
Definition: stream.c:458
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ StreamOnStreamRange_UnlockRegion()

static HRESULT WINAPI StreamOnStreamRange_UnlockRegion ( IStream iface,
ULARGE_INTEGER  libOffset,
ULARGE_INTEGER  cb,
DWORD  dwLockType 
)
static

Definition at line 679 of file stream.c.

681 {
682  TRACE("(%p, %s, %s, %d)\n", iface, wine_dbgstr_longlong(libOffset.QuadPart),
683  wine_dbgstr_longlong(cb.QuadPart), dwLockType);
684  return E_NOTIMPL;
685 }
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD cb
Definition: integrity.c:41
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ StreamOnStreamRange_Write()

static HRESULT WINAPI StreamOnStreamRange_Write ( IStream iface,
void const pv,
ULONG  cb,
ULONG pcbWritten 
)
static

Definition at line 554 of file stream.c.

556 {
558  HRESULT hr;
559  ULARGE_INTEGER OldPosition;
560  LARGE_INTEGER SetPosition;
561  ULONG uBytesWritten=0;
562  TRACE("(%p, %p, %u, %p)\n", This, pv, cb, pcbWritten);
563 
564  if (!pv) return E_INVALIDARG;
565 
566  EnterCriticalSection(&This->lock);
567  SetPosition.QuadPart = 0;
568  hr = IStream_Seek(This->stream, SetPosition, STREAM_SEEK_CUR, &OldPosition);
569  if (SUCCEEDED(hr))
570  {
571  SetPosition.QuadPart = This->pos.QuadPart + This->offset.QuadPart;
572  hr = IStream_Seek(This->stream, SetPosition, STREAM_SEEK_SET, NULL);
573  }
574  if (SUCCEEDED(hr))
575  {
576  if (This->pos.QuadPart + cb > This->max_size.QuadPart)
577  {
578  /* This would read past the end of the stream. */
579  if (This->pos.QuadPart > This->max_size.QuadPart)
580  cb = 0;
581  else
582  cb = This->max_size.QuadPart - This->pos.QuadPart;
583  }
584  hr = IStream_Write(This->stream, pv, cb, &uBytesWritten);
585  SetPosition.QuadPart = OldPosition.QuadPart;
586  IStream_Seek(This->stream, SetPosition, STREAM_SEEK_SET, NULL);
587  }
588  if (SUCCEEDED(hr))
589  This->pos.QuadPart += uBytesWritten;
590  LeaveCriticalSection(&This->lock);
591 
592  if (SUCCEEDED(hr) && pcbWritten) *pcbWritten = uBytesWritten;
593 
594  return hr;
595 }
HRESULT hr
Definition: shlfolder.c:183
static StreamOnStreamRange * StreamOnStreamRange_from_IStream(IStream *iface)
Definition: stream.c:458
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static DWORD cb
Definition: integrity.c:41
unsigned int ULONG
Definition: retypes.h:1
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SUCCEEDED(hr)
Definition: intsafe.h:57
LONGLONG QuadPart
Definition: typedefs.h:112

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wincodecs  )

Variable Documentation

◆ StreamOnFileHandle_Vtbl

const IStreamVtbl StreamOnFileHandle_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI StreamOnFileHandle_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
Definition: stream.c:360
static HRESULT WINAPI StreamOnFileHandle_Commit(IStream *iface, DWORD grfCommitFlags)
Definition: stream.c:374
static HRESULT WINAPI StreamOnFileHandle_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
Definition: stream.c:403
static HRESULT WINAPI StreamOnFileHandle_Write(IStream *iface, void const *pv, ULONG cb, ULONG *pcbWritten)
Definition: stream.c:344
static HRESULT WINAPI StreamOnFileHandle_Revert(IStream *iface)
Definition: stream.c:381
static HRESULT WINAPI StreamOnFileHandle_QueryInterface(IStream *iface, REFIID iid, void **ppv)
Definition: stream.c:288
static ULONG WINAPI StreamOnFileHandle_Release(IStream *iface)
Definition: stream.c:319
static HRESULT WINAPI StreamOnFileHandle_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
Definition: stream.c:367
static HRESULT WINAPI StreamOnFileHandle_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: stream.c:395
static HRESULT WINAPI StreamOnFileHandle_Clone(IStream *iface, IStream **ppstm)
Definition: stream.c:412
static ULONG WINAPI StreamOnFileHandle_AddRef(IStream *iface)
Definition: stream.c:309
static HRESULT WINAPI StreamOnFileHandle_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: stream.c:387
static HRESULT WINAPI StreamOnFileHandle_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
Definition: stream.c:351
static HRESULT WINAPI StreamOnFileHandle_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
Definition: stream.c:335

Definition at line 419 of file stream.c.

Referenced by stream_initialize_from_filehandle().

◆ StreamOnMemory_Vtbl

const IStreamVtbl StreamOnMemory_Vtbl
static
Initial value:
=
{
}
static ULONG WINAPI StreamOnMemory_Release(IStream *iface)
Definition: stream.c:84
static HRESULT WINAPI StreamOnMemory_Revert(IStream *iface)
Definition: stream.c:201
static HRESULT WINAPI StreamOnMemory_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
Definition: stream.c:225
static HRESULT WINAPI StreamOnMemory_Write(IStream *iface, void const *pv, ULONG cb, ULONG *pcbWritten)
Definition: stream.c:120
static HRESULT WINAPI StreamOnMemory_Commit(IStream *iface, DWORD grfCommitFlags)
Definition: stream.c:193
static HRESULT WINAPI StreamOnMemory_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
Definition: stream.c:99
static HRESULT WINAPI StreamOnMemory_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
Definition: stream.c:185
static HRESULT WINAPI StreamOnMemory_QueryInterface(IStream *iface, REFIID iid, void **ppv)
Definition: stream.c:53
static HRESULT WINAPI StreamOnMemory_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
Definition: stream.c:145
static ULONG WINAPI StreamOnMemory_AddRef(IStream *iface)
Definition: stream.c:74
static HRESULT WINAPI StreamOnMemory_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: stream.c:208
static HRESULT WINAPI StreamOnMemory_Clone(IStream *iface, IStream **ppstm)
Definition: stream.c:241
static HRESULT WINAPI StreamOnMemory_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: stream.c:217
static HRESULT WINAPI StreamOnMemory_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
Definition: stream.c:177

Definition at line 249 of file stream.c.

Referenced by IWICStreamImpl_InitializeFromMemory().

◆ StreamOnStreamRange_Vtbl

const IStreamVtbl StreamOnStreamRange_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI StreamOnStreamRange_Commit(IStream *iface, DWORD grfCommitFlags)
Definition: stream.c:655
static HRESULT WINAPI StreamOnStreamRange_UnlockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: stream.c:679
static HRESULT WINAPI StreamOnStreamRange_LockRegion(IStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: stream.c:670
static HRESULT WINAPI StreamOnStreamRange_Seek(IStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
Definition: stream.c:597
static ULONG WINAPI StreamOnStreamRange_AddRef(IStream *iface)
Definition: stream.c:484
static HRESULT WINAPI StreamOnStreamRange_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
Definition: stream.c:687
static HRESULT WINAPI StreamOnStreamRange_CopyTo(IStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
Definition: stream.c:646
static HRESULT WINAPI StreamOnStreamRange_Write(IStream *iface, void const *pv, ULONG cb, ULONG *pcbWritten)
Definition: stream.c:554
static ULONG WINAPI StreamOnStreamRange_Release(IStream *iface)
Definition: stream.c:494
static HRESULT WINAPI StreamOnStreamRange_Clone(IStream *iface, IStream **ppstm)
Definition: stream.c:711
static HRESULT WINAPI StreamOnStreamRange_Revert(IStream *iface)
Definition: stream.c:663
static HRESULT WINAPI StreamOnStreamRange_Read(IStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
Definition: stream.c:510
static HRESULT WINAPI StreamOnStreamRange_QueryInterface(IStream *iface, REFIID iid, void **ppv)
Definition: stream.c:463
static HRESULT WINAPI StreamOnStreamRange_SetSize(IStream *iface, ULARGE_INTEGER libNewSize)
Definition: stream.c:638

Definition at line 718 of file stream.c.

Referenced by IWICStreamImpl_InitializeFromIStreamRegion().

◆ WICStream_Vtbl

const IWICStreamVtbl WICStream_Vtbl
static
Initial value:
=
{
}
static ULONG WINAPI IWICStreamImpl_AddRef(IWICStream *iface)
Definition: stream.c:779
static HRESULT WINAPI IWICStreamImpl_InitializeFromIStream(IWICStream *iface, IStream *stream)
Definition: stream.c:915
static ULONG WINAPI IWICStreamImpl_Release(IWICStream *iface)
Definition: stream.c:789
static HRESULT WINAPI IWICStreamImpl_SetSize(IWICStream *iface, ULARGE_INTEGER libNewSize)
Definition: stream.c:834
static HRESULT WINAPI IWICStreamImpl_Write(IWICStream *iface, void const *pv, ULONG cb, ULONG *pcbWritten)
Definition: stream.c:813
static HRESULT WINAPI IWICStreamImpl_InitializeFromFilename(IWICStream *iface, LPCWSTR wzFileName, DWORD dwDesiredAccess)
Definition: stream.c:937
static HRESULT WINAPI IWICStreamImpl_CopyTo(IWICStream *iface, IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
Definition: stream.c:844
static HRESULT WINAPI IWICStreamImpl_Clone(IWICStream *iface, IStream **ppstm)
Definition: stream.c:905
static HRESULT WINAPI IWICStreamImpl_InitializeFromMemory(IWICStream *iface, BYTE *pbBuffer, DWORD cbBufferSize)
Definition: stream.c:987
static HRESULT WINAPI IWICStreamImpl_LockRegion(IWICStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: stream.c:873
static HRESULT WINAPI IWICStreamImpl_Read(IWICStream *iface, void *pv, ULONG cb, ULONG *pcbRead)
Definition: stream.c:803
static HRESULT WINAPI IWICStreamImpl_Stat(IWICStream *iface, STATSTG *pstatstg, DWORD grfStatFlag)
Definition: stream.c:895
static HRESULT WINAPI IWICStreamImpl_UnlockRegion(IWICStream *iface, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType)
Definition: stream.c:884
static HRESULT WINAPI IWICStreamImpl_Seek(IWICStream *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
Definition: stream.c:823
static HRESULT WINAPI IWICStreamImpl_InitializeFromIStreamRegion(IWICStream *iface, IStream *pIStream, ULARGE_INTEGER ulOffset, ULARGE_INTEGER ulMaxSize)
Definition: stream.c:1088
static HRESULT WINAPI IWICStreamImpl_Commit(IWICStream *iface, DWORD grfCommitFlags)
Definition: stream.c:854
static HRESULT WINAPI IWICStreamImpl_Revert(IWICStream *iface)
Definition: stream.c:864
static HRESULT WINAPI IWICStreamImpl_QueryInterface(IWICStream *iface, REFIID iid, void **ppv)
Definition: stream.c:757

Definition at line 1124 of file stream.c.

Referenced by StreamImpl_Create().