vxStream.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:6k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* vxStream.h generated by WIDL Version 2.2.1 on 06-Dec-01 at 11:42:42 AM */
  2. #include "comBase.h"
  3. #ifndef __INCvxStream_h
  4. #define __INCvxStream_h
  5. #include "comCoreTypes.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. int include_vxStream (void);
  10. #ifndef __ISequentialStream_FWD_DEFINED__
  11. #define __ISequentialStream_FWD_DEFINED__
  12. typedef interface ISequentialStream ISequentialStream;
  13. #endif /* __ISequentialStream_FWD_DEFINED__ */
  14. #ifndef __IStream_FWD_DEFINED__
  15. #define __IStream_FWD_DEFINED__
  16. typedef interface IStream IStream;
  17. #endif /* __IStream_FWD_DEFINED__ */
  18. typedef IStream* LPSTREAM;
  19. struct tagSTATSTG
  20. {
  21. LPOLESTR pwcsName;
  22. DWORD type;
  23. ULARGE_INTEGER cbSize;
  24. FILETIME mtime;
  25. FILETIME ctime;
  26. FILETIME atime;
  27. DWORD grfMode;
  28. DWORD grfLocksSupported;
  29. CLSID clsid;
  30. DWORD grfStateBits;
  31. DWORD reserved;
  32. };
  33. typedef struct tagSTATSTG STATSTG;
  34. enum tagSTGTY
  35. {
  36. STGTY_STORAGE = 1,
  37. STGTY_STREAM = 2,
  38. STGTY_LOCKBYTES = 3,
  39. STGTY_PROPERTY = 4,
  40. };
  41. typedef enum tagSTGTY STGTY;
  42. enum tagSTREAM_SEEK
  43. {
  44. STREAM_SEEK_SET = 0,
  45. STREAM_SEEK_CUR = 1,
  46. STREAM_SEEK_END = 2,
  47. };
  48. typedef enum tagSTREAM_SEEK STREAM_SEEK;
  49. enum tagLOCKTYPE
  50. {
  51. LOCK_WRITE = 1,
  52. LOCK_EXCLUSIVE = 2,
  53. LOCK_ONLYONCE = 4,
  54. };
  55. typedef enum tagLOCKTYPE LOCKTYPE;
  56. typedef struct
  57.     {
  58.     COM_VTBL_BEGIN
  59.     COM_VTBL_ENTRY (HRESULT, QueryInterface, (IUnknown* pThis, REFIID riid, void** ppvObject));
  60. #define IUnknown_QueryInterface(pThis, riid, ppvObject) pThis->lpVtbl->QueryInterface(COM_ADJUST_THIS(pThis), riid, ppvObject)
  61.     COM_VTBL_ENTRY (ULONG, AddRef, (IUnknown* pThis));
  62. #define IUnknown_AddRef(pThis) pThis->lpVtbl->AddRef(COM_ADJUST_THIS(pThis))
  63.     COM_VTBL_ENTRY (ULONG, Release, (IUnknown* pThis));
  64. #define IUnknown_Release(pThis) pThis->lpVtbl->Release(COM_ADJUST_THIS(pThis))
  65.     COM_VTBL_ENTRY (HRESULT, Read, (ISequentialStream* pThis, void* pv, ULONG cb, ULONG* pcbRead));
  66. #define ISequentialStream_Read(pThis, pv, cb, pcbRead) pThis->lpVtbl->Read(COM_ADJUST_THIS(pThis), pv, cb, pcbRead)
  67.     COM_VTBL_ENTRY (HRESULT, Write, (ISequentialStream* pThis, const void* pv, ULONG cb, ULONG* pcbWritten));
  68. #define ISequentialStream_Write(pThis, pv, cb, pcbWritten) pThis->lpVtbl->Write(COM_ADJUST_THIS(pThis), pv, cb, pcbWritten)
  69.     COM_VTBL_END
  70.     } ISequentialStreamVtbl;
  71. #ifdef __cplusplus
  72. interface ISequentialStream : public IUnknown
  73. {
  74. virtual HRESULT Read (void* pv, ULONG cb, ULONG* pcbRead) =0;
  75. virtual HRESULT Write (const void* pv, ULONG cb, ULONG* pcbWritten) =0;
  76. };
  77. #else
  78. /* C interface definition for ISequentialStream */
  79. interface ISequentialStream
  80.     {
  81.     const ISequentialStreamVtbl *  lpVtbl;
  82.     };
  83. #endif /* __cplusplus */
  84. EXTERN_C const IID IID_ISequentialStream;
  85. typedef struct
  86.     {
  87.     COM_VTBL_BEGIN
  88.     COM_VTBL_ENTRY (HRESULT, QueryInterface, (IUnknown* pThis, REFIID riid, void** ppvObject));
  89. #define IUnknown_QueryInterface(pThis, riid, ppvObject) pThis->lpVtbl->QueryInterface(COM_ADJUST_THIS(pThis), riid, ppvObject)
  90.     COM_VTBL_ENTRY (ULONG, AddRef, (IUnknown* pThis));
  91. #define IUnknown_AddRef(pThis) pThis->lpVtbl->AddRef(COM_ADJUST_THIS(pThis))
  92.     COM_VTBL_ENTRY (ULONG, Release, (IUnknown* pThis));
  93. #define IUnknown_Release(pThis) pThis->lpVtbl->Release(COM_ADJUST_THIS(pThis))
  94.     COM_VTBL_ENTRY (HRESULT, Read, (ISequentialStream* pThis, void* pv, ULONG cb, ULONG* pcbRead));
  95. #define ISequentialStream_Read(pThis, pv, cb, pcbRead) pThis->lpVtbl->Read(COM_ADJUST_THIS(pThis), pv, cb, pcbRead)
  96.     COM_VTBL_ENTRY (HRESULT, Write, (ISequentialStream* pThis, const void* pv, ULONG cb, ULONG* pcbWritten));
  97. #define ISequentialStream_Write(pThis, pv, cb, pcbWritten) pThis->lpVtbl->Write(COM_ADJUST_THIS(pThis), pv, cb, pcbWritten)
  98.     COM_VTBL_ENTRY (HRESULT, Seek, (IStream* pThis, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition));
  99. #define IStream_Seek(pThis, dlibMove, dwOrigin, plibNewPosition) pThis->lpVtbl->Seek(COM_ADJUST_THIS(pThis), dlibMove, dwOrigin, plibNewPosition)
  100.     COM_VTBL_ENTRY (HRESULT, SetSize, (IStream* pThis, ULARGE_INTEGER libNewSize));
  101. #define IStream_SetSize(pThis, libNewSize) pThis->lpVtbl->SetSize(COM_ADJUST_THIS(pThis), libNewSize)
  102.     COM_VTBL_ENTRY (HRESULT, CopyTo, (IStream* pThis, IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten));
  103. #define IStream_CopyTo(pThis, pstm, cb, pcbRead, pcbWritten) pThis->lpVtbl->CopyTo(COM_ADJUST_THIS(pThis), pstm, cb, pcbRead, pcbWritten)
  104.     COM_VTBL_ENTRY (HRESULT, Commit, (IStream* pThis, DWORD grfCommitFlags));
  105. #define IStream_Commit(pThis, grfCommitFlags) pThis->lpVtbl->Commit(COM_ADJUST_THIS(pThis), grfCommitFlags)
  106.     COM_VTBL_ENTRY (HRESULT, Revert, (IStream* pThis));
  107. #define IStream_Revert(pThis) pThis->lpVtbl->Revert(COM_ADJUST_THIS(pThis))
  108.     COM_VTBL_ENTRY (HRESULT, LockRegion, (IStream* pThis, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType));
  109. #define IStream_LockRegion(pThis, libOffset, cb, dwLockType) pThis->lpVtbl->LockRegion(COM_ADJUST_THIS(pThis), libOffset, cb, dwLockType)
  110.     COM_VTBL_ENTRY (HRESULT, UnlockRegion, (IStream* pThis, ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType));
  111. #define IStream_UnlockRegion(pThis, libOffset, cb, dwLockType) pThis->lpVtbl->UnlockRegion(COM_ADJUST_THIS(pThis), libOffset, cb, dwLockType)
  112.     COM_VTBL_ENTRY (HRESULT, Stat, (IStream* pThis, STATSTG* pstatstg, DWORD grfStatFlag));
  113. #define IStream_Stat(pThis, pstatstg, grfStatFlag) pThis->lpVtbl->Stat(COM_ADJUST_THIS(pThis), pstatstg, grfStatFlag)
  114.     COM_VTBL_ENTRY (HRESULT, Clone, (IStream* pThis, IStream** ppstm));
  115. #define IStream_Clone(pThis, ppstm) pThis->lpVtbl->Clone(COM_ADJUST_THIS(pThis), ppstm)
  116.     COM_VTBL_END
  117.     } IStreamVtbl;
  118. #ifdef __cplusplus
  119. interface IStream : public ISequentialStream
  120. {
  121. virtual HRESULT Seek (LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) =0;
  122. virtual HRESULT SetSize (ULARGE_INTEGER libNewSize) =0;
  123. virtual HRESULT CopyTo (IStream* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) =0;
  124. virtual HRESULT Commit (DWORD grfCommitFlags) =0;
  125. virtual HRESULT Revert () =0;
  126. virtual HRESULT LockRegion (ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) =0;
  127. virtual HRESULT UnlockRegion (ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) =0;
  128. virtual HRESULT Stat (STATSTG* pstatstg, DWORD grfStatFlag) =0;
  129. virtual HRESULT Clone (IStream** ppstm) =0;
  130. };
  131. #else
  132. /* C interface definition for IStream */
  133. interface IStream
  134.     {
  135.     const IStreamVtbl *  lpVtbl;
  136.     };
  137. #endif /* __cplusplus */
  138. EXTERN_C const IID IID_IStream;
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142. #endif /* __INCvxStream_h */